Skip to content

Net#110

Closed
ebuchman wants to merge 15 commits intomasterfrom
net
Closed

Net#110
ebuchman wants to merge 15 commits intomasterfrom
net

Conversation

@ebuchman
Copy link
Contributor

Since we do a peerHandshake which establishes the peer's listening port, we don't have to wait for a pex message to add the peer to the address book. So we add the peer right after the handshake, in pexReactor.AddPeer.

To avoid duplicate connections (especially connections to ourselves on different interfaces eg when in a container), each peer generates a uuid on startup, and this is used to determine peer duplicates. Note the uuid should never make it to the address book.

We also restrict the number of peers we connect to on a given IP range. This is done using a tree in the PeerSet to count the number of connected addresses in each range. Lookup and update are done atomically from within the PeerSet.Add function. Also, before calling AddPeerWithConnection, we check the ip ranges, so that we don't even bother running a handshake if we already know we have enough peers in a given ip range.

Finally, if ensurePeers has no addrs to dial, we pick a random peer and send pexRequest

this PR also includes adding the current git commit hash to the NodeInfo from #108

@ebuchman ebuchman force-pushed the net branch 2 times, most recently from 5fcdd95 to 9222b31 Compare July 11, 2015 02:49
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last two are swapped.

@jaekwon
Copy link
Contributor

jaekwon commented Jul 16, 2015

Already merged via net_jae

@jaekwon jaekwon closed this Jul 16, 2015
@ebuchman ebuchman deleted the net branch July 19, 2015 22:51
ebuchman added a commit that referenced this pull request Jun 20, 2018
readme: re-organize & update docs links
liamsi pushed a commit to liamsi/tendermint that referenced this pull request Jun 21, 2018
zramsay pushed a commit that referenced this pull request Jul 10, 2018
* tmbench: Make sendloop act in one second segments

Previous behaviour was to make the sendloop send all its messages
and then time how long that took. (Possibly waiting if too fast)
This has the same operation when too fast, but stops the loop
after one second. This is useful if a large tx amount is specified
and the ping doesn't get executed. Tmbench no longer crashes on
large rates.

* Update Readme
QuantumExplorer added a commit to QuantumExplorer/tendermint that referenced this pull request Sep 10, 2021
…ghtClient

Improvement/dash core light client
favon24 pushed a commit to DeBankDeFi/tendermint that referenced this pull request Mar 15, 2023
* [backport] Renaming in docker-related files (tendermint#123)

* [cherry-picked] Renaming in docker-related files (tendermint#110)

* Performed renaming in docker-related files

* Fix e2e launch

* Rename TENDERMINT_BUILD_OPTIONS to COMETBFT_BUILD_OPTIONS all over

* Revert `cometbft-proof` to `tendermint-proof`

* Replaced TENDERMINT_VERSION --> COMETBFT_VERSION all over the codebase

* [backport] Rename inside `test/e2e` (tendermint#139) (tendermint#144)

* Renamed all help text for cometbft CLI

* Update networks/local/localnode/Dockerfile

Co-authored-by: Thane Thomson <connect@thanethomson.com>

Co-authored-by: Thane Thomson <connect@thanethomson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants