-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rosetta Implementation Cleanup (Stage 3 of Node API Overhaul) #3390
Merged
Daniel-VDM
merged 17 commits into
harmony-one:main
from
Daniel-VDM:rosetta-tx-format-refactor
Oct 17, 2020
Merged
Rosetta Implementation Cleanup (Stage 3 of Node API Overhaul) #3390
Daniel-VDM
merged 17 commits into
harmony-one:main
from
Daniel-VDM:rosetta-tx-format-refactor
Oct 17, 2020
Conversation
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
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Move TestNewAccountIdentifier & TestGetAddress to account_test.go Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Move Respective unit tests to own files * Expose GetOperations & GetStakingOperations * Expose FormatTransaction, FormatCrossShardReceiverTransaction, FormatGenesisTransaction, FormatPreStakingRewardTransaction & FormatUndelegationPayoutTransaction Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Make docs consistent for mempool.go Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* This is in anticipation of HRC20 token support with rosetta * Rename various native operation functions accordingly * Add documentation to explain what a native token is Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Move getPreStakingRewardTransactionIdentifiers to block_special.go * Add epoch to block metadata * Update unit tests Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
LeoHChen
approved these changes
Oct 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general. Good you catch the issue using tool.
Daniel-VDM
force-pushed
the
rosetta-tx-format-refactor
branch
from
October 16, 2020 00:46
0cba857
to
7587bcb
Compare
LeoHChen
approved these changes
Oct 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two minor function calls.
rlan35
reviewed
Oct 16, 2020
rlan35
reviewed
Oct 16, 2020
rlan35
approved these changes
Oct 16, 2020
* Refactor all uses of length check `ShardState` * [hmy] Refactor IsCommitteeSelectionBlock to use chain.IsCommitteeSelectionBlock * Address PR comments Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Daniel-VDM
force-pushed
the
rosetta-tx-format-refactor
branch
from
October 16, 2020 20:11
7587bcb
to
1cfff86
Compare
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stage 3 Cleanup of Node API Overhaul
This PR clean's up the Rosetta implementation for the initial release. A large part of this PR is just moving functions/methods/tests around and putting useful util functions deeper into the codebase.
I've also fixed a bug in the pre-staking era block reward calculation. Essentially the calculation needs to be processed in the order of the committee slots to handle some floating-point precision rounding. I've noted that this order is important in the fix. This error was caught using the rosetta-CLI (thx god for that tool 😄 ).
Lastly, I've renamed all of the transfer operations to native transfer operations where applicable. This is in anticipation of integrating HRC20 tokens to rosetta's data & construction API at some point down the line.