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

op-node: Span Batch Limit #32

Conversation

pcw109550
Copy link
Member

@pcw109550 pcw109550 commented Oct 16, 2023

This PR addresses field size limit check of span batch addressed at ethereum-optimism#7289 (comment).

Updated spec to explicitly state MAX_SPAN_BATCH_SIZE for max span batch size.

Span batch decoding field size check:

  • (Added in this PR) block_count cannot be larger than MAX_SPAN_BATCH_SIZE
  • (Added in this PR) block_tx_count cannot be larger than MAX_SPAN_BATCH_SIZE
  • Length of originBits cannot be larger than MAX_SPAN_BATCH_SIZE * 8
  • total_block_tx_count cannot be larger than MAX_SPAN_BATCH_SIZE
  • tx_data cannot be larger than MAX_SPAN_BATCH_SIZE
  • Length of contractCreationBits cannot be larger than MAX_SPAN_BATCH_SIZE * 8
  • Length of yParityBits cannot be larger than MAX_SPAN_BATCH_SIZE * 8

The reason why there are multiplier 8 at some check is that there are 8 bits per byte.

Added tests for newly added checks.

@pcw109550 pcw109550 changed the title op-node: Span Batch Field Limit op-node: Span Batch Limit Oct 19, 2023
@pcw109550 pcw109550 closed this Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants