p2p: always set nTime for self-advertisements#25314
Conversation
|
ping @vasild |
0857849 to
65749ee
Compare
|
utACK 65749ee3933898b54a77443e647ed5c1d12e0f99 |
I think that would be hard, because the local addresses in the functional tests are unroutable, so nodes don't self-advertise there. There is even the workaround of the |
vasild
left a comment
There was a problem hiding this comment.
Concept ACK
The proficiency of the engineers is just astonishing in this community (@mzumsande)! How the hell did you catch this?
Thank you! Pretty much by chance - I was reviewing #25303 and while looking at this commit msg I was wondering if it was possible to somehow have addresses with default-initialised nTime in addrman or addr relay - that's how I stumbled upon this. |
If we self-advertised to an inbound peer with the address they gave us, nTime was left default-initialized, so that our peer wouldn't relay it any further along.
65749ee to
99b9e5f
Compare
|
ACK 99b9e5f |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
Code review ACK 99b9e5f |
|
Maybe consider backporting to 23.x if this meets the bar. |
If we self-advertised to an inbound peer with the address they gave us, nTime was left default-initialized, so that our peer wouldn't relay it any further along. Github-Pull: bitcoin#25314 Rebased-From: 99b9e5f
I've added this for backport in #25316 |
99b9e5f p2p: always set nTime for self-advertisements (Martin Zumsande) Pull request description: This logic was recently changed in bitcoin@0cfc0cd to overwrite `addrLocal` with the address they gave us when self-advertising to an inbound peer. But if we don't also change `nTime` again from the default `TIME_INIT`, our peer will not relay our advertised address any further. ACKs for top commit: naumenkogs: ACK 99b9e5f laanwj: Code review ACK 99b9e5f vasild: ACK 99b9e5f Tree-SHA512: 4c7ea51cc77ddaa4b3537962ad2ad085f7ef5322982d3b1f5baecb852719eb99dd578436ca63432cb6b0a4fbd8b59fca793caf326c4663a4d6f34301e8146aa2
4ebf6e3 p2p: always set nTime for self-advertisements (Martin Zumsande) 039ef21 tests: Use descriptor that requires both legacy and segwit (Andrew Chow) 5fd25eb tests: Calculate input weight more accurately (Andrew Chow) bd6d3ac windeploy: Renewed windows code signing certificate (Andrew Chow) 32fa522 test: ensure createmultisig and addmultisigaddress are not returning any warning for expected cases (brunoerg) 7658055 rpc: fix inappropriate warning for address type p2sh-segwit in createmultisig and addmultisigaddress (brunoerg) Pull request description: Backports: - #24454 - #25201 - #25220 - #25314 ACKs for top commit: LarryRuane: re-utACK 4ebf6e3 achow101: ACK 4ebf6e3 Tree-SHA512: add3999d0330b3442f3894fce38ad9b5adc75da7d681c949e1d052bac5520c2c6fb06eba98bfbeb4aa9a560170451d24bf00d08dddd4a3d080030ecb8ad61882
This logic was recently changed in 0cfc0cd to overwrite
addrLocalwith the address they gave us when self-advertising to an inbound peer. But if we don't also changenTimeagain from the defaultTIME_INIT, our peer will not relay our advertised address any further.