You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this trait only defines functions that are relevant to the RequestResponse protocol, namely iterating over all protocols available. Furthermore, it constrains the types of messages sent via GossipSub or Request/Response to be the same, which is unnecessary coupling between the two.
Acceptance criteria
The NetworkCodec trait is removed from the codebase, and the FuelService is refactored to not use this codec.
Context
In the P2P service, we define a CodecTrait that can be defined for any struct implementing both GossipsubCodec and RequestResponse::Codec. See
See
fuel-core/crates/services/p2p/src/codecs.rs
Line 33 in f50a4d3
However, this trait only defines functions that are relevant to the
RequestResponse
protocol, namely iterating over all protocols available. Furthermore, it constrains the types of messages sent viaGossipSub
orRequest/Response
to be the same, which is unnecessary coupling between the two.Acceptance criteria
The
NetworkCodec
trait is removed from the codebase, and theFuelService
is refactored to not use this codec.Relevant files:
NetworkCodec
trait: https://github.com/FuelLabs/fuel-core/blob/release/v0.40.0/crates/services/p2p/src/codecs.rsNetworkCodec::get_req_res_protocol
function in theFuelService
:fuel-core/crates/services/p2p/src/behavior.rs
Line 116 in eea8c60
NetworkCodec
trait for thePostcardCodec
:fuel-core/crates/services/p2p/src/codecs/postcard.rs
Line 163 in eea8c60
The text was updated successfully, but these errors were encountered: