-
Notifications
You must be signed in to change notification settings - Fork 0
fix: move block env creation for host to env task #169
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
Conversation
anna-carroll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only naming and comments thoughts
1d01ce0 to
31344da
Compare
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| HostEnv<HostAlloyDatabaseProvider, NoOpInspector>, | ||
| ) { | ||
| // Host DB and Env | ||
| let host_block_number = BlockNumber::from(sim_env.prev_host.number); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where the bug was. need to add 1 to the prev host header's block number
| BlockEnv { | ||
| fn construct_block_env(&self, previous: Header) -> Environment { | ||
| let env = BlockEnv { | ||
| number: U256::from(previous.number + 1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can see here, the rollup block env was being created by adding 1 to the previous header's number. by refactoring to move the host block env creation to use the same function, we fix the bug
|
Approved, we can merge this stack down into main and test for final release. |
* fix: move block env creation for host to sim task * rename vars to clearly distinguish between rollup and host (#170) * comment --------- Co-authored-by: Anna Carroll <anna-carroll@users.noreply.github.com> Co-authored-by: Anna Carroll <anna.s.carroll@gmail.com>

No description provided.