* [rosetta] Add server stop
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Make network naming consistent
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Correct common package name & add error enum
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Remove needless forward of network info to services
* Implement /network/list
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Refactor errors & add operation statuses and types
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Implement NetworkOptions & update NetworkAPIService
* Rename *_service.go files to remove the suffix
* Update StartServers to use new operation types
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Impl NetworkStatus - Finish init impl of /network endpoint
* Fix import structure for rosetta.go
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [test] Make explorer run as archival for localnet
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add unit tests
* Force errors to remain the same with unit tests
* Force operations to remain the same with unit tests
* Ensure network checking works for all cases with unit tests
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add InvalidNetworkError and correct error codes
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add UnmarshalFromInterface for SubNetworkMetadata
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add network checking
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Nit fixes & add unit test for Peer Info
* Make names consistent
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add BlockNotFoundError & TransactionNotFoundError
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Implement skeleton for block transactions
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add ReceiptNotFoundError
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add receipt to formatTransaction sig for contract fails
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add currency, ExpendGasOperation, & ContractCreationOperation
* Add Error creator
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Init impl of plain transaction formatting
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Update network.go for new error constructor
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Implement stx formatter & refactor BlockTransaction
* Updated todo comments & function formatting
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Impl Block & make currency non-ptr for easy copy with custom metadata
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix collect rewards amount on transaction fetch
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix block look-up edge case & add recovery middleware
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add bocks unit tests
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix checkPeerID unit test in network_test.go
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix staking tx amount for tx ops & update inline docs
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix lint
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Refactor getStakingOperations
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix undelegate value
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Nit - fix formatting for network.go
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [node] Move genesis allocation to core & remove unused ContractDeployerKey
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix precision error & add cx receipt hash on blk fetch
* Add unit tests for supporting helper functions
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix fmt
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix cx receipt hashes for blocks
* Print stack trace on panic recovery
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [node] Nit - fix comment for StopRosetta
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [node] Expose GetMaxPeerHeight
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add SyncStatus enum
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Nit - remove redundant 'service' name in services namespace
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Add server with example block & network services
* Update go.mod for rosetta SDK
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [internal/configs] Add RosettaServer to node config
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Add rosetta port flag
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [node] Add rosetta server start & rename api.go
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Change server start to use nodeconfig of rosetta
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Cleanup debugging prints
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix stdout print & document placeholders
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix lint & make StartSevers more consistent
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Disable rosetta by default
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [test] Make explorer deploy rosetta server
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Use direct http server for start
* Make go.mod changes minimal
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix fmt
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix fmt of go.mod
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Use port 9700 instead of 10000
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Bump config version
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Add v1.0.0 config backwards compatibility test
* Included update message if old config is loaded
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [test] Do not broadcast invalid tx on localnet
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Correct for invalid port when loading old config
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Make rosetta variable names consistent
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
This is a big PR merged many small commits together.
We add the message validation function in libp2p layer.
In the validation function, we check the following conditions
1) the p2p message is a valid consensus message
2) the p2p message sender has a valid public key
3) the sender's public key is in the current committee
4) log the number of invalid/valid messages
After the validation, the valid messages will be forward to the network,
while the invalid messages will be filtered out.
The messages intended for the validator will be handled in the consensus layer.
Signed-off-by: Leo Chen <leo@harmony.one>
* [tx_list] Add transaction after you can fetch tx cost
* [tx_pool] Add error sink reports for removed tx
* Correct log levels for known transactions
* Remove redundant hash to `enqueue` and `add` signatures
* Update tests for signature changes
* [build] Fix local build for MacOs
* [tx_pool] Correct typo & logging level for known tx
* [tx_pool] Fix for go imports
* [tx_list] Add transaction after you can fetch tx cost
* [tx_pool] Add error sink reports for removed tx
* Correct log levels for known transactions
* Remove redundant hash to `enqueue` and `add` signatures
* Update tests for signature changes
* [build] Fix local build for MacOs
* [tx_pool] Correct typo & logging level for known tx
* [project][p2p] Remove wallet, client roles & associated function calls
* [node][service] Remove unused service types
* [wallet] Remove internal wallet code
* [test] Remove wallet from debug.sh
* [test] More cleanup in debug.sh, deploy.sh
* [test] Adjust duration back into local test script
* [test] Increase duration
* [test] Exit with 0, remove RESULT_FILE as not made anymore
# This is the 1st commit message:
Fix travis
# This is the commit message #2:
[cleanup] remove is_genesis flag
Signed-off-by: Leo Chen <leo@harmony.one>
# This is the commit message #3:
[nodetype] add nodetype to replace is_explorer
Signed-off-by: Leo Chen <leo@harmony.one>
# This is the commit message #4:
fix beacon sync channel blocking issue
# This is the commit message #5:
use lastMileMux to protect lastMileBlock queue to avoid potential blocking; use sleep instead of ticker
# This is the commit message #6:
Fix the beacon committee check
# This is the commit message #7:
[release] add release action to go_executable_build.sh
Signed-off-by: Leo Chen <leo@harmony.one>
# This is the commit message #8:
[node.sh] add -d option
-d download only
Signed-off-by: Leo Chen <leo@harmony.one>
# This is the commit message #9:
[node.sh] add -T node_type option
-T node_type support node type (validator/explorer)
Signed-off-by: Leo Chen <leo@harmony.one>
# This is the commit message #10:
[node.sh] backward compatible with older harmony binary
Signed-off-by: Leo Chen <leo@harmony.one>
# This is the commit message #11:
[node.sh] support -i shard_id option
-i shard_id specify shard_id, this is applicable only to
explorer node
Signed-off-by: Leo Chen <leo@harmony.one>
# This is the commit message #12:
Revisited api
# This is the commit message #13:
Fix rpc integration
# This is the commit message #14:
address some minor issues in comments and code
# This is the commit message #15:
addressed comments on others' buckets
# This is the commit message #16:
Add Global Access to OS Temp Directory Variable and Move DHT Files Into Temp Directory