Skip to content

Conversation

@ahsan-javaiid
Copy link
Contributor

Description

  • Includes Rootstock testnet in workaround due to missing block.prevrandao (mix_hash) field in block header
  • Rootstock (Bitcoin sidechain) is EVM-compatible but operates under a different consensus mechanism due to which mix_hash / block.prerandao semantics does not apply on Rootstock

Why

Merging this PR will successfully fix the following error:

[⠊] Compiling...
No files changed, compilation skipped
Error: Failed to deploy script:
EVM error; header validation error: `prevrandao` not set

Merging this PR will unblock developers to use latest foundry version with Rootstock testnet as Rootstock supports the EVM version (cancun) which is default version in foundry with the exception of prevrandao semantics which does not apply on rootstock network.

Previously this fix was applied in this pull request: #10279

@ahsan-javaiid ahsan-javaiid changed the title Force prevrandao on Rootstock network Force prevrandao on Rootstock testnet May 23, 2025
Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

Ref: https://github.com/foundry-rs/foundry/pull/10279/files this applied it to Rsk mainnet, this PR does it for Rsk testnet too

@zerosnacks zerosnacks merged commit 12c1178 into foundry-rs:master May 23, 2025
22 checks passed
@19-xiaogao
Copy link

If all the chains that do not support this setting need to submit a pr, do they all need to do so?
I have now set up a chain, which makes it impossible for me to deploy the contract using foundry.
How can I bypass this setting?

@grandizzy
Copy link
Collaborator

If all the chains that do not support this setting need to submit a pr, do they all need to do so? I have now set up a chain, which makes it impossible for me to deploy the contract using foundry. How can I bypass this setting?

@19-xiaogao we're going to add config to bypass prevrandao with #12124 so no PR needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants