cartesi / openapi-interfaces

HTTP interfaces specified with OpenAPI.
Apache License 2.0
2 stars 7 forks source link

Keep response codes and revert metadata #17

Closed sandhilt closed 4 months ago

sandhilt commented 4 months ago

Based on PR: https://github.com/cartesi/openapi-interfaces/pull/16

guidanoli commented 4 months ago

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

guidanoli commented 4 months ago

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 commented 4 months ago

Hello @guidanoli. Thank you for you feedback. I change prev_randao see here: https://github.com/cartesi/openapi-interfaces/pull/17/commits/05965df6d99e331bf8fa9316da2aeb444a77fb41

Feel free If need more changes.