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

Keep response codes and revert metadata #17

Closed
wants to merge 6 commits into from

Conversation

sandhilt
Copy link
Contributor

Based on PR: #16

@guidanoli
Copy link
Contributor

guidanoli commented Jun 14, 2024

The prevRandao field has 32 bytes, so typing it as uint64 can be unsafe.
It's best to use a hex string instead.

@cartesi cartesi deleted a comment from Bankpenk Jun 16, 2024
@guidanoli
Copy link
Contributor

guidanoli commented Jun 17, 2024

Before the Merge, the 0x44 opcode (then called DIFFICULTY) used to push the current block difficulty onto the EVM stack, which could indeed fit into a uint64. However, post-Merge, this opcode was renamed as PREVRANDAO and now pushes the latest mixHash value, which is totally random, and will most likely overflow a uint64. See EIP-4399 for reference.

@sandhilt
Copy link
Contributor Author

Hello @guidanoli. Thank you for you feedback. I change prev_randao see here:
05965df

Feel free If need more changes.

rollup.yaml Outdated Show resolved Hide resolved
format: hex
pattern: "^0x([0-9a-fA-F]{64})$"
description: The latest RANDAO mix of the post beacon state of the previous block.
example: 1588598533000
Copy link
Contributor

@guidanoli guidanoli Jun 18, 2024

Choose a reason for hiding this comment

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

The example should be compatible with the property type, format, and pattern.
How about the PREVRANDAO value of the post-Merge Ethereum block?

"0xa86c2e601b6c44eb4848f7d23d9df3113fbcac42041c49cbed5000cb4f118777"

@sandhilt sandhilt closed this Jun 26, 2024
@sandhilt sandhilt deleted the fix/http-metadata branch June 26, 2024 14:36
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.

3 participants