Skip to content

Conversation

@prestwich
Copy link
Member

@prestwich prestwich commented Nov 7, 2025

No description provided.

@prestwich prestwich changed the title fix: move block env creation for host to sim task fix: move block env creation for host to env task Nov 7, 2025
Copy link
Contributor

@anna-carroll anna-carroll left a 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

Copy link
Contributor

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.
Learn more

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);
Copy link
Contributor

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),
Copy link
Contributor

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

@anna-carroll anna-carroll merged commit 84b510e into dylan/host-simulation Nov 7, 2025
5 of 6 checks passed
@anna-carroll anna-carroll deleted the prestwich/env-env-env-env branch November 7, 2025 18:56
Copy link
Contributor

Approved, we can merge this stack down into main and test for final release.

dylanlott pushed a commit that referenced this pull request Nov 7, 2025
* 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>
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