Skip to content

Make state root calculation configurable on Flashblocks builder#164

Closed
haardikk21 wants to merge 8 commits intoflashbots:mainfrom
haardikk21:optional-state-root-computation
Closed

Make state root calculation configurable on Flashblocks builder#164
haardikk21 wants to merge 8 commits intoflashbots:mainfrom
haardikk21:optional-state-root-computation

Conversation

@haardikk21
Copy link
Copy Markdown
Contributor

@haardikk21 haardikk21 commented Jun 17, 2025

📝 Summary

related to flashbots/rollup-boost#335

Makes state root computation configurable in the builder, setting it to just be the zero value if not enabled. Used in conjunction with linked rollup-boost modifications to have the L2 client compute the state root instead.

💡 Motivation and Context

The context here is that state root computation per flashblock is extremely slow, and there are concerns if we can launch on Base Mainnet and still produce flashblocks every 200ms with that. By disabling that computation in the builder, and instead having rollup boost use the L2 Client to recompute the state root, we get around that problem by introducing a minor overhead in the getPayload request to rollup boost.

✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

Comment thread crates/op-rbuilder/src/builders/flashblocks/config.rs Outdated
@haardikk21 haardikk21 force-pushed the optional-state-root-computation branch from f7c8be6 to 34a1d72 Compare June 17, 2025 18:33
@dmarzzz
Copy link
Copy Markdown
Member

dmarzzz commented Jun 17, 2025

@protolambda has an idea to replace the state root with a "flashhash" which is just a hash of the transactions and the previous flashblock flashhash to preserve ordering integrity, I wonder if we could fit that into this effort

@haardikk21
Copy link
Copy Markdown
Contributor Author

@protolambda has an idea to replace the state root with a "flashhash" which is just a hash of the transactions and the previous flashblock flashhash to preserve ordering integrity, I wonder if we could fit that into this effort

what does this solve that we don't already get from flashblock index and cumulative txns/receipts list?

Comment thread crates/op-rbuilder/src/builders/flashblocks/payload.rs Outdated
@avalonche
Copy link
Copy Markdown
Collaborator

@haardikk21 good to merge once rebase conflicts are resolved

@haardikk21 haardikk21 closed this Jul 9, 2025
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.

5 participants