Casey Gardiner
d25b6c6ee2
Mainnet Release Candidate 2023.1.2 ( #4376 )
...
* remove default timeouts
* store the evm call timeout in rosetta object
* [cmd] actually apply ToRPCServerConfig
* Removed unused method.
* Rotate external leaders on non-beacon chains.
* Fix nil panic.
* Bump github.com/aws/aws-sdk-go from 1.33.0 to 1.34.0
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go ) from 1.33.0 to 1.34.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases )
- [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.34.0/CHANGELOG.md )
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.33.0...v1.34.0 )
---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump github.com/ipld/go-ipld-prime from 0.9.0 to 0.19.0
Bumps [github.com/ipld/go-ipld-prime](https://github.com/ipld/go-ipld-prime ) from 0.9.0 to 0.19.0.
- [Release notes](https://github.com/ipld/go-ipld-prime/releases )
- [Changelog](https://github.com/ipld/go-ipld-prime/blob/master/CHANGELOG.md )
- [Commits](https://github.com/ipld/go-ipld-prime/compare/v0.9.0...v0.19.0 )
---
updated-dependencies:
- dependency-name: github.com/ipld/go-ipld-prime
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump golang.org/x/net from 0.3.0 to 0.7.0
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.3.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases )
- [Commits](https://github.com/golang/net/compare/v0.3.0...v0.7.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Small fixes.
* in progress.
* in progress.
* in progress.
* consensus check is forked
* update master
* fix leader
* check leader for N blocks
* fix
* fix
* Cleanup and fix update pub keys.
* Rotate leader.
* fix
fix
fix
fix
fix
* Cleaned.
* Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`.
* activate epoch
* comment activation
* 295 epoch
* Fix failed tests.
* Fixed code review.
* Fix review "--port flag".
* Fix review comments.
* Returned locks in rotateLeader.
* Rebased onto dev.
* Commented golangci.
* staged stream sync v1.0
* fix protocol tests
* fix spell
* remove unused struct
* fix rosetta test
* add comments and refactor verify sig
* add comments, remove extra function
* add comment
* refactor errors, rename metrics
* refactor p2p host creation
* fix initsync and host creation
* fix short range hash chain
* fix beacon node detection for p2p protocol
* refactor stream peer cooldown and fix protocol beacon node field
* refactor p2p host and routing
* fix p2p discovery test issue
* add MaxAdvertiseWaitTime to handle advertisements interval and address stream connection issue
* terminal print the peer id and proto id
* fix boot complete message when node is shut down
* add new config option ( ForceReachabilityPublic ) to fix local-net consensus issue
* fix self query issue
* fix test NewDNSSyncingPeerProvider
* [testnet] disable leader rotation
* fix discovery issue for legacy sync
* add watermark low/high options for p2p connection manager
* add test for new conn manager flags
* fix dedent
* add comment to inform about p2p connection manager options
* fix max height issue
* add a separate log for get max height error
* fix log
* feat: triesInMemory flag
* fix: panic if TriesInMemory is 1 to 2
* in progress.
* consensus check is forked
* fix
* Cleanup and fix update pub keys.
* fix
fix
fix
fix
fix
* activate epoch
* EpochTBD for leader rotation epoch.
* 295 epoch
* Decider no longer requires public keys as a dependency. (#4289 )
* Consensus doesn't require anymore `Node` as a circular dependency.
* Proper blockchain initialization.
* Rwlock consensus.
* Removed channels.
* Removed view change locks.
* Removed timers locks.
* Removed fbft locks.
* Removed multiSigMutex locks.
* Removed leader locks.
* Removed additional locks and isViewChange.
* Added locks detected by race.
* Added locks detected by race.
* Locks for start.
* Removed additional logs.
* Removed additional locks.
* Removed additional locks.
* Make func private.
* Make VerifyBlock private.
* Make IsLeader private.
* Make ParseFBFTMessage private.
* Fix remove locks.
* Added additional locks.
* Added additional locks.
* Added readSignatureBitmapPayload locks.
* Added HandleMessageUpdate locks.
* Added LastMile locks.
* Locks for IsValidatorInCommittee.
* Fixed locks.
* Fixed tests.
* Fixed tests.
* Fixed lock.
* Rebased over leader rotation.
* Fix formatting.
* Rebased onto dev.
* in progress.
* consensus check is forked
* update master
* fix leader
* check leader for N blocks
* fix
* fix
* Cleanup and fix update pub keys.
* Rotate leader.
* fix
fix
fix
fix
fix
* Cleaned.
* Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`.
* comment activation
* 295 epoch
* Fix failed tests.
* Fixed code review.
* Fix review comments.
* Merged leader rotation.
* Rebased on dev.
* Rebased on dev.
* Fix usage of private methods.
* Fix usage of private methods.
* Fix usage of private methods.
* Removed deadcode, LockedFBFTPhase.
* Fix review comment.
* Fix review comment.
* Go mod tidy.
* Set to EpochTBD.
* Fix tests.
* [core] fix state handling of self destruct
If a contract self destructs to self and then receives funds within the
same transaction, it is possible for its stale state to be saved. This
change removes that possibility by checking for deleted state objects
before returning them.
* Fixed race error.
* rpc: add configurable http and `eth_call` timeout
* remove default timeouts
* store the evm call timeout in rosetta object
* [cmd] actually apply ToRPCServerConfig
* Removed unused method.
* Rotate external leaders on non-beacon chains.
* Fix nil panic.
* in progress.
* in progress.
* in progress.
* consensus check is forked
* update master
* fix leader
* check leader for N blocks
* fix
* fix
* Cleanup and fix update pub keys.
* Rotate leader.
* fix
fix
fix
fix
fix
* Cleaned.
* Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`.
* Fixed code review.
* Fix review comments.
* Returned locks in rotateLeader.
* Rebased onto dev.
* staged stream sync v1.0
* refactor errors, rename metrics
* fix p2p discovery test issue
* add watermark low/high options for p2p connection manager
* fix dedent
* in progress.
* consensus check is forked
* fix
* Cleanup and fix update pub keys.
* fix
fix
fix
fix
fix
* activate epoch
* EpochTBD for leader rotation epoch.
* 295 epoch
* Decider no longer requires public keys as a dependency. (#4289 )
* Consensus doesn't require anymore `Node` as a circular dependency.
* Proper blockchain initialization.
* Rwlock consensus.
* Removed channels.
* Removed view change locks.
* Removed multiSigMutex locks.
* Removed leader locks.
* Removed additional locks and isViewChange.
* Added locks detected by race.
* Added locks detected by race.
* Locks for start.
* Removed additional locks.
* Removed additional locks.
* Make func private.
* Make VerifyBlock private.
* Make IsLeader private.
* Make ParseFBFTMessage private.
* Fix remove locks.
* Added additional locks.
* Added additional locks.
* Added readSignatureBitmapPayload locks.
* Added HandleMessageUpdate locks.
* Added LastMile locks.
* Locks for IsValidatorInCommittee.
* Fixed locks.
* Fixed tests.
* Fixed lock.
* Rebased over leader rotation.
* in progress.
* consensus check is forked
* update master
* fix leader
* check leader for N blocks
* fix
* fix
* Cleanup and fix update pub keys.
* Rotate leader.
* fix
fix
fix
fix
fix
* Cleaned.
* Cache for `GetLeaderPubKeyFromCoinbase`, removed `NthNextHmyExt`.
* Fix failed tests.
* Fixed code review.
* Fix review comments.
* Merged leader rotation.
* Rebased on dev.
* Rebased on dev.
* Fix usage of private methods.
* Fix usage of private methods.
* Fix usage of private methods.
* Removed deadcode, LockedFBFTPhase.
* Fix review comment.
* Go mod tidy.
* remove default timeouts
* Rotate external leaders on non-beacon chains.
* Fix nil panic.
* Fixes.
* Update singleton.go
* evm: don't return extcode for validators
Due to technical debt, validator information is stored in the code field
of the address. The code field can be accessed in Solidity for an
arbitrary address using `extcodesize`, `extcodehash`, and `extcodecopy`
or helper commands (such as `address.code.Length`). The presence of this
field is used by contract developers to (erroneously) deny smart
contract access to other smart contracts (and therefore, validators).
This PR fixes that oversight by returning the same values as other EOAs
for known validator addresses. Obviously, it needs a hard fork that will
be scheduled separately.
* Fix context passing.
* Clean up code.
* Removed engine dependency.
* Fix possible panic.
* Clean up code.
* Network type.
* Fix tests.
* Revert "Removed engine dependency." (#4392 )
* Revert "Fix tests."
This reverts commit 597ba2d6f1
.
* Revert "Network type."
This reverts commit 5e1878aedc
.
* Revert "Clean up code."
This reverts commit 15885f4c9b
.
* Revert "Fix possible panic."
This reverts commit 1a70d5eb66
.
* Revert "Removed engine dependency."
This reverts commit 8c2ff803f7
.
* gitignore the cache folder (#4389 )
* stable localnet with external validator (#4388 )
* stable localnet with external validator
* ignore deploy config file comments
* reduce node launched in localnet
* update makefile
* localnet configuration - add more fn
* fix validator information command typo
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com>
Co-authored-by: frozen <355847+Frozen@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
Co-authored-by: “GheisMohammadi” <36589218+GheisMohammadi@users.noreply.github.com>
Co-authored-by: Sun Hyuk Ahn <sunhyukahn@Suns-MacBook-Pro.local>
Co-authored-by: Soph <35721420+sophoah@users.noreply.github.com>
2 years ago
Casey Gardiner
7ab8be3377
Release Candidate: dev -> main ( #4319 )
...
* Rebase dev branch to current main branch (#4318 )
* add openssl compatibility on m2 chips using darwin (#4302 )
Adds support for OpenSSL on MacOS Ventura using m2 chips.
* [dumpdb] ensure each cross link is dumped (#4311 )
* 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”>
* 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”>
* Fix for consensus stuck. (#4307 )
* Added check for block validity.
* Starts new view change if block invalid.
* Revert "Starts new view change if block invalid."
This reverts commit e889fa5da2e0780f087ab7dae5106b96287706db.
* staged dns sync v1.0 (#4316 )
* staged dns sync v1.0
* enabled stream downloader for localnet
* fix code review issues
* remove extra lock
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* 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”>
* Small fixes and code cleanup for network stack. (#4320 )
* staged dns sync v1.0
* enabled stream downloader for localnet
* fix code review issues
* remove extra lock
* staged dns sync v1.0
* Fixed, code clean up and other.
* Fixed, code clean up and other.
* Fixed, code clean up and other.
* Fix config.
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* Fix not disable cache in archival mode (#4322 )
* Feature registry (#4324 )
* Registry for services.
* Test.
* Reverted comment.
* Fix.
* Slash fix (#4284 )
* Implementation of new slashing rate calculation
* Write tests for then new slashing rate calculation
* Add engine.applySlashing tests
* fix #4059
Co-authored-by: Alex Brezas <abresas@gmail.com>
Co-authored-by: Dimitris Lamprinos <pkakelas@gmail.com>
* Bump github.com/aws/aws-sdk-go from 1.30.1 to 1.33.0 (#4325 ) (#4328 )
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go ) from 1.30.1 to 1.33.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases )
- [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.33.0/CHANGELOG.md )
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.30.1...v1.33.0 )
---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump github.com/btcsuite/btcd from 0.21.0-beta to 0.23.2 (#4327 ) (#4329 )
Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd ) from 0.21.0-beta to 0.23.2.
- [Release notes](https://github.com/btcsuite/btcd/releases )
- [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES )
- [Commits](https://github.com/btcsuite/btcd/compare/v0.21.0-beta...v0.23.2 )
---
updated-dependencies:
- dependency-name: github.com/btcsuite/btcd
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Max <82761650+MaxMustermann2@users.noreply.github.com>
Co-authored-by: Gheis <36589218+GheisMohammadi@users.noreply.github.com>
Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com>
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
Co-authored-by: Danny Willis <102543677+dannyposi@users.noreply.github.com>
Co-authored-by: PeekPI <894646171@QQ.COM>
Co-authored-by: Alex Brezas <abresas@gmail.com>
Co-authored-by: Dimitris Lamprinos <pkakelas@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
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
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
97eb8d972f
Go vet fixed.
3 years ago
harjas
a82ab83ac3
Add p2p metrics
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
yahtoo
1133948ea9
Feat: mitigate single-Host P2P sybil attack
3 years ago
MathxH Chen
af7e0dee71
Add DHT concurrency flag ( #3829 )
3 years ago
Jacky Wang
0df102f14f
[stream] added synchronize service in service manager
4 years ago
Jacky Wang
3d6858aba5
[P2P] Added functionality to Host for stream, replaced networkInfo service. ( #3534 )
...
1. Added some functionality to HostV2 for stream support.
2. Added new module discovery under p2p host to replace the networkInfo service.
3. Make dht datastore badger only active on bootstrap nodes. For normal nodes, badger is disabled by default. It can also be enabled by flags.
Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
4 years ago
Jacky Wang
f00c90e3e6
Graceful shutdown - All registered services are shutdown gracefully. ( #3533 )
...
1. Refactored service manager with cleaner interface.
2. Add prometheus to the service manager.
3. Graceful shutdown of the services (including consensus).
4. Some code refactor regarding consensus graceful shutdown.
Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
4 years ago
Daniel Van Der Maden
b291f181fa
Offline Node Support ( #3383 )
...
* [cmd] Add IsOffline flag
* Add IsOffline to node config
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [node] Disable syncing and p2p msgs if offline
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Clarify syncing status msg
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [internal/config] Add DefaultLocalListenIP & DefaultPublicListenIP
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Add IP to p2p config
* Use default local listening ip for p2p hors if node is in offline
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [p2p] Use peer ip when creating listenAddr
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Fix unit tests & bump config version
* Fix TestAddPeer & TestConnectionToInvalidPeer p2p test
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Fix lint
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [cmd] Address PR comments
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
4 years ago
Jacky Wang
b66be54a7e
[cmd] more refactoring
4 years ago
Leo Chen
a3257aa2ac
[rpc] add API to return p2p peer info
...
support both apiv1 and apiv2
Examples on localnet:
curl -s --request POST 'http://127.0.0.1:9500/ ' \
--header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc": "2.0", "method": "hmyv2_getPeerInfo", "params": [""], "id": 1}'
curl -s --request POST 'http://127.0.0.1:9500/ ' \
--header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc": "2.0", "method": "hmy_getPeerInfo", "params": [""], "id": 1}'
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
85062a3867
[p2p] separate handler channel for consensus/node messages
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
b560f88978
[libp2p/consensus] p2p spamming defense
...
This is a big PR merged many small commits together.
We add the message validation function in libp2p layer.
In the validation function, we check the following conditions
1) the p2p message is a valid consensus message
2) the p2p message sender has a valid public key
3) the sender's public key is in the current committee
4) log the number of invalid/valid messages
After the validation, the valid messages will be forward to the network,
while the invalid messages will be filtered out.
The messages intended for the validator will be handled in the consensus layer.
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
e028cc78bc
[bootstrap] fix bootstrap on localnet failed issue
...
forget a few changes from master branch
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
e149a2885d
[p2p] set max pubsub message size to 256Kb
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
04bc3f95fb
[libp2p] support both local json and remote event tracer
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
b5e1e7da7d
[p2p] add remote tracer
...
Signed-off-by: Leo Chen <leo@harmony.one>
4 years ago
Leo Chen
75d53190d1
[p2p] use debug level for p2p metrics data
...
Signed-off-by: Leo Chen <leo@harmony.one>
5 years ago
Leo Chen
2b25632219
Revert "[node] Throttle acceptance of incoming messages ( #2970 )"
...
This reverts commit c2f089f618
.
5 years ago
Edgar Aroutiounian
c2f089f618
[node] Throttle acceptance of incoming messages ( #2970 )
...
* [node] Throttle acceptance of incoming messages
* [p2p] Add sampled logger
* [go.mod] Bump libs
* [p2p][node] More sampled logs
* [p2p] Disable auto relay, force public reachability, fix bandwidth reporter, enable NAT service
* [p2p] Turn off some options
* [node] Remove noisy and incorrect impl p2p log
* [node] Sample bump to 24 second
* [p2p] Remove linger of metric
* [consenus] Fix race condition
* [consensus] Race condition for grace period
* [node] Less noisy closure
* [node] Less noisy closure
* [node] Bump context timeout on message, explicit cancel of context
* [node] Cost back to 1 when reach threshold back of being fine
* [node] Sync race condition
* [node] toStart buf chan 1
* [p2p] Turn options on again
* [node][p2p] Lower throttle point for test, remove noisy log, make time delay throttle small
* [consensus] Fix nil pointer
* [node] Remove noisy log, increase infrequency of Burst topic log
* [blockchain] Nil pointer check
* [node] Fix threshold, lessen log
* [node] Bump throttle
* [node] Nil to verify new block
* [node] Keep threshold at half
5 years ago
Edgar Aroutiounian
ee31573c1c
[rpc][p2p] Expose peer connectivity ( #2962 )
5 years ago
Jian Zhen
028631e1cb
adress review feedback
5 years ago
Jian Zhen
160143f1a5
try to make goimports happy: found out I can use gofmt :), 3rd try
5 years ago
Jian Zhen
8a6e5b5241
try to make goimports happy, 2nd try :-(
5 years ago
Jian Zhen
daa2bbd770
try to make goimports happy
5 years ago
Jian Zhen
89f0248d3c
add comment to make golint happy
5 years ago
Jian Zhen
bdaf6e1744
[p2p] Add libp2p_metrics into host and use bwCounter to record in/out networking traffic in a node
5 years ago
Edgar Aroutiounian
2afd8a54c4
[p2p] Throttle receive with constant cost function ( #2819 )
...
* [node] Unused package level big.Int
* [p2p] Throttle receives to a max of 100
* [project] Remove msgq
* [node][p2p] Only allow 100 max message handling at time
* [node][p2p] Throttle max message handler with Weighted Semaphore - init w/ uniform weight
* [node] Use go routine for passing handled block
* [p2p] Leftover commented out
* [node] Add log for when cannot pay semaphore cost
* [node] Bump max message handlers
* [internal] Remove file_embed
* [project] Remove unused file, unused function
* [consensus] Unused values
* [config] Unused field & function
* [internal] Unused address & hash
* [project] More unused tests, values, types
* [project] Move conn logger just to bootnode
* [rpc] Remove dead functions
* [internal] More unused functions
* [project] Remove dead keystore dir package
* [p2p] Need lock to grab all Topics
* [node] Force side effect of topic join, give each topic own weighted semaphore
5 years ago
Edgar Aroutiounian
25938969ca
[node][p2p] Unused fields, exit early on redundant ping, fold p2p constructor, expose topics, remove too much abstraction ( #2818 )
...
* [p2p] Remove unused Method
* [p2p] More dead function
* [node] Unused BCPeers field
* [node] Need to exit early if have ping
* [p2p] Remove unnecessary & confusing abstraction
* [p2p] Expose topics
5 years ago
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
2836f0f620
[project] Remove over complicated packages, useless tests, dead functions ( #2780 )
...
* [project] Dead test
* [node] If fields always same, then just use the constant
* [project] Remove overcomplicated ctxerror
* [project] Remove more dead tests, adjust error replacing ctxerror
* [project] More dead tests, fix travis complaint on Errorf
* [node.sh] Remove is-genesis
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
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
f3ffc65401
[cleanup] remove libp2p unicast support
...
fix test cases after remove libp2p unicast
Signed-off-by: Leo Chen <leo@harmony.one>
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
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
Eugene Kim
bc3fb1e4a2
Regenerate host mock
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