-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(net): ress
subprotocol
#14687
base: main
Are you sure you want to change the base?
feat(net): ress
subprotocol
#14687
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some suggestions/questions
still need to take another closer look
/// Get block headers. | ||
GetHeaders { | ||
/// The request for block headers. | ||
request: GetHeaders, | ||
/// The sender for the response. | ||
tx: oneshot::Sender<Vec<Header>>, | ||
}, | ||
/// Get block bodies. | ||
GetBlockBodies { | ||
/// The request for block bodies. | ||
request: Vec<BlockHash>, | ||
/// The sender for the response. | ||
tx: oneshot::Sender<Vec<BlockBody>>, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need those, because those are already part of the eth proto and we could reuse those instead?
} | ||
|
||
loop { | ||
if let Poll::Ready(Some(cmd)) = this.commands.poll_next_unpin(cx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can poll a finished stream, if the exist logic is independent from that you can fuse this receiver
} | ||
}; | ||
|
||
match msg.message { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this to a function?
_direction: Direction, | ||
_peer_id: PeerId, | ||
) -> OnNotSupported { | ||
OnNotSupported::Disconnect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably check the nodetype, because we dont want to disconnect if the node is stateful but the other peer doesnt support it?
Description
This PR adds
reth-network-ress
crate which definesress
RLPx subprotocol for stateless nodes.