This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes # .
Motivation
Error in Baobab check:data:
Reconciliation failed for
0xB2bd3178AFFCcD9F9F5189457f1Cad7D17A01c9D
at102775656
computed:
85417893214482613665126234KLAY
live:
85417893214482613665126235KLAY
The previous problem occurred because rosetta-klaytn calculates feeReward in units of transactions.
if there is two transactions which have 20 peb fee reward for each, klaytn calculates the reward as
CNreward : 40 * 0.34 = 13.6 -> 13
KIRreward : 40 * 0.54 = 21.6 -> 21
KGFReward : 40-13-21 = 6
but formal rosetta-klaytn calculates the reward as
CNreward : (20 * 0.34 = 6.8 -> 6) * 2 -> 12
KIRReward : (20* 0.54 = 10.8 ->10) *2 -> 20
KGFReward : (20-6-10 -> 4) *2 -> 8
This problem occurs after Magma hardfork (Since the basefee can no longer be in ston units... )
Solution
Changed the rosetta-klaytn fee operation method to the same method as Klaytn reward distributor
Open questions