Skip to content

kad: Add Key to InboundRequest::{PutRecord, AddProvider} #6048

@dariusc93

Description

@dariusc93

Description

Add the record Key to InboundRequest::PutRecord and InboundRequest::AddProvider event so the node can know the Key of the record that it has received.

Motivation

Currently, it the behaviour informs the node that they received a record InboundRequest::{PutRecord, AddProvider} event, unless StoreInserts::FilterBoth is enabled via Config::set_record_filtering in which case the record is included in its respected event. However, if the node wishes to know the key of the record it has received, it would have to enable filtering, which would then need to be explicitly stored in RecordStore through its respected functions. This seems a bit redundant since the record key can be included in the event to be more informational to the node in understanding what record has been stored without needing to store the record manually.

Current Implementation

Does not provide the key in InboundRequest::{PutRecord, AddProvider}

Are you planning to do it yourself in a pull request?

Maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions