-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(katana): set bouncer weight to max (#2367)
the `StatefulValidator` runs the full execution flow for `DeployAccount` (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 return `Transaction 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: https://github.com/dojoengine/dojo/blob/fc1f894de7c25faef290399d8c904b290033a729/crates/katana/executor/src/implementation/blockifier/utils.rs#L86-L91 in blockifier, the execute logic is duplicated on both `Transaction` and `AccountTransaction` structs. the execute logic in `Transaction` is the one that includes the block limit check, but based on above, we're calling the execute method of `AccountTransaction`. 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.
- Loading branch information
Showing
2 changed files
with
68 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters