Skip to content

Tidying up wire protocol handler and add limit#3116

Merged
jangko merged 1 commit intomasterfrom
eth68-limit
Mar 4, 2025
Merged

Tidying up wire protocol handler and add limit#3116
jangko merged 1 commit intomasterfrom
eth68-limit

Conversation

@jangko
Copy link
Copy Markdown
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
Copy Markdown
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
@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