-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor L1 user deposit processing in x/rollup module #208
Refactor L1 user deposit processing in x/rollup module #208
Conversation
WalkthroughThe changes introduce a new function, Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review as they are similar to previous changes (1)
Additional comments not posted (1)
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
testutils/utils.go (1)
79-81
: The change partially addresses the past review comment, but consider covering more test cases.The explicit setting of the
Mint
field tobig.NewInt(100)
addresses the suggestion from the past review comment to set theMint
field directly in the test helper. However, the case whereMint
is nil is not covered, which was also mentioned in the past review comment.Consider the alternative approach suggested in the past review comment of using a random seed for every test. This could help test a wider range of deposit transaction variations and ensure the robustness of the code.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- builder/builder_test.go (2 hunks)
- testutils/utils.go (1 hunks)
- x/rollup/keeper/deposits.go (1 hunks)
- x/rollup/tests/integration/rollup_test.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/rollup/keeper/deposits.go
Additional comments not posted (3)
x/rollup/tests/integration/rollup_test.go (1)
44-47
: LGTM!The changes to derive
userAddr
from the sender ofdepositTx
and obtaindepositAmount
fromdepositTx.Mint()
are correct and more appropriate for handling Ethereum transactions.builder/builder_test.go (2)
314-324
: LGTM!The code changes look good:
- The
Mint()
method is correctly used to retrieve the deposit amount.- The sender's address is correctly retrieved using the
Sender()
method of the signer.- The deposit and withdrawal transactions are correctly included in the block payload.
351-351
: LGTM!The deposit transaction result is correctly verified by checking the
MintEth
event attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, left a few small nits. I'll wait for @joshklop's chain config question to be addressed before approving
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
e2e/stack_test.go (1)
262-262
: Simplification of deposit transaction amount. Consider future test cases.The change simplifies the deposit transaction by setting the deposit amount to zero. This may impact how deposits are processed downstream.
In light of the removed comment hinting at a future pivot from the
Value
field to aMint
field, consider proactively adding test cases that cover scenarios with and without aValue
field. This will help ensure a smooth transition when the pivot occurs.
24f90d5
to
6b3f0e7
Compare
61eafdd
to
a4d7db3
Compare
Partially fixes #205
Summary by CodeRabbit
New Features
Bug Fixes