Closed m-Peter closed 1 month ago
The changes involve updates to the blockchain API to include a Miner
field in the block response, reflecting the address of the miner who produced the block. Additionally, the PrevRandao
field was added to the block data structure in event handling. Dependency updates were made to ensure compatibility with newer versions of libraries, and test cases were improved to validate these changes.
Files | Change Summary |
---|---|
api/api.go |
Added Miner field to prepareBlockResponse function to include the miner's address. |
models/block.go |
Introduced PrevRandao field in the returned Block structure and backward compatibility handling in NewBlockFromBytes . |
models/block_test.go , models/events_test.go |
Enhanced tests by adding PrevRandao to block structures, updating expected hash values, and modifying the newBlock function for additional parameters. |
go.mod , tests/go.mod |
Updated various dependencies to newer versions for stability and compatibility improvements. |
tests/web3js/eth_non_interactive_test.js |
Modified assertions to include checks for block.size and added verification for the block.miner field. |
Objective | Addressed | Explanation |
---|---|---|
Empty miner field on eth_getBlockByNumber (#454) |
β | |
Ensure PrevRandao field is included in block data |
β | |
Update tests to validate miner address | β |
π° In the meadow where code does bloom,
Changes sprout and dispel the gloom.
A miner's address now shines so bright,
Validating blocks with newfound light.
Jumping through tests, we dance in delight! πΌβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
We should add logic for backward compatibility. Best, if you make it part of this PR
We should add logic for backward compatibility. Best, if you make it part of this PR
I have added such a logic in this commit: https://github.com/onflow/flow-evm-gateway/pull/463/commits/5b33fe18c01fda9e615ebe0330465c1081a1296a.
But now that we're in testnet
, these changes are no longer temporary, as was the case with previewnet
. Because we have to support them for as long as testnet
is running :sweat_smile:
Let me know if you have some alternative solution in mind.
Closes: https://github.com/onflow/flow-evm-gateway/issues/454
Description
Note: The version bump of the
flow-go
dependency, comes with a backwards incompatible change on the block hash calculation. If we want to deploy this change ontestnet
, we'll have to add some custom logic to accommodate that breaking change.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Miner
field to block response, providing crucial miner address information.PrevRandao
field in block events for enhanced event tracking.Block
structure with a newhash
field and a method to return the block's hash.Miner
field and updated block sizes.Bug Fixes
Chores