-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Changed behavior of the balances.Deposit events with kusama runtime 9122 #4230
Comments
This was introduced by paritytech/substrate#9425 (duplicate events will be addressed by #4180) |
So, can this be closed @TheGoldenEye ? |
@apopiak @bkchr paritytech/substrate#9425 Can replace it with another event? After this pr merge, I cannot simply use |
I've found the following solution: |
btw, additional I check the accountId of balances.Deposit event, should be the id of block author |
So to recap, right now, there are:
To get the full fees of a block I would suggest you:
You should be able to match this amount against the corresponding amount withdrawn from the account sending the transaction (there is a corresponding |
This will only work for one transaction, FYI.
The blue events are created by the balance movements induced by the staking rewards. |
only
we consider the events of one transaction, so no problem I have picked out all the relevant events for Extrinsic 9874887-2
What is the reason for event 9874887-171? Without this the amount of event 9874887-12 should be 115666534. (the fee paid) |
Both of those are correct and should give the same result.
It is a refund to the sender of the transaction because the final fee is lower than the initial fee.
Yes, filtering might get complicated in edge cases; should be possible, though. My sense is that we've covered the changed behavior. Good to close? |
Yep, good to close. Thx @apopiak |
In my tool (https://github.com/TheGoldenEye/polka-store) so far I've calculated the fee paid by the extrinsic sender (signer) from balances.Deposit and treasury.Deposit events (feePaid=balances.Deposit+treasury.Deposit)
This was working good until kusama runtine 9111. See example https://kusama.subscan.io/event?extrinsic=9866349-4
Starting with runtime 9122 there are now much more balances.Deposit events. Seems (for payout_stakers calls) each staking.Rewarded event has a corresponding balances.Deposit event now. So my fee calulation breaks.
See example https://kusama.subscan.io/event?extrinsic=9874887-2. My calculated fee is 3.75 KSM (same is shown in subscan as fee for Extrinsic#9874887-2), but this cannot be right)
I saw the new balances.withdraw event, how to interpret this? Maybe this is (part of) the fee (paid by the sender) I'm looking for?
The text was updated successfully, but these errors were encountered: