Out-of-range account index (currently >= 200) translates into a shard ID
(>= 4) not found in the genesis table, so its genesis cannot be
initialized. Since this can be induced by misconfiguration, do not
panic but just crit out.
This error was seen during drum testnet launch.
* Log the right shard number for wallet/getFreeToken
* Don't try to use empty commit bitmap from genesis block
* Fail hard if block reward or finalization fails
* Log the public key if message sig verification fails
* Extract and save chain state from received blocks in order to
eliminate deep tail recursion
* Properly deep copy chain config (previously ChainID was being shared
among chains)
* Eliminate chain use-before-init window in node.New()
* Save genesis epoch shard state in new blockchain database
* Do not check epoch of the received shard state message (temp
workaround – we should introduce the check elsewhere)
* Propose an empty block if no transactions have been received for 10
seconds
* Manage shard chains as first class citizen
* Bring core.BlockChain's read/write semantics cleaner
* Reimplement the block reward in terms of on-chain committee info, not
hardcoded genesis committee.
It should equal the one in the master copy found on beacon chain, except
if the master table doesn't have the shard (shard disowned), the local
leader should acknowledge this and signal the end of the shard by having
a committee proposal with empty leader and zero members.
The 10/20 offset will upset local test with more than 10 nodes being
launched.
The error I encountered is like:
panic: failed to listen on any addresses: [listen tcp4 0.0.0.0:9015: bind: address already in use]
goroutine 1 [running]:
github.com/harmony-one/harmony/p2p/host/hostv2.catchError(...)
/Users/leochen/work/go/src/github.com/harmony-one/harmony/p2p/host/hostv2/util.go:10
Signed-off-by: Leo Chen <leo@harmony.one>
1. Remove eth rpc code and unnecessary changes from
7a0f18f92b. Import the package instead.
2. Move HmyAPIBackend into core package so it has more access to core.
3. Add API interface for services.
4. Start RPC for all roles, for both HTTP (baseport+10) and WS (baseport+20).
3. Keep implemented APIs but move to internal/hmyapi package.