-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sequencer)!: rework all fees (#1647)
## Summary Gutted all current fee handling and replaced all with single fee calculation method in new trait. ## Background This implementation will simplify not only our fee calculation, but the process for adding new actions in the future. ## Changes - Created `FeeComponents` types for all fee-bearing transactions which all have a base fee component and a computed cost multiplier component. - Moved all fee checks and payment to one single function within the new sequencer fees component. Fee calculation is now always the following formula: `base_fee + computed_cost_base * computed_cost_multiplier` - Moved all state reads/writes for fees to the new fees component. - Initialized all fees in the fee component's `init_chain()`. - Changed `FeeChange` to be an enum which takes any fee-bearing action's fee components. - Moved `FeeChange` and `FeeAssetChange`'s `ActionHandler` impls to the fees component. - Allowed fee assets now stored in verifiable storage instead of non-verifiable. ## Testing All previous tests passing, added new tests for all state fee reads/writes. ## Breaking Changelist - Changed shape of `FeeChange` action. - Added storage of all the action fees, breaking the app hash. - Changed app genesis. - Removed a bunch of storage keys, breaking these snapshot tests - Allowed fee assets moved from non-verifiable to verifiable storage. ## Related Issues closes #1369 closes #1145 --------- Co-authored-by: Richard Janis Goldschmidt <github@aberrat.io> Co-authored-by: Fraser Hutchison <fraser@astria.org> Co-authored-by: Jordan Oroshiba <jordan@astria.org>
- Loading branch information
1 parent
10441af
commit b677ce9
Showing
118 changed files
with
7,209 additions
and
3,409 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.