Skip to content

Orphan-triggered tx fetch does not ask for witness data #9182

@sipa

Description

@sipa

Reported by @Roasbeef and @chjj on IRC.

Describe the issue

When we receive a transaction with an unknown input, since 0.13.0 we send a getdata for that transaction in response, to quickly learn the dependency. Unfortunately, we always ask for it as MSG_TX instead of MSG_WITNESS_TX.

Can you reliably reproduce the issue?

18:20:33 < roasbeef> hmm, chjj and I seem to be encountering some odd behavior with segwit enabled core nodes on testnet: they aren't including witness_tx inv's in their getdata's when
                     fetching transactions, so they fetch witness output spending transactions without the witness data (though the service bit is set). this should cause an immediate
                     rejecvt due to the clean-stack rules, but they keep accepting the txns, sending a delayed reject minutes afterwards
18:26:52 < sipa> roasbeef: they send MSG_TX getdatas instead of MSG_WITNESS_TX ?
18:27:11 < roasbeef> sipa: yeh

Expected behaviour

Don't see any MSG_TX getdatas between witness-enabled peers.

Actual behaviour

See some MSG_TX getdatas.

What version of bitcoin-core are you using?

18:28:08 < chjj> sipa: seems to be both 13.0 and 13.1 nodes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions