Leo Chen
4580b11eda
[p2p] remove redundant debug log message in getTopic
...
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Leo Chen
e3f8718204
[p2p] support options in pubsub
...
increase peer outbound queue size from default 32 to 64
use P2P_TRACEFILE to control the p2p pubsub tracer
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Leo Chen
af2661022f
Revert "Merge pull request #1978 from LeoHChen/revert-libp2p"
...
This reverts commit 003b6c6ed5
, reversing
changes made to efc0ae111c
.
5 years ago
Eugene Kim
c9febf402a
Emit fatal init error details to stderr w/o panics
5 years ago
Leo Chen
a9a4d624c5
Revert "Merge pull request #1862 from harmony-ek/pubsub_discovery"
...
This reverts commit 93dade6a72
, reversing
changes made to b8456dd83d
.
5 years ago
Eugene Kim
ff2e0072c9
Use topic-based libp2p pubsub interface
...
https://github.com/libp2p/go-libp2p-pubsub/releases/tag/v0.2.0 : “The old
pubsub.Publish and pubsub.Subscribe methods are still usable, but have
been deprecated”
5 years ago
Eugene Kim
f3e268ab2b
Generate mocks in the same package
...
This enables mocking private interfaces.
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
591c6fbece
[ping] display blskey in ping message
...
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Kai Lee
d588ce1e4b
Replace all logs in p2p module to use zerolog
5 years ago
Kai Lee
4e35e7d749
Replaced loggers in `p2p/` with custom shared logger
5 years ago
Richard Liu
fe217ad2b7
more rpc APIs. ( #863 )
...
* added readme
* more RPC APIs
* update for comments; fix travis issues
* update auto-generated host_mock.go
6 years ago
Leo Chen
a46514120d
[crash] fix nil pointer error #749
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
ba6f4b24d0
Update p2p/host/hostv2/hostv2.go
...
Co-Authored-By: LeoHChen <leo@harmony.one>
6 years ago
Eugene Kim
11459a4ea0
Add regression test
6 years ago
Leo Chen
a88eb643e6
[crash] fix nil pointer error #749
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
b4c69672d4
Regen mocks
...
Apparently mockgen has been updated while we had regen check broken.
6 years ago
Leo Chen
f3ffc65401
[cleanup] remove libp2p unicast support
...
fix test cases after remove libp2p unicast
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
562ae5078d
Delete some unused consensus code
6 years ago
chaosma
e66aeb4c57
add beaconchain node state syncing ( #502 )
6 years ago
Rongjian Lan
873e37daac
Move contract code to contract.go
6 years ago
chaosma
02aa3d6477
add beaconchain database support for normal shard nodes ( #480 )
6 years ago
Leo Chen
aad244165f
fix build error of unused variable
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
1436dc19e5
remove excessive log messages
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
f96ad9727b
Fix stream leak
...
Since streams were multiplexed over connections, this wouldn't have
caused file descriptor/socket leaks; however, it would have definitely
caused memory leak (for the stream data structures).
6 years ago
Eugene Kim
687e01f137
Regenerate
6 years ago
Eugene Kim
05fdaa9197
Introduce and use uniform host logger
...
The host logger includes host ID (libp2p peer ID), and inherits
IP address and port from the one created by utils.GetLogInstance().
6 years ago
Eugene Kim
2680b7cc7d
Fix gometalinter warnings
6 years ago
Eugene Kim
610c02803d
Tag libp2p packages with libp2p_ prefix
...
This is because we are introducing more and more parallel P2P concepts
(libp2p peer versus our own peer, for example). Explicit tagging makes
it easier for untrained eyes to understand which side the code refers
to: If it's prefixed with libp2p_, it's libp2p; if not, it's our p2p.
While we are at this, apply the std → 3rd-party → local import grouping,
and also rename multiaddr to ma (the upstream canonical name of
go-multiaddr) in the affected files.
6 years ago
Eugene Kim
913cb45115
Move go:generate to the source side
6 years ago
Eugene Kim
f05eca3f8a
Unexport internally used interfaces
6 years ago
Eugene Kim
a62b65ece9
pubsub → libp2p_pubsub
...
This is in preparation of PubSub → pubsub rename.
6 years ago
Eugene Kim
f24509594e
Remove libp2p config option passthrough
...
No code uses this libp2p-specific hardwiring provision.
6 years ago
Leo Chen
7b0769c651
gossip all consensus messages
...
clean up some debug logs
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
a55b4514dd
use gossip for all consensus messages
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
b7838579de
use mutex to simplify the locking
...
fix travis test error by adding functions in mockhost
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
8820c257a6
add list of incoming/outgoing peers
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
993ec605c9
nit: add peer info when logging write errors
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
65d3e56e67
add error variables for p2p/host
...
no retry on newstream error
reduce number of retry
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
bc3fb1e4a2
Regenerate host mock
6 years ago
Eugene Kim
7f0e170f7a
Rename GroupReceiver → GroupReceiverImpl in hostv2
...
Suggested-by: Minh Doan <minh@harmony.one>
6 years ago
Eugene Kim
857d24ced8
Add tests
...
Suggested-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
52f6600b39
Add pubsub-based multicast, first pass
...
Should be good enough for interface and strawman implementation review.
6 years ago
Eugene Kim
15d3693b49
Byebye hostv1
6 years ago
Leo Chen
47545789c2
fix protocol not supported issue
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Minh Doan
7a37836b35
replace log by singleton logging
6 years ago
Leo Chen
984bd15fa4
add GetHost API in p2p/host package
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
5c129411b1
add options support in hostv2.New
...
so we can add additional options to p2pimpl.NewHost function call
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
2984fb90ba
fix go test errors in travis_checker.sh
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago