Unknown services flag are ignored by node that don't know them, but what about GETDATA messages and identifiers?

For services flag, if node is not updated e.g to segWit, it will just not check (1<<3) bit in services field.

What happens if non-segWit node gets MSG_WITNESS_TX as one of the identifier in GETDATA message? MSG_WITNESS_TX is same as MSG_TX but with (1<<30) bit set. Are these identifiers and their bits treated as flags (like services flag -> bits are checked), so non-segWit node won't even check (1<<30) bit and will send back TX message or they are treated as values, so it will understand MSG_WITNESS_TX as an wrong value and reject the message?


1 Answer 1


That would be a violation of BIP144.

Support for segwit is signalled by having NODE_WITNESS in the services advertized in the version packet. If a peer does not signal NODE_WITNESS, it cannot be sent MSG_WITNESS_TX or MSG_BLOCK_TX invs.

Nodes are not required to understand these inv types if they don't signal support for segwit. For example, Bitcoin Core 0.12.x (and probably many versions before it) would just ignore such invs.

  • Is the checking of inv types generally in Bitcoin core at the bit level (like checking flags, e.g. services advertized) or is the entire value checked as a single (e.g. whether is it or not 0x40000001-1073741825 for MSG_WITNESS_TX)?
    – Cosmos
    Dec 18, 2023 at 22:20
  • 1
    The implementation checks the entire value Dec 18, 2023 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.