Skip to content
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

Tidying up wire protocol handler and add limit #3116

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Conversation

jangko
Copy link
Contributor

@jangko jangko commented Mar 3, 2025

Unfortunately, because of rlp encoding, the rate limiter like in nimbus-eth2 cannot be applied to nimbus-eth1 wire protocol handler immediately. So we stick with what the spec says.

In nimbus-eth2 or consensus layer in general, the wire protocol is encoded in SSZ. So it is possible to send the message in chunk relatively easy.

While execution client is using RLP encoding. Even before sending the wire message, the full payload length prefix must be calculated, therefore a special RLP encoder is needed. And because the full payload must be held in memory, benefits of incremental read from database cannot be applied.

fix #3102

Unfortunately, because of rlp encoding, the rate limiter like
in nimbus-eth2 cannot be applied to nimbus-eth1 wire protocol
handler immediately. So we stick with what the spec says.

In nimbus-eth2 or consensus layer in general, the wire protocol is
encoded in SSZ. So it is possible to send the message in chunk relatively easy.

While execution client is using RLP encoding. Even before sending the
wire message, the full payload length prefix must be calculated,
therefore a special RLP encoder is needed. And because the full payload
must be held in memory, benefits of incremental read from database
cannot be applied.
@jangko
Copy link
Contributor Author

jangko commented Mar 4, 2025

I'll merge this. The issues with hive devp2p/eth wire protocol test will be fixed in other PR.

@jangko jangko merged commit b913e23 into master Mar 4, 2025
8 checks passed
@jangko jangko deleted the eth68-limit branch March 4, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Put limit to eth/68 methods: GetHeaders, GetBlockBodies, GetReceipts, and GetPooledTransactions
1 participant