Closed natebeauregard closed 1 month ago
This pull request introduces significant enhancements to the MonomerClient
and OPStack
functionalities, including the addition of a gethclient
field and a new GetProof
method for retrieving account proofs. Changes to transaction management streamline the configuration process, and test coverage for the GetProof
method is improved. The eth/get_proof.go
file is refactored to support flexible block references, and new struct types for results are introduced in the API. Overall, the modifications aim to improve modularity, usability, and maintainability.
Files | Change Summary |
---|---|
e2e/clients.go, e2e/op_stack.go | - Added gethclient field and GetProof method to MonomerClient . - Introduced newTxManagerConfig method for transaction manager configuration in OPStack . - Enhanced private key retrieval using hdwallet . |
eth/eth_test.go | - Updated TestGetProof to use rpc.BlockNumberOrHash for the block number parameter. |
eth/get_proof.go | - Refactored GetProof method to accept rpc.BlockNumberOrHash . - Introduced getState method for block state retrieval. - Migrated AccountResult and StorageResult types to ethapi package. |
eth/internal/ethapi/api.go | - Added AccountResult and StorageResult structs for structured data representation. |
go.mod | - Added dependency on github.com/ethereum-optimism/go-ethereum-hdwallet at version v0.1.3 . |
sequenceDiagram
participant Client as MonomerClient
participant Geth as gethclient.Client
participant ProofProvider as ProofProvider
participant StateDB as StateDB
Client->>Geth: Initialize with rpc.Client
Client->>ProofProvider: Call GetProof(address, keys, blockNrOrHash)
ProofProvider->>StateDB: Retrieve state for blockNrOrHash
StateDB-->>ProofProvider: Return state data
ProofProvider-->>Client: Return AccountResult, StorageResult
Objective | Addressed | Explanation |
---|---|---|
Fix proposer config in e2e test (#190) | ✅ | |
Add test coverage for eth_getProof (#195) | ✅ | |
Return pointer type from ProofProvider.getState (#110) |
✅ |
GetProof
and transaction management may indirectly help with rollbacks during e2e tests by improving the configuration.🐇 In the meadow where bunnies play,
New features hop in, brightening the day.
With proofs and clients, oh what a sight,
Code's now more clever, and testing feels right!
Let's dance with joy, for changes are here,
Hopping along, spreading good cheer! 🌼
[!TIP]
New features
Walkthrough comment now includes: - Possibly related PRs: A list of potentially related PRs to help you recall past context. - Suggested labels: CodeRabbit can now suggest labels by learning from your past PRs. You can also provide custom labeling instructions in the UI or configuration file. Notes: - Please share any feedback in the [discussion post](https://discordapp.com/channels/1134356397673414807/1282535539299323995) on our Discord. - Possibly related PRs, automatic label suggestions based on past PRs, learnings, and possibly related issues require data opt-in (enabled by default).
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?
Closes https://github.com/polymerdao/monomer/issues/190
Best to review commit by commit to make the review as easy as possible
eth_getProof
implementation to correctly generate proofs by block number and block hash and removes all client logic for callingeth_getProof
fromget_proof.go
eth_getProof
in e2e tests toclients.go
Summary by CodeRabbit
New Features
MonomerClient
to support account proof retrieval with a newGetProof
method.OPStack
for improved transaction handling.GetProof
method to accept block numbers or hashes.Bug Fixes
Documentation
Chores