fix: use normal getter for chain tree#2060
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36daeffc8f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| /// @dev On L1, these are empty leaves and are populated only during the addition of the chain | ||
| /// are not updated thereafter. | ||
| mapping(uint256 chainId => DynamicIncrementalMerkle.Bytes32PushTree tree) public chainTree; | ||
| mapping(uint256 chainId => DynamicIncrementalMerkle.Bytes32PushTree tree) internal chainTree; |
There was a problem hiding this comment.
Preserve
chainTree(uint256) ABI on MessageRoot upgrades
Changing chainTree from public to internal removes the previously exposed selector chainTree(uint256) (0x2c3addb8) from MessageRootBase and its inheritors, so any existing indexer, script, or contract integration still calling that selector will start reverting immediately after the upgrade. Adding getChainTree(uint256) introduces a new API but does not maintain backward compatibility for already-deployed consumers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
It was added only to v31 which is not finalized, so it's okay
|
Coverage after merging normal-getter-for-chain-tree-draft-v31 into draft-v31 will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What ❔
use normal getter for chain tree
Why ❔
auto-generated public mapping getter doesn't return struct's arrays
Checklist