Author

Topic: Question about ServiceFlags: None and NetworkLimited (Read 170 times)

legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
They user agent name sounds like an unsynchronized bitcoin cash node back from when they could still connect to bitcoin nodes (CMIIW but I believe there was a timeframe when BCH nodes could connect to BTC nodes before a BIP was rolled out that prevented this?), maybe they defined a bunch of flags that are unrecognized in bitcoin. But the height doesn't correspond, but even then we know that someone had to have forked Bitcoin core to add those extra flags.
As far as I can tell there is no code in bitcoin core that blocks connection based on user-agent. There was a optional patch back in 2017 that people could use to block certain ones if they chose to IIRC.
That is irrelevant here since any of those fork-coins start from blocks in 2017 (height 500k maybe), this was a fake block in early days (height <20k).
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
I don't think fake, Sybil-kind nodes would use this ServiceFlag because they have to run in NodeNetwork mode for peers to download blockchain data from them.
There are all kinds of crazy "nodes" out there that weird service flag doesn't surprise me.
Just before I started this topic I received fake block headers with height <20000 from one; sadly I thought there was a bug in my code so I didn't record its IP address or the block hashes, just remember the useragent was saying bitcoinABC.

That user agent name sounds like an unsynchronized bitcoin cash node back from when they could still connect to bitcoin nodes (CMIIW but I believe there was a timeframe when BCH nodes could connect to BTC nodes before a BIP was rolled out that prevented this?), maybe they defined a bunch of flags that are unrecognized in bitcoin. But the height doesn't correspond, but even then we know that someone had to have forked Bitcoin core to add those extra flags.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
I don't think fake, Sybil-kind nodes would use this ServiceFlag because they have to run in NodeNetwork mode for peers to download blockchain data from them.
There are all kinds of crazy "nodes" out there that weird service flag doesn't surprise me.
Just before I started this topic I received fake block headers with height <20000 from one; sadly I thought there was a bug in my code so I didn't record its IP address or the block hashes, just remember the useragent was saying bitcoinABC.
staff
Activity: 4284
Merit: 8808
According to the source code, NetworkLimited nodes can only sere the latest 288 block headers. https://github.com/bitcoin/bitcoin/blob/42ed7f51fafa9f5de3b4262d28dbb7493c1eeb0f/src/protocol.h#L286-L289
Blocks are not blockheaders.

Limited peers can serve all headers, but they only serve the latest 288 blocks from their tip.

https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki


If something is accepting connections but has a service flag of 0 it's probably some weird spything.  If it makes a connection to you with a service flag of zero it may be a SPV wallet, but its more likely a spynode pretending to be a spv wallet (as there are more spynodes than p2p spv wallets).
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
According to the source code, NetworkLimited nodes can only sere the latest 288 block headers. https://github.com/bitcoin/bitcoin/blob/42ed7f51fafa9f5de3b4262d28dbb7493c1eeb0f/src/protocol.h#L286-L289

NodeNone basically means it doesn't have NodeNetwork or any of the other ServiceFlags set. And since (paraphrasing from the code) "NODE_NETWORK means that the node is capable of serving the complete block chain" (source), and it's "currently set by all Bitcoin Core non pruned nodes, and is unset by SPV clients or other light clients" (same line), that implies SPV nodes are running with a ServiceFlags of NodeNone.

I don't think fake, Sybil-kind nodes would use this ServiceFlag because they have to run in NodeNetwork mode for peers to download blockchain data from them.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
1. Why or when would a node set its ServiceFlags to NONE?
I'm probably testing "fake" nodes again but they seem to be providing me with headers without an issue.

2. Are NetworkLimited nodes capable of supplying all block headers even though they don't have most of the blocks?
Jump to: