* 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>
* [rpc] Move all error definitions to error.go
* [core] Add function to read delegations from offchain data for a specific block
[rpc] Add GetDelegationsByDelegatorAt
* [rpc] Return error when calling all staking blockchain rpcs on auxillary shards
* [rpc] Rename to GetDelegationsByDelegatorByBlockNumber to follow naming conventions
* [rpc] Return error when requested block is greater than exists on chain
* [rpc] Fix lint errors
* [rpc] Fix check to not break on current block
* [rpc] Fix broken getBalance RPC
[rpc] Change getValidators to give balance at the end of the selected epoch or current block
* [rpc] Address PR comments
* [README] Update go version
* [rpc] Revert changes to Call
* [rpc] Move error checks to blockchain
* [rpc] Rename to ByBlock, because it takes a block as input
* [rpc] Small performance optimization for getting delegator information
* [chain][network] Factor out block reward from internal chain to proper package
* [network] Fill out record intended for RPC
* [staking][network] NewUtilityMetricSnapshot
* Expose rewards to RPC API
* Change json field
* Fix lint
* Remove marshalling
* Remove import
* Optimize median raw stake, total stake, get stake methods
* Remove unnecessary methods and add thread safety
* Review feedback
* Remove lock/unlock
Co-authored-by: Edgar Aroutiounian <edgar.factorial@gmail.com>