You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1305 added fee reporting by way of get_and_increase_block_fees(), which was fixed in #1343 by adding a call to this function in all actions which require fees. This setup requires passing ABCI events all the way through to finalize_block(), where the events are retroactively placed into ExecTxResults. We should rework this such that the result Txs are constructed at a lower level and passed back through the execution calls to finalize_block().
Note: this should only be done after #1332 is merged
## 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#1369closes#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>
Issue
#1305 added fee reporting by way of
get_and_increase_block_fees()
, which was fixed in #1343 by adding a call to this function in all actions which require fees. This setup requires passing ABCI events all the way through tofinalize_block()
, where the events are retroactively placed intoExecTxResult
s. We should rework this such that the result Txs are constructed at a lower level and passed back through the execution calls tofinalize_block()
.Note: this should only be done after #1332 is merged
Relevant Code
Fee reporting in
get_and_increase_block_fees
astria/crates/astria-sequencer/src/assets/state_ext.rs
Line 208 in c5364e8
astria/crates/astria-sequencer/src/assets/state_ext.rs
Line 231 in c5364e8
Construction of fee event
astria/crates/astria-sequencer/src/assets/state_ext.rs
Lines 50 to 63 in c5364e8
Construction of
ExecTxResult
from ABCI eventastria/crates/astria-sequencer/src/app/mod.rs
Lines 817 to 820 in c5364e8
┆Issue Number: ENG-718
The text was updated successfully, but these errors were encountered: