Previously, networkinfo used a global context was being used with a
3-minute timeout. This caused all networkinfo discovery/advertisement
activities to stop working 3 minutes after the node startup.
Fix this by eliminating the global 3-minute context and making its
consumers use locally created contexts:
* New uses a context that does not time out;
* Init uses a context that times out in 3 minutes;
* DoService (the service “body”) uses a context that does not time out;
* findPeers accept a context from its caller, DoService.
this is solve the problem of validators in different network connected
with each others.
* mainet is still using the original harmony prefix to keep backward
compatibility
* pangaea uses "pangaea" as network prefix
* testnet uses "testnet" as network prefix
All nodes in Pangaea and Testnet need to restart to re-connect with each
other. Mainnet nodes have no changes.
Signed-off-by: Leo Chen <leo@harmony.one>
# 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
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.
DHT will clear out the entries every 24 hours.
The node needs to reguarly annouce to bootnode so that other peers can
find the peer.
We do regular advertise every 12 hours.
Signed-off-by: Leo Chen <leo@harmony.one>
We experienced a few cases that node failed to connect to bootnode and
the node program will not be useable. So, we add a retry mechanism to
increase the connection times to bootnode.
Signed-off-by: Leo Chen <leo@harmony.one>
instead of always using global bootnode, networkinfo now support a list
of new bootnodes. This is to enable 2nd stage peer discovery, which can
use existing beacon peers as the bootnode to discover shard peers.
Signed-off-by: Leo Chen <leo@harmony.one>
beacon peer is used by beacon client to sync beacon chain blockchain
which contains randomness, sharding info.
Signed-off-by: Leo Chen <leo@harmony.one>