* Add ethereum transaction support
* fix fmt
* fix lint
* add new block body fork logic
* add back deleted code
* lower case block version const
* add eth txn into new version of block
* refactor back
* refactor more
* fix test code
* Fix build
* Fix build
* revert eth txn in block and block proposal
* fix build
* fix build
* fix build
upstream to the following version
----
commit 0a3993c558616868e35f9730e92c704ac16ee437
Author: yumiel yoomee1313 <yumiel.ko@groundx.xyz>
Date: Wed Dec 30 21:10:11 2020 +0900
accounts/abi/bind: fix erroneous test (#22053)
closes#22049
Signed-off-by: Leo Chen <leo@harmony.one>
upstream to the following version
----
commit 0a3993c558616868e35f9730e92c704ac16ee437
Author: yumiel yoomee1313 <yumiel.ko@groundx.xyz>
Date: Wed Dec 30 21:10:11 2020 +0900
accounts/abi/bind: fix erroneous test (#22053)
closes#22049
Signed-off-by: Leo Chen <leo@harmony.one>
upstream to the following version
----
commit 0a3993c558616868e35f9730e92c704ac16ee437
Author: yumiel yoomee1313 <yumiel.ko@groundx.xyz>
Date: Wed Dec 30 21:10:11 2020 +0900
accounts/abi/bind: fix erroneous test (#22053)
closes#22049
Signed-off-by: Leo Chen <leo@harmony.one>
* Add ethereum transaction support
* fix fmt
* fix lint
* add new block body fork logic
* add back deleted code
* lower case block version const
* add eth txn into new version of block
* refactor back
* refactor more
* fix test code
* Fix build
* Fix build
* [rosetta] Fix staking + plain tx receipt fetch
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add receipt check error catch
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix special case ID check
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix receipt check error catch
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* greatly simplified the node.sh to remove the legacy code
* mainly used to download latest harmony binaries
* added signature verification using gpg
* add ethrelay/btcrelay placeholder
Signed-off-by: Leo Chen <leo@harmony.one>
* [node] graceful shutdown validator and leader
when leader/validator is in commit phase, wait until it finishes the consensus
before shutdown the node.
This is useful for node upgrade to avoid unexpected blockchain state.
Signed-off-by: Leo Chen <leo@harmony.one>
* [node] stop block proposal service on leader
Signed-off-by: Leo Chen <leo@harmony.one>
* [node] warn on block proposal stopped
Signed-off-by: Leo Chen <leo@harmony.one>
Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
* [rosetta] Refactor operations & prep for internal tx exposure
* Remove gas op relation for tx operations. Gas is for submission & processing
the tx, thus not really related to the amount being transferred
* Make optional starting op a ptr to a uint to keep consistent
* Reorg file for consistency of fn placement
* Rename functions for clarity
* Make getContractCreationNativeOperations consume getBasicTransferOperations for consistency
* Remove invariant doc as it does not apply anymore
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add framework for parsing traced txs
* Define ContractInfo struct for FormatTransaction
* Add tx trace helper function defs & propagate type defs
* Add a GetTransactionStatus helper fn for Operation formatting/creation
* Add wrapper function, getContractTransferNativeOperations, to get internal operations
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Implement transaction tracer
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [tracer] Add CallerAddress & CodeAddress to tracer logs
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [tracer] Remove ptr to slice & map in StructLogRes
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Implement getContractInternalTransferNativeOperations
* Add ContractAddress to ContractInfo for future usages (i.e: erc20 parsing)
* Only check for contract address if there is tx data in BlockTransaction
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix status report for contract related txs
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [tracer] Expose contract address instead of code address
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add trace cache & update TODO
* Trace any PLAIN transaction instead of only transactions with data.
This is to account for fall back contract fn calls & ignore staking data.
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Make internal tx formatter not return err on nil exec result
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Fix lint
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix tests
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add internal tx unit tests
* Fix tx data len check for contract related transfers as a transaction with len 0
data can happen for a contract (and fail) due to fall back operations.
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Update invariant comment
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Expose mutually exclusive ops + update docs & tests
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix docs and err msgs
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Add 3s block time and change of block reward
* fixes
* add new blocks per epoch for testnet
* remove unused code
* fix 2s changing logic
* enable 2s at epoch 73000 at testnet