* [rpc] updated rpc to GetCirculationSupply to sub token burnt
* [explorer] add a small fix
* [rpc] fix at getInaccessible tokens
* [rpc] added fix at header.Root
* [explorer] added a lot of code
* [explorer] added a lot of code
* [explorer] more adding
* [explorer] clean up and more code added
* [explorer] fixes according to test results
* [explorer] changed leveldb params, batch size, and a dirty data fix
* [explorer] fix on dirty data, fix on HasPendingTasks, and increase worker number
* [explorer] fix for contract creation
* [explorer] fixed local travis test
* [explorer] added caching fix at flushing db.
* [explorer] fixed all rpc points
* [explorer] small change to refactor storage.Start
* [explorer] fix go test
* [explorer] further increase the batch size
* [explorer] release lock during db writing data
* [explorer] change to rlock/runlock at flushLocked
* [explorer] also add flush time mechanism to trigger flushing
* [explorer] when checking checkpoint, first check memory, then check db
1. Added some functionality to HostV2 for stream support.
2. Added new module discovery under p2p host to replace the networkInfo service.
3. Make dht datastore badger only active on bootstrap nodes. For normal nodes, badger is disabled by default. It can also be enabled by flags.
Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
1. Refactored service manager with cleaner interface.
2. Add prometheus to the service manager.
3. Graceful shutdown of the services (including consensus).
4. Some code refactor regarding consensus graceful shutdown.
Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
* [staking] Move reward values from Network pkg to its own
* Refactor code for the move
* Implement logic to accurately set total supply
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Add totalPreStakingNetworkRewards to reward values
* Implement GetTotalTokens for use in other packages
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [core] Move getGenesisSpec to core pkg
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [core] Update gen spec docs
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Hook in updateInitialRewardValues on node init
* Add some docs for clarification
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rpc] Fix GetCirculatingSupply & GetTotalSupply RPCs
* Updated err msg in staking reward values.go
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rpc] Move GetCirculatingSupply logic into internal pkg
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [explorer] Update circulating supply & total supply vals
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Add Localnet rewards val & Errs
* [internal] Make GetCirculatingSupply consistent with WhatPercentStakedNow
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Fix imports
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [consensus] Make PercentageForTimeStamp return 1 for non-mainnet chains
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Fix reward dec math + Testnet testnet vals
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Make all const reward vals ONE instead of ATTO
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [internal] Correct returned value to ONE instead of Atto
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Fix dec precision
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Fix TestGetPreStakingRewardsFromBlockNumber test
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [staking] Use TotalInitialTokens instead of TotalPreStakingTokens
* Done so basis is off block 0 to account for phased mainnet release
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [internal] Fix GetCirculatingSupply
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* Return the Ethereum tx hash for Ethereum txs
* fix txn lookup check
* Fix test
* use the right txn hash
* fix nil pointer on txn lookup
Co-authored-by: Sebastian Johnsson <sebastian.johnsson@gmail.com>
* 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