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

feat: replace sequence and confirmBy with hostBlockNumber #48

Merged
merged 5 commits into from
Jul 1, 2024

Conversation

anna-carroll
Copy link
Contributor

@anna-carroll anna-carroll commented Jun 28, 2024

Linear ticket

Motivation

The node will mine one RU block per host block.

Solution

As such, we can remove the sequence number (that tracks the rollup block number and ensures blocks are mined in correct order) and the confirmBy field (that ensures blocks are mined by a certain time).

We can replace these fields with a hostBlockNumber field (that ensures that the rollup block is mined in the exact specified host block, encapsulating block ordering, block numbers, and expiration times within one field).

As a convenience, we will also store the deployBlockNumber - the host block number at which the contract was deployed. Rollup block numbers can be derived from this value.

@anna-carroll anna-carroll self-assigned this Jun 28, 2024
.gas-snapshot Outdated
ZenithTest:test_notSequencer() (gas: 34145)
ZenithTest:test_onePerBlock() (gas: 68700)
ZenithTest:test_submitBlock() (gas: 61119)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice reduction in gas costs

@anna-carroll anna-carroll merged commit 269ddd7 into main Jul 1, 2024
1 check passed
@prestwich prestwich deleted the anna/sequence branch September 11, 2024 17:21
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.

2 participants