Add functions to collect executed transactions fee in details;#178
Add functions to collect executed transactions fee in details;#178mergify[bot] merged 7 commits intomasterfrom
Conversation
074d264 to
3fcc31a
Compare
apfitzge
left a comment
There was a problem hiding this comment.
Could you explain the motivation for why the bank should be aware of the details of collection at all?
It seems all we need from the bank variable is to accumulate reward into a u64 so it can be distributed at the end of slot. In that case, why not simply use a (atomic)u64 for the accumulation?
For SIMD-0096, how fee is distributed at the end of bank is different based on fee "type". Transaction Fee will be 50% rewarded 50% burnt, and Priority Fee will be 100% rewarded. For that, bank has to keep collected fees in different buckets. Fee distribution changes are in next PR (preview). |
I understand we have to distribute them differently based on type. But that can be done at transaction level, the bank only needs to be aware of the reward at the end of the slot. Basically my question is why does the bank need to be aware of the details and not just the result, i.e. reward. edit: I see now - it's because we do not update total capitalization changes until end of slot. Change to capitalization will depend on the burn rate, so we need the details unless we moved capitalization update by fee into transaction committing. |
|
planning on adding tests? |
Yes 💪🏼, one last thing to address from Andrew's last review. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #178 +/- ##
========================================
Coverage 81.9% 81.9%
========================================
Files 838 838
Lines 226927 227067 +140
========================================
+ Hits 185918 186049 +131
- Misses 41009 41018 +9 |
7aa681a to
ca0ae44
Compare
apfitzge
left a comment
There was a problem hiding this comment.
Think we need to discuss the rounding; it seems to be a blocker for this style of accumulation.
I previously expressed my thought on accumulating only reward instead of fee, which I pointed out will not work due to the capitalization update.
Alternatively we could still accumulate 2 variables: reward, burn.
This would let us update capitalization correctly at the end of the slot using burn.
I think that would also let us move forward with this change without blocking on the rounding feature.
wdyt?
|
@lheeger-jump Do you have time to check this one out? I'd like to merge this so can put next one out, which distributes collected |
…ails from PartialEq
43b8180 to
f59c93d
Compare
Originally written by Andrew Fitzgerald <apfitzge@gmail.com> on Wed Aug
9 14:57:55 2023 -0700.
Previous version:
commit 86a2b8f8aa19e606bd6396dfdbc6f35950b23ee9
Author: Andrew Fitzgerald <apfitzge@gmail.com>
Date: Wed Aug 9 14:57:55 2023 -0700
Spawn adversarial and normal banking stages (anza-xyz#113)
Rewritten to match the upstream scheduler code as of anza-xyz#5467 by Illia
Bobyr <illia.bobyr@anza.xyz>.
This change includes all of the following changes:
---
Author: Illia Bobyr <illia.bobyr@solana.com>
Date: Mon Oct 2 14:03:46 2023 -0700
adversary: test_scheduler => attack_scheduler (anza-xyz#175)
We mostly talk about attacks, when we discuss the functionality this
code supports. Considering that we have a lot of other kinds of tests,
it seems a bit clearer to call use "attack" in this part of the code.
Author: Illia Bobyr <illia.bobyr@solana.com>
Date: Tue Oct 3 15:21:33 2023 -0700
adversary: test_generators => transaction_generators (anza-xyz#178)
We mostly talk about "attacks" rather than "tests" in this part of the
code. And even the main type in the `test_generators` module is called
`TransactionGenerator`.
Author: kirill lykov <kirill.lykov@solana.com>
Date: Thu Feb 8 10:52:48 2024 +0100
replay: atomicbool instead of singleton for dropping packets (anza-xyz#224)
* use atomicbool instead of singleton to drop packets
* add use for Ordering
Co-authored-by: Illia Bobyr <ilya.bobyr@gmail.com>
Signed-off-by: kirill lykov <lykov.kirill@gmail.com>
* rename drop_packets
---------
Signed-off-by: kirill lykov <lykov.kirill@gmail.com>
Co-authored-by: Illia Bobyr <ilya.bobyr@gmail.com>
Author: Brennan <brennan.watt@anza.xyz>
Date: Fri Mar 22 06:45:29 2024 -0700
remove dead code (anza-xyz#298)
Author: Andrew Fitzgerald <apfitzge@gmail.com>
Date: Tue Jul 16 14:49:59 2024 -0500
AdversarialBankingStage: Remove warning (anza-xyz#370)
Remove warning. Adjust names
Problem
Working bank should be able to collect executed transactions's fee in detail, separating transaction_fee (half burnt) and prio fee (100% rewarded).
Summary of Changes
Fixes #