Gheis
0104b1d623
add description for closing client and change randomize process to ma… ( #4276 )
...
* add description for closing client and change randomize process to make sure only online nodes are added to sync config
* fix sync test
* fix legacy limitNumPeers test
* add WaitForEachPeerToConnect to node configs to make parallel peer connection optional
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
2 years ago
Gheis
8d3be78cc7
bump libp2p to version 0.24.0 and update its dependencies and relevant tests ( #4315 )
...
* Removed legacy syncing peer provider. (#4260 )
* Removed legacy syncing peer provider.
* Fix localnet.
* Fix migrate version.
* Rebased on main.
* Fix formatting.
* Remove blockchain dependency from engine. (#4310 )
* Consensus doesn't require anymore `Node` as a circular dependency.
* Rebased upon main.
* Removed engine beacon chain dependency.
* Fixed nil error.
* Fixed error.
* bump libp2p to version 0.24.0 and update its dependencies and relevant tests
* fix format, remove wrongly added configs
* add back wrongly deleted comment
* fix travis go checker
Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com>
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
2 years ago
Max
f8879f5e02
[p2p] prevent dialing of private ips ( #4286 )
...
* [p2p] fix: prevent dialing of private ips
The original feature (erroneously) prevents only querying of the private
IPs. This change prevents dialing private IPs altogether when the flag
is activated.
* [p2p] do not return `nil` gater
* [p2p] remove query filter
It was overriden by connection gater
* [p2p] add test to check gater non blocking
2 years ago
Max
cf5a264b15
[p2p] feat: add maximum peers limit ( #4272 )
2 years ago
Konstantin
3f8049f2b7
Fix race error and code style. ( #4271 )
2 years ago
Konstantin
93b14ddca6
Epoch chain: update reference to head block. ( #4249 )
...
* Update reference to head block.
* Fix block retrieve.
Co-authored-by: Konstantin <k.potapov@softpro.com>
2 years ago
Konstantin
0753c94c2b
Epoch syncing - syncing only epoch blocks. ( #4070 )
...
* Epoch syncing - syncing only epoch blocks.
* Fix go test, added command to run.
* Block signature validation.
* Support getting block by height.
* Fix to compile.
* Http method.
* Generate fix.
* Install protoc-gen-go-grpc.
* Fix sync, additional timeouts, fix epoch.
* Chain behaviour options, optional state validation on blockchain initialization.
* Added limit to avoid abuse, small fixes.
* Fix duplicate code.
* Fix isInSyn.
* Fix method call.
* Removed additional block sending.
* Fix in sync.
* Code clean up.
* Fix beacon chain func.
* Return back Beaconchain.
* Fix sending only epoch blocks.
* Fix failed startup with validator.
* Increase recv message size.
* Remove peer.
* Add logs.
* Add logs.
* Fix msgf call.
* Epoch syncing - syncing only epoch blocks.
* Block signature validation.
* Fix sync, additional timeouts, fix epoch.
* Chain behaviour options, optional state validation on blockchain initialization.
* Support getting block by height.
* Http method.
* Fix duplicate code.
* Fix isInSyn.
* Added limit to avoid abuse, small fixes.
* Fix method call.
* Removed additional block sending.
* Fix in sync.
* Small fix.
* Code clean up.
* Fix beacon chain func.
* Return back Beaconchain.
* Fix sending only epoch blocks.
* Fix failed startup with validator.
* Increase recv message size.
* Remove peer.
* Add logs.
* Fix msgf call.
* Sending crosslinks from beacon to non-beacon chains.
* Receiving crosslinks.
* Broadcast.
* Fix comment.
* Crosslink signal.
* Crosslink hardbeat signal receiving.
* Sending crosslinks from beacon to non-beacon chains.
* Sending crosslinks from beacon to non-beacon chains.
* Broadcast.
* Fix comment.
* Crosslink signal.
* Crosslink signal.
* Add comment to run tests.
* Fix comments.
* Fix comments.
* Fix review comments.
* Updated with last crosslink heart beat signal.
* Merged crosslink signal.
* Clean up code.
* Add logs for cl debug.
* Stop iterate on receiving result.
* Add logs.
* Fix in sync check.
* Fix reconnect problems.
* Fix tests and reduce dependency.
* Updated with main.
* Fix review comments.
* Changed to compare epochs.
* Fix crosslinks usage.
* Fix initialization.
* Epoch chain implementation.
* Legacy sync by default.
* Revert "Legacy sync by default."
This reverts commit 5fa6ce002a
.
* Epoch sync for downloader.
* Build docker image while tests.
* Fix paths.
* Updated travis.
* Review improvements.
Co-authored-by: Konstantin <k.potapov@softpro.com>
2 years ago
Konstantin
06de7dcd6c
Fix race errors. ( #4184 )
...
* Fix data races.
* Fix block num.
* Pub key lock.
* Fixed race errors.
* Fix flag.
* Fix comments.
* Fix comments.
* Fix type.
* Fix race errors in tests.
Co-authored-by: Konstantin <k.potapov@softpro.com>
2 years ago
Max
947c6ef11c
[p2p]: feat: allow disable scan of private ips ( #4151 )
...
* [p2p]: feat: allow disable scan of private ips
Add a command line flag `--p2p.no-private-ip-scan` or config file option
in P2P `DisablePrivateIPScan` to stop node operators from receiving
netscan abuse emails. Fixes #4036 , #4046 and #3788 . After this change,
node operators should not need to use `iptables` to firewall out RFC1918
traffic.
* [p2p] fix: Cascade disallow private scan
3 years ago
Konstantin
afc44ea746
Fix BaseStream buf io concurrent access. ( #4141 )
...
* Fix base stream buf io concurrent acess.
* Added write lock.
Co-authored-by: Konstantin <k.potapov@softpro.com>
3 years ago
Konstantin
97eb8d972f
Go vet fixed.
3 years ago
Jacky Wang
6e52ad4a88
[downloader] adjust default testnet downloader values, add sleep to unsuccessful download
3 years ago
Jacky Wang
8f24ee77b2
[p2p] fix the panic at cooldown cache
3 years ago
Jacky Wang
6ca07108b4
[p2p] fix the streamm ID
3 years ago
Jacky Wang
471bd1accc
[p2p] add cooldown mechanism at discover
3 years ago
harjas
77f810f607
Remove metrics(not computed)
3 years ago
harjas
a82ab83ac3
Add p2p metrics
3 years ago
Leo Chen
463ec55c51
[build] update protoc version ( #4013 )
...
Signed-off-by: Leo Chen <leo@harmony.one>
3 years ago
Leo Chen
908ea1ae2a
[ci] update generated .pb files
...
Signed-off-by: Leo Chen <leo@harmony.one>
3 years ago
Leo Chen
fc4dc9ff73
[ci] fix travis build
...
Signed-off-by: Leo Chen <leo@harmony.one>
3 years ago
Leo Chen
1c450bbc44
[p2p] tuning libp2p parameters to reduce flooding
...
Signed-off-by: Leo Chen <leo@harmony.one>
3 years ago
Leo Chen
5e581d37c8
[p2p] tuning libp2p parameters to reduce flooding
...
Signed-off-by: Leo Chen <leo@harmony.one>
3 years ago
Leo Chen
80b8333469
[log] log too much peers ( #3936 )
...
* [log] log too much peers
* fix go import
Signed-off-by: Leo Chen <leo@harmony.one>
Co-authored-by: Nita Neou <soph@harmony.one>
3 years ago
yahtoo
3fe670831b
fix: add p2p security module unit test
3 years ago
yahtoo
720bf6c162
fix: fix new connection check logic error
3 years ago
yahtoo
aae369babc
fix: add configuration option
3 years ago
yahtoo
1133948ea9
Feat: mitigate single-Host P2P sybil attack
3 years ago
MathxH Chen
e58fddd264
[p2p] Fix libp2p version lead the consensus issue ( #3868 )
...
* revert libp2p version
* Revert "[p2p] Remove DiscConcurrency code (#3865 )"
3 years ago
MathxH Chen
b3c470e49b
[p2p] Remove DiscConcurrency code ( #3865 )
3 years ago
MathxH Chen
af7e0dee71
Add DHT concurrency flag ( #3829 )
3 years ago
MathxH Chen
1c363c73f4
[DO NOT MERGE] [p2p] Reduce memory and CPU usage of libp2p ( #3808 )
...
* Reduce queryPeer calls frequency
* Fix option_test
3 years ago
MathxH Chen
b8cd520927
[p2p] Try to fix P2P memory issue ( #3795 )
...
* [p2p] Fix context leak in resolveMultiAddr
* [p2p] upgrade go-libp2p-kad-dht to v0.12.1
* [p2p] Upgrade entire libp2p stack
3 years ago
Alex Chen
73ab26cf4e
Fix Ticker cannot stop for releasing resource
4 years ago
Jacky Wang
ca5333789b
[stream] make doRequestAsync channel buffered
4 years ago
Jacky Wang
bf19acffd6
[stream] updated comments for BaseStream.Close
4 years ago
Jacky Wang
806180f4d3
[stream] use reset for close
4 years ago
Jacky Wang
1fccff3acc
[stream] a small bug fix in request manager
4 years ago
Jacky Wang
dd0a109ba7
[stream] added more prometheus metrics
4 years ago
Jacky Wang
8629a6d45e
[stream] fix the request manager race condition
4 years ago
Jacky Wang
1885f1df74
[stream] added some prometheus metric
4 years ago
Jacky Wang
0df102f14f
[stream] added synchronize service in service manager
4 years ago
Jacky Wang
39ba7c31aa
[stream] fix some comments according to Leo's comments in https://github.com/harmony-one/harmony/pull/3583
4 years ago
Jacky Wang
6ef5bc5faa
[stream] elaborated log message to pickAvailableStream
4 years ago
Jacky Wang
72f74c08cb
[stream] request can be canceled from waitings in request manager
4 years ago
Jacky Wang
f12b9be3d8
[stream] fix request manager tests for refresh stream
4 years ago
Jacky Wang
e9f3a9e69e
[stream] requestmanager use refresh streams method instead of event based stream operation.
4 years ago
Jacky Wang
1158f5a263
[stream] removed epoch state related experimental code.
4 years ago
Jacky Wang
5eb1cf1d1e
[stream] added a signature in ChainReader to fix the build error
4 years ago
Jacky Wang
3977ac49eb
[stream] added sync protocol
4 years ago
Jacky Wang
1caf88c7db
[stream] added commit sig in sync stream protobuf.
4 years ago