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

Refactor maxBytes #54

Open
tzdybal opened this issue Feb 10, 2025 · 0 comments
Open

Refactor maxBytes #54

tzdybal opened this issue Feb 10, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@tzdybal
Copy link
Member

tzdybal commented Feb 10, 2025

i feel like `maxBytes` is confusing and may be we should get rid of it altogether and go with the assumption that:
* sequencer will make fast batches of smaller sizes such that the batch will likely never exceed the execution client's block gas limits. 

 i am recommending this because, `maxBytes` is kind of useless. what do you think?

Originally posted by @gupadhyaya in rollkit/rollkit#1947 (review)

Further discussion in the PR comments: rollkit/rollkit#1947 (comment)


maxBytes handling is a bit confusing in current version of execution API. There are many issues there.

  1. maxBytes is not always the best way to set the limits - maxGas could also be used.
  2. Probably we can return the value in a cleaner way.

More context for maxBytes / maxGas

  1. maxBytes or maxGas is logically defined in execution client. It's strictly related to limits configured in given execution environment.
  2. Some execution VMs might put restrictions on gas, and other on size (bytes).
  3. At the same time, limit has to be communicated to sequencer so the batches consists of transactions fitting single block.
  4. Sequencer might not be able to estimate the gas required for each transaction. But advanced implementations might want to estimate or even calculate actual gas usage.
@tzdybal tzdybal changed the title maxBytes is confusing Refactor maxBytes Feb 10, 2025
@tzdybal tzdybal added enhancement New feature or request and removed needs-triage labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant