Repository navigation
p2p: name $DOG Mode in the user agent - #11
Open
dogofbitcoin wants to merge 1 commit into
Open
dogofbitcoin wants to merge 1 commit into
dogofbitcoin wants to merge 1 commit into
Conversation
Every $DOG Mode node sends the user agent of plain Bitcoin Core, "/Satoshi:31.1.0/", so a peer, a DNS seed's crawler or anyone reading getpeerinfo can tell a $DOG Mode node only by its NODE_DOG_MODE bit, and nobody can tell which $DOG Mode a node runs. Append a second BIP 14 component after the Bitcoin Core one, the way Bitcoin Knots names itself: "/Satoshi:31.1.0/DOGMode:20260902/". The Bitcoin Core component, and the -uacomment comments on it, are unchanged. The version is a date, as BIP 14 recommends: the day the $DOG Mode policy merged, to be set to the release date when a release is tagged. feature_uacomment.py now requires the whole string, and that a peer receives the same string in the version message. It and feature_includeconf.py no longer assume the comments end the string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every $DOG Mode node sends the user agent of plain Bitcoin Core,
/Satoshi:31.1.0/. A peer, a DNS seed's crawler or anyone readinggetpeerinfocan tell a $DOG Mode node only by itsNODE_DOG_MODEbit, and nobody can tell which $DOG Mode it runs.This appends a second BIP 14 component after the Bitcoin Core one, the way Bitcoin Knots names itself (
/Satoshi:<Core version>/Knots:<release date>/):The Bitcoin Core component is unchanged, so whatever reads it still does, and
-uacommentcomments still attach to it (/Satoshi:31.1.0(foo)/DOGMode:20260902/). The version is a date because BIP 14 recommends one for repository builds.20260902is the day #3 merged; it is one constant,UA_DOGMODEinsrc/clientversion.cpp, to set to the release date when you tag. The name and the version format are yours to choose, and each is one line.NODE_DOG_MODEalready tells every peer that a node runs $DOG Mode, so the label adds only which release.Tests.
feature_uacomment.pynow requires the whole string (the comments on the Bitcoin Core component, then the $DOG Mode component) and that a peer receives the same string in theversionmessage. On7503240091it fails at the first check, reading/Satoshi:31.1.0(testnode0)/; with this change it passes.feature_includeconf.pyassumed the comments end the string; it now checks that they are present, as Knots' copy of the test does. The full functional suite passes (193 passed, 0 failed, 93 skipped on a macOS build without the wallet). Theutil_testsunit suite passes. Two regtest nodes on one machine, one started with-uacomment=example, report/Satoshi:31.1.0/DOGMode:20260902/and/Satoshi:31.1.0(example)/DOGMode:20260902/ingetnetworkinfo, each sees the other's ingetpeerinfo, and thebitcoin-cli -netinfoheader shows it.The release note is
doc/release-notes-dogmode-user-agent.md. This is independent of #7 and #10.