-
Notifications
You must be signed in to change notification settings - Fork 165
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
fix(katana): set bouncer weight to max #2367
Conversation
WalkthroughOhayo, sensei! The recent changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OpenZeppelinAccountFactory
participant StarkNet
participant Contract
User->>OpenZeppelinAccountFactory: Request account deployment
OpenZeppelinAccountFactory->>StarkNet: Deploy account transaction
StarkNet->>Contract: Interact with deployed contract
Contract-->>StarkNet: Return transaction receipt
StarkNet-->>OpenZeppelinAccountFactory: Confirm deployment
OpenZeppelinAccountFactory-->>User: Notify account deployment success
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (2)
Additional comments not posted (4)
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
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2367 +/- ##
==========================================
+ Coverage 67.49% 67.65% +0.15%
==========================================
Files 359 359
Lines 46965 46927 -38
==========================================
+ Hits 31698 31747 +49
+ Misses 15267 15180 -87 ☔ View full report in Codecov by Sentry. |
the
StatefulValidator
runs the full execution flow forDeployAccount
(as opposed to just the validation logic), the execution flow include a 'block limit' check and because currently we're setting the block limit to zero, executing a deploy account tx using the validator, will always returnTransaction size exceeds the maximum block capacity.
error.why this doesn't affect normal execution (ie
BlockExecutor
's execution) ? bcs of the 'execute' function we're calling here:dojo/crates/katana/executor/src/implementation/blockifier/utils.rs
Lines 86 to 91 in fc1f894
in blockifier, the execute logic is duplicated on both
Transaction
andAccountTransaction
structs. the execute logic inTransaction
is the one that includes the block limit check, but based on above, we're calling the execute method ofAccountTransaction
.This is the 'execute' we're using in
BlockExecutor
:https://github.com/dojoengine/blockifier/blob/031eef1b54766bc9799e97c43f63e36b63af30ee/
crates/blockifier/src/transaction/account_transaction.rs#L635
and this is the one used in stateful validator:
https://github.com/dojoengine/blockifier/blob/08ac6f38519f1ca87684665d084a7a62448009cc/crates/blockifier/src/transaction/transaction_execution.rs#L155-L190
so the fix is to just naively increase the block limit to max. considering we're not using this in our execution path, this change is fine. even once we include it, at this point we dont really care about block limit, so keeping it at max is still fine.
the
deploy_account
test doesn't directly test for the block limit values, but its still a good test to have so imma keep that in.