We used to check only the installed version of harmony binary.
There are cases when validator didn't restrart the harmony process
even though the binary was updated.
So, we print out both on-disk binary version and the running version.
Signed-off-by: Leo Chen <leo@harmony.one>
* Add latest dir removal for make clean
Fix docker image in README
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Expose Harmony attributes & remove accessors
* Add internals for APIBackend & Harmony fuse
* Add skeleton for refactor of GetTotalStakingSnapshot
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Re-implement APIBacked methods in Harmony
* Add 'FIXME:done' comments to indicate implemented methods,
some were left out as they are simple accessors and will transition to using
the exposed harmony attributes.
* Split functions into standalone files for clarity.
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Fix GetTotalStakingSnapshot in Harmony implementation
Previous implementation used rps.LatestBlockNumber, which is a constant -1,
thus, the cache was never used
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Move ErrFinalizedTransaction to hmy.go
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Make PublicHarmonyAPI use Harmony instead of Backed
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Make NewPublicBlockChainAPI use Harmony instead of Backend
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Make NewPublicTransactionPoolAPI use Harmony instead of Backend
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Make DebugAPI use Harmony instead of Backend
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Make filers use Harmony instead of Backend
* Fix unhandled errors
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Change NetVersion to ChainID
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Change API service declaration to use Harmony
* Remove irrelevant TODOs
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [node] Refactor - Move harmony create to APIs fetch
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Remove api_backend.go & Backend
* Update hmyapi net.go to return ChainID as Version
* Remove unused err return on New Harmony obj
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Prettify var names, structure & comments
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Prettify var names, structure & comments
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Remove backend interface
* Fix lint
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Remove exposure for eventMux and chainDb
This is to satisfy existing interfaces, mainly the in filters.
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy + hmyapi] Refactor - Fix imports
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor - Apply changes from #3243
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Make filters use Backend instead of hmy
This is for testing from eth if we need it in the future
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmyapi] Refactor - Fix imports
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Fix minor typos
* Properly sort imports
* [explorer] Add /node-sync to return if the node is in sync
* [explorer] Use different status code for node out of sync & JSON error
* [main] Do not initialize syncing as a separate go routine to ensure stateSync pointer is initialized before explorer service creation (adds 0.002 seconds to node start up time)
[sync] Fix nil pointer on syncConfig, return true since node has not yet checked if it is in sync
* [explorer] Reverse sync for display
Check the following issue on the detailed explanation of why this commit makes sense.
https://github.com/harmony-one/harmony/issues/3225
The onPrepare and onCommit will do signature verification of the message payload.
So, there is no need to do duplicated sanity check when handling Prepare/Commit messages.
We reserve the signature verification on other messages, as they are not duplicated.
This PR can reduce the CPU load of leader during consensus.
Signed-off-by: Leo Chen <leo@harmony.one>
* [api] Update block miner to return the correct hex value instead of wrong one address (v1)
* [api] Update block miner to return the correct hex value instead of wrong one address (v2)
* [api] Refactor for readability
* [hmy] Cache leader conversion results
[api] Get leader address from cache
* Fix lint
* [api] Minor optimization