-
Notifications
You must be signed in to change notification settings - Fork 37.7k
BIP324: Enable v2 P2P encrypted transport #24545
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Bringing in upstream changes from #20962. Ready for further review. |
Rebased to resolve conflicts with #21160. Addressed comments from @mzumsande and @kallewoof in #23900. Ready for further review.
|
Rebased. Ready for further review.
|
Concept ACK |
-BEGIN VERIFY SCRIPT- sed -i 's/use_v2/use_addr_v2/g' ./src/protocol.h -END VERIFY SCRIPT-
Rebased. |
🐙 This pull request conflicts with the target branch and needs rebase. |
Closing for now. This will be picked up again later. BIP324 review attention should be directed towards #27479 and bitcoin-core/secp256k1#1129. |
b9c64db Add NODE_P2P_V2 to filters (Sjors Provoost) Pull request description: Perhaps premature since bitcoin/bitcoin#24545 hasn't been merged yet, but I figured it would be handy if at least one seed supports it. Mine does now, only on mainnet: * `xc08.seed.bitcoin.sprovoost.nl` all SegWit enabled nodes including pruned ones * `x809.seed.bitcoin.sprovoost.nl` all SegWit enabled full archive nodes (needed for IBD) * for compact filters use `x849` for full archive nodes (or `xc48`, but Bitcoin Core only serves these filters on pruned nodes if they've been enabled since IBD, see bitcoin/bitcoin#21726) So far it's found one reachable node on IPv4. Usage (IPv4 vs IPv6, results under `ANSWER SECTION`): ``` dig -t A xc08.seed.bitcoin.sprovoost.nl dig -t AAAA xc08.seed.bitcoin.sprovoost.nl ``` Assuming modern node software won't need pre-segwit peers or bloom filters, these combinations have been omitted. Someone should sanity check the hex values. ACKs for top commit: sipa: ACK b9c64db Tree-SHA512: f6f8525e3ad997a2500a2b5f83273a328af53ddbd277c48dc7ea04f8a676189c1143cccb162c9e74a0ae7c3108996fa5acfd9472b8b58b1a64bb0c3b9eafa312
This PR brings together all other BIP324 PRs and enables v2 encrypted P2P transport.
Builds on top of PRs: #25361, #23233, #23561, #23432. It looks like there's a lot of commits, but only the last 12 commits belong in this PR. The rest will be merged with upstream PRs.
The dependency tree for BIP324 PRs is here.
BIP324 is here.
Running a v2 node
Get the code
Build for your OS
Follow the appropriate instructions here
Run the node
Connect with a friend's v2 node
The last parameter(
p2p_v2:true
) signals to your node that the peer is running a v2 supportive client and we should attempt to make an encrypted P2P connection (you're simulating theNODE_P2P_V2
service flag advertisement manually). Should that fail however (say because the peer told you mistakenly, lied, etc.), this code will downgrade the connection to unencrypted v1 transport.Things you are helpful to test
getpeerinfo
asv2_session_id
with your friend.addnode
still indicating v2 support. You should see with wireshark that after a failed attempt at a v2 handshake, the connection is downgraded to unencrypted v1 and wireshark can parse it.I've been told there are v2 nodes running at (happy to update the list as more people run persistent v2 nodes; message me and I'll add it here):