0

If an INV type unknown to the node appears in an INV message, a GETDATA message or some other message where the INVETORY structure is used (e.g. MSG_WITNESS_TX for non-segWit nodes, MSG_WITNESS_TX in an INV message for segWit/non-segWit node, some random INV type, etc.) , is the whole message then considered invalid or only that "row" in the message is skipped/ignored, while the other rows and the rest of the message are processed?

1 Answer 1

1

In Bitcoin Core, as of version 26.0, INV entries of unknown type are ignored and skipped (and optionally logged, if "net" debugging is on); later entries in the same message are still processed.

On incoming INV messages, MSG_WITNESS_TX is treated the same as MSG_TX, and MSG_FILTERED_BLOCK, MSG_CMPCT_BLOCK and MSG_WITNESS_BLOCK are treated the same as MSG_BLOCK.

9
  • Does it apply to all messages in which the given structure (INV) appears or are there exceptions?
    – Cosmos
    Commented Dec 19, 2023 at 0:35
  • I ask because only MSG_TX and MSG_BLOCK should appear in INV messages, but what if MSG_WITNESS_TX or MSG_WITNESS_BLOCK appears. They are a known type to the segWit node, but should not appear in the INV message. Are such rows ignored or the message is considered as invalid and rejected?
    – Cosmos
    Commented Dec 19, 2023 at 0:43
  • 1
    Updated my answer. Commented Dec 19, 2023 at 1:18
  • @MudjaAdjum My answer is specifically about Bitcoin Core 26.0, which does support segwit. "updating to segwit" has no meaning here; you need to talk about specific versions of specific software. There is no guarantee that any other version/implementation behaves similarly. Commented Dec 19, 2023 at 2:00
  • 1
    @MudjaAdjum Yes, my point is that you have to be specific about what versions of what software you're talking about. E.g. 0.13.0 also treats MSG_WITNESS_TX as MSG_TX, but didn't have segwit active (that only happened in 0.13.1). Commented Dec 19, 2023 at 8:30

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.