-
Notifications
You must be signed in to change notification settings - Fork 35.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: Send post-verack handshake messages at most once #20146
Conversation
wont-hurt-ACK |
Code review ACK fa1f6f2 |
ACK fa1f6f2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK fa1f6f2 this is the only code section that sets fCurrentlyConnected
and fSuccessfullyConnected
to true. Could add a test. I did not verify if this code is actually being called repeatedly post initial verack; was it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa1f6f2, I have reviewed the code and it looks OK, I agree it can be merged.
… once fa1f6f2 net: Send post-verack handshake messages at most once (MarcoFalke) Pull request description: There is no need to send `SENDHEADERS` and `SENDCMPCT` messages as a reply to each `VERACK` that is received. For alive checks, a `PING`/`PONG` can be used. ACKs for top commit: jonatack: Concept ACK fa1f6f2 this is the only code section that sets `fCurrentlyConnected` and `fSuccessfullyConnected` to true. Could add a test. I did not verify if this code is actually being called repeatedly post initial verack; was it? hebasto: ACK fa1f6f2, I have reviewed the code and it looks OK, I agree it can be merged. naumenkogs: ACK fa1f6f2 laanwj: Code review ACK fa1f6f2 Tree-SHA512: c841d5d3807254a49463bbcfac3b32881b34a9d3206899544c86322c20988e17ad2ae243cba227fd3825a914f0cb2584451edda2414aecee6d5e3f5a0636f08a
Arguably this was a protocol violation, so perhaps we want to backport? |
Shouldn't matter much, but I certainly don't mind a backport, as we are doing a release anyway. |
Github-Pull: bitcoin#20146 Rebased-From: fa1f6f2
Have added this to #20166 for backporting to the 0.20 branch. |
7566af4 doc: Update data directory path comments (Hennadii Stepanov) 09261de util: Add StripRedundantLastElementsOfPath function (Hennadii Stepanov) 8ef0dac macOS deploy: use the new plistlib API (Jonas Schnelli) 314e795 build: fix mutex detection when building bdb on macOS (fanquake) 1f67a30 random: fixes read buffer resizing in RandAddSeedPerfmon (Ethan Heilman) 6113b54 net: Send post-verack handshake messages at most once (MarcoFalke) bdf15d0 rpc: Adjust witness-tx deserialize error message (MarcoFalke) 731502a rpc: Properly deserialize txs with witness before signing (MarcoFalke) ee0082b Avoid the use of abs64 in timedata (Pieter Wuille) 05bd0c2 docs: Correct description for getblockstats's txs field (Nadav Ivgi) Pull request description: Backports the following PRs to the 0.20 branch: * #19777 - docs: Correct description for getblockstats's txs field * #19836 - rpc: Properly deserialize txs with witness before signing * #20080 - Strip any trailing `/` in -datadir and -blocksdir paths * #20082 - [bugfix] random: fixes read buffer to use min rather than max * #20141 - Avoid the use of abs64 in timedata * #20146 - net: Send post-verack handshake messages at most once * #20195 - build: fix mutex detection when building bdb on macOS * #20298 - macOS deploy: use the new plistlib API Will add additional commits as they become available. ACKs for top commit: MarcoFalke: review ACK 7566af4 🗡 Tree-SHA512: add6bb978313c12c3e07bc232636ae9d1ab0edd0b816705c5c70eeb1cc04097165fd5e29d60c706886943ceb1f749a422020766b4aa2d23be51e9f839157a4bb
Github-Pull: bitcoin#20146 Rebased-From: fa1f6f2
7566af4 doc: Update data directory path comments (Hennadii Stepanov) 09261de util: Add StripRedundantLastElementsOfPath function (Hennadii Stepanov) 8ef0dac macOS deploy: use the new plistlib API (Jonas Schnelli) 314e795 build: fix mutex detection when building bdb on macOS (fanquake) 1f67a30 random: fixes read buffer resizing in RandAddSeedPerfmon (Ethan Heilman) 6113b54 net: Send post-verack handshake messages at most once (MarcoFalke) bdf15d0 rpc: Adjust witness-tx deserialize error message (MarcoFalke) 731502a rpc: Properly deserialize txs with witness before signing (MarcoFalke) ee0082b Avoid the use of abs64 in timedata (Pieter Wuille) 05bd0c2 docs: Correct description for getblockstats's txs field (Nadav Ivgi) Pull request description: Backports the following PRs to the 0.20 branch: * bitcoin#19777 - docs: Correct description for getblockstats's txs field * bitcoin#19836 - rpc: Properly deserialize txs with witness before signing * bitcoin#20080 - Strip any trailing `/` in -datadir and -blocksdir paths * bitcoin#20082 - [bugfix] random: fixes read buffer to use min rather than max * bitcoin#20141 - Avoid the use of abs64 in timedata * bitcoin#20146 - net: Send post-verack handshake messages at most once * bitcoin#20195 - build: fix mutex detection when building bdb on macOS * bitcoin#20298 - macOS deploy: use the new plistlib API Will add additional commits as they become available. ACKs for top commit: MarcoFalke: review ACK 7566af4 🗡 Tree-SHA512: add6bb978313c12c3e07bc232636ae9d1ab0edd0b816705c5c70eeb1cc04097165fd5e29d60c706886943ceb1f749a422020766b4aa2d23be51e9f839157a4bb
Summary: There is no need to send SENDHEADERS and SENDCMPCT messages as a reply to each VERACK that is received. For alive checks, a PING/PONG can be used. This is a backport of [[bitcoin/bitcoin#20146 | core#20146]] Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D10469
There is no need to send
SENDHEADERS
andSENDCMPCT
messages as a reply to eachVERACK
that is received. For alive checks, aPING
/PONG
can be used.