Edgar Aroutiounian
82b71619d2
[node] Redundant field removed - dead files & scripts , update deprecated libp2p package names, fold p2p code ( #2817 )
...
* [project] Remove unused test script
* [project] Remove stale testplan
* [project] Remove stale test configs
* [internal] Unused code
* [node] Remove redundnat peer count field
* [p2p] Remove leftover idea code, fix deprecated warnings
* [project] Remove .gitmodule
* [internal] Fix travis, update deprecated package usage
* [node] Remove ineffective test
* [p2p] Update deprecated package names & func usage
* [p2p] Make error explicit, remove unidiomatic return signature
* [p2p] Remove dead code, lower max p2p message size max limit
* [project][p2p] Remove dead p2p code, fold all p2p code into one file
* [p2p] Remove unsed function parameter
* [node] Add log in bootstrap
* [node] Unnecessary pointer usage
* [p2p] Unused errors.go
* [node] Log out when next consensus check in bootstrap
5 years ago
Edgar Aroutiounian
094a61301d
[project] Unused yaml files, staticcheck fixes, dead tests that only delay build ( #2755 )
...
* [project] Unused yaml files
* [core] Remove dead tx_cacher.go
* [project] Further fixes from staticcheck
5 years ago
Rongjian Lan
24962022be
Fix ping bootstrap
5 years ago
Rongjian Lan
8c7dca4cc6
Increase ping frequency at first
5 years ago
Leo Chen
2240b8d48f
[p2p] add network type prefix to group id
...
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>
5 years ago
Leo Chen
931890674c
[log] set proper level for debug messages
...
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Leo Chen
591c6fbece
[ping] display blskey in ping message
...
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Leo Chen
0ddcbdca1a
[pingpong] remove pong messages from discovery service
...
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Leo Chen
fbce51b944
[explorer] don't send ping message for explorer node #1414
...
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Kai Lee
9e87c928f1
Replace all logs in api module to use zerolog
5 years ago
Minh Doan
d5848946d5
quick fix for logging
6 years ago
Leo Chen
c1296aac8b
[pingpong] reduce regular ping to 5 minutes
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Yelin Lu
0d83532785
new rpc framework
...
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.
6 years ago
Rongjian Lan
86ab59d389
Finish up resharding
6 years ago
u5surf
8d38f12425
[lint] fix misspell #708
6 years ago
Rongjian Lan
f72cb43b83
make 1+3 sharded network work locally with deploy.sh
6 years ago
chao
1bedd7dc85
change archival node as a validator; it's more secure for archival node to validate before accept the blocks;
...
archival node now will make sure data is flushed and saved
6 years ago
chao
0d5dcfcae3
refactor state syncing; unify state sync and beacon sync (i.e. depends
...
on whether node needs to join consensus after fully synced)
6 years ago
Rongjian Lan
1dbb1a9250
remove validator IDs
6 years ago
Chao Ma
5496d697da
combine wallet/txgen into light client node;
...
refactoring peer discovery logic;
6 years ago
Chao Ma
84fa99008c
wallet v2 fix
6 years ago
chao
7e12ec03d7
remove go.sum, remove some logs
6 years ago
chao
51d42cc86c
fix wallet not working issue
6 years ago
Minh Doan
9a2cfb9080
change BlsPubKey to ConsensusPubKey and remove unnecessary log
6 years ago
Minh Doan
a4d3c13a18
rename PubKey to BlsPubKey
6 years ago
Leo Chen
efb4b81ef1
[debug] disable the log of sending ping message
...
Ping message is important to debug some timing issue in consensus, so we
just comment it out.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
67acacece0
send a ping message before the timer tick
...
this shall speed up the bootstrap process by sending a ping message
immediately entering the goroutine
add additional test to improve the test coverage
BEFORE
coverage: 1.9% of statements
AFTER
coverage: 42.3% of statements
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
72f75935e7
Make the first staking transaction working on the contract
6 years ago
Leo Chen
634ada791c
add beacon neighbor support
...
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>
6 years ago
Rongjian Lan
537c6b289c
Fix invalid staking transaction
6 years ago
Minh Doan
3d81d71a03
set up message channels
6 years ago
Leo Chen
ba4d27db6f
txgen send/recv tx/block to beacon shard
...
Reached a few HOORAY using manual test.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
bd8c13cbf6
fix go test error
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
9628430bdf
slow down the pace of sending ping message after received pong
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
dd99219ee3
add NotifyService function in the service interface
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
57ee1d6018
support multiple groups in discovery service
...
add an action channel to support dynamic pause/resume of discovery
service.
it also enables two stage discovery.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
2680b7cc7d
Fix gometalinter warnings
6 years ago
Leo Chen
25485c655c
add stop servie in discovery service
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
9ba931abb9
simplify networkinfo/discovery services
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
98596f4f21
add connecthostpeer function
...
pubsub requires pre-exist connection among peers before the message can
be sent via pubsub
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
7b16b3ceda
add more debug log
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
8820c257a6
add list of incoming/outgoing peers
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
ec5102708e
[libp2p] init integration of group message by pubsub
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
8dbc795ee5
add isBeacon flag to specify the node is a beacon chain node
...
add networkinfo/discovery service to beacon chain roles
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
11a68db13b
split discovery service into two services
...
one is networkinfo service to talk to bootnode for a list of peers
one is the discovery service to establish the link to new peers
the staking service has to be chained after the discovery service
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
84e150a2df
Handle peer channel closure gracefully
...
Without this, the foundPeers() goroutine will enter a tight infinite
loop when the DHT query ends and the peer channel gets closed, as
“<-s.peerChan” will immediately return a zero-valued PeerInfo.
6 years ago
Leo Chen
1d71aac6ec
construct p2p message using right function
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
5ddab11138
use a separate function to handle peer found
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
ac26de397f
send ping message to new peers
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
6b46b91b0e
add discovery service in the new service framework
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago