Closed sideninja closed 1 month ago
The recent changes across the codebase focus on streamlining blockchain management, simplifying configuration handling, and enhancing error reporting. Temporary structures and legacy code have been removed, indicating a shift towards a more stable implementation. Key modifications include the elimination of outdated block version handling and adjustments in transaction unmarshalling, all aimed at improving code clarity and reliability while ensuring a more robust blockchain API.
Files | Change Summary |
---|---|
api/api.go |
Modified block handling logic in GetBlockByNumber and removed timestamp fixes from prepareBlockResponse , simplifying data preparation and improving clarity. |
bootstrap/bootstrap.go |
Removed temporary assignment of DirectCallHashCalculationBlockHeightChange , indicating a change in variable management. |
config/config.go |
Removed HashCalculationHeightChange field and its command-line flag, streamlining configuration. |
models/block.go |
Eliminated multiple block versions and outdated decoding logic, removed Hash method, revised constants, simplifying block management and error handling. |
models/receipt.go |
Removed StorageReceiptV0 struct and its conversion method, reflecting a design shift and streamlining code. |
models/transaction.go |
Simplified DirectCall by removing blockHeight , adjusting hashing logic, and updating unmarshalling functions for cleaner implementation. |
models/transaction_test.go |
Updated tests to reflect changes in UnmarshalTransaction , removing complex scenarios related to DirectCallHashCalculationBlockHeightChange . |
storage/pebble/receipts.go |
Streamlined receipt decoding logic and improved error handling, removing outdated code related to older receipt formats. |
storage/pebble/transactions.go |
Removed logic fetching EVM height in transaction retrieval, simplifying unmarshalling behavior. |
tests/helpers.go |
Reformatted configuration struct for improved readability without altering functionality. |
tests/web3js/eth_non_interactive_test.js |
Removed timestamp assertion in tests, indicating a change in validation logic for block properties. |
sequenceDiagram
participant API
participant Block
participant Transaction
API->>Block: Request Block Data
Block-->>API: Return Block Data
API->>Transaction: Unmarshal Transaction
Transaction-->>API: Return Unmarshalled Transaction
API-->>Client: Send Response
π "In the meadow where code does play,
Changes hop along, brightening the day.
With legacy structures now out of sight,
The path ahead feels wonderfully right!
Simplifications bloom, errors take flight,
In this code garden, all feels just right!"
πΌβ¨
[!WARNING]
Review ran into problems
Problems (1)
* Git: Failed to clone repository. Please contact CodeRabbit support.
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?
DO NOT MERGE
This branch prepares the codebase for test net launch.
Most importantly it removes all the code that was used to handle breaking changes on previewnet.
This branch should be only merged when we create a special branch for preivewnet, this will be done at the time of testnet launch.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor