* [rosetta] Make nonsensical native tx construction error
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Refactor native constant names to match value
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Remove hex address comparison
This is done since the hex address in the metadata is more of a
QOL feature, all that matters is the b32 address.
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix error message for incorrect signed tx parse
* Add check for sender address when parsing unsigned tx
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Make bad signature error message clearer
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add shard ID check when combining transactions
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add shard ID check for tx Hash & Submission
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix invalid signature type err msg
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add shard check for tx parse
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add check for shard ID when creating Tx payload
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Update to v1.4.6 of rosetta SDK
* Set rosetta release version
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rpc] Expose DoEVMCall
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix contract related operations
* Make contract creation be a 2 operation pair, with contract addr as receiver
* Add Contract address to all transaction metadata that involving contract operations
* Update construction API to include framework for contract functionality
* Update tests
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix imports
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix construction metadata check for contracts
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [ntp] Make TestCheckLocalTimeAccurate fault tolerant
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix nil block ptr crash & generalize getBlock
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Correct error type for account rosetta errors
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
For view change, the view change ID is the key to determine which node
will be next leader. In our original algorithm, the view ID always increased one step
at a time. The view change period increased exponetially based on the square of
the gap between current view changing ID and previous known block view change ID.
However, it is very slow to converge the view change if multiple nodes are offline and
view change can't be reached. Especially, during the shard down event, multiple nodes
are offline and other nodes have advanced their current view changing ID.
The new time-baed synchronuous view change algorithm uses the local timestamp and
the timestamp of the block to calculate the expected view changing ID. In this case,
offline nodes can immediately catch up with the latest view changing ID as long as
the offline nodes have the latest sync'ed block and relatively acturate local
clock. This algorithm will converge the view change faster in one or two view change
duration.
Signed-off-by: Leo Chen <leo@harmony.one>
* [rosetta] Fix pre-staking rewards with GetPreStakingBlockRewards
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor GetDetailedBlockSignerInfo to use availability
* Add GetPreStakingBlockRewards with cache
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix prestaking block reward unit tests
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Report tx fees of coinbase for prestaking rewards
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>