feat: add Min/MaxStateRootElements configurations#2340
feat: add Min/MaxStateRootElements configurations#2340mslipper merged 1 commit intoethereum-optimism:developfrom
Conversation
🦋 Changeset detectedLatest commit: 9678b35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
mslipper
left a comment
There was a problem hiding this comment.
I think there need to be some changes to the docker compose file - tests are stalling.
|
|
||
| // MaxStateBatchCount is the maximum number of L2 state roots that can ever | ||
| // be in a batch. | ||
| MaxStateBatchCount uint64 |
There was a problem hiding this comment.
If I understand correctly, this was unused previously
There was a problem hiding this comment.
yes it was, the member existed but it wasn't read/written anywhere
Perhaps because the new config is marked as required |
| Name: "min-state-root-elements", | ||
| Usage: "Minimum number of elements required to submit a state " + | ||
| "root batch", | ||
| Required: true, |
There was a problem hiding this comment.
We could put a default of 1 here for simplicity
There was a problem hiding this comment.
Ended up leaving it as optional, as this mirrors the min/max tx size
|
Generally looks good to me besides the need to update |
This commit adds configuration hooks to bound the number of state roots that are permitted in state root batches. Specifically, the minimum allows us to amortized the cost of adding state roots to the CTC contract. Additionally, the maximum is used in place of the old limit based on tx size, since this is more natural and mirrors the minimum bound.
b2bc7c1 to
9678b35
Compare
Indeed this was the problem, thanks! |
Description
This PR adds configuration hooks to bound the number of state roots
that are permitted in state root batches. Specifically, the minimum
allows us to amortized the cost of adding state roots to the CTC
contract. Additionally, the maximum is used in place of the old limit
based on tx size, since this is more natural and mirrors the minimum
bound.
The maximum possible value should be less than 3750 to keep in line with
our conservative 120kb limit.
Metadata