With bitcoin's gossip protocol, could we take for granted that if I sent transaction, for example, at 1:00 PM on 1st January 2018 UTC then every node connected to network from 1:00 PM to let's say (for network latency) 1:05 PM 1st January 2018 would receive that transaction, because of how the gossip protocol works?

And by everyone I mean completely every node that was connected at that time to the network? Or maybe my transaction could not reach some node(s) for some reason and why?

Given some time for network latency, do messages reach absolutely all connected peers and how long it takes for them to do that?

  • @zombie, I didn't understand why you would put node(s) into code formatting and thought that the timestamps were a bit weird already as well. Could you perhaps elaborate your formatting strategy? – Murch Jul 1 '18 at 22:35
  • @Murch i want to incredibly simple ways to get more people to read content – Zombie Jul 3 '18 at 13:43

Given some time for network latency, do messages reach absolutely all connected peers and how long it takes for them to do that?

Usually, standard transactions that pay a sufficient fee to be acceptable to most mempools, without any conflicts on the network will reach almost all nodes within a minute or so.

However, there is no guarantee whatsoever that it will reach all nodes. Every node has its own relay policy, and even perfectly correctly behaving nodes may choose not to relay anything at all.

Most of the delay is due to intentional delay in the propagation. Random delays are added before forwarding in order to obscure the source of transactions. Each hop on average takes 5-10 seconds.

Bitcoin has a subsystem with absolute propagagion guarantees though - the blockchain. While obviously subject to not being partitioned off the network, every node eventually learns the best chain. There are no guarantees on how long that takes, or which transactions are included in it.

  • 2
    You may want to mention that nodes have many links in parallel so the time to get anywhere from a single node is divided by 9 or so from that 5-10 seconds you mention. You also might want to mention that Bitcoin intentionally delayed tx relay from day one, though the way its done has changed over time. – G. Maxwell Jan 18 at 14:05

Generally, all full nodes should receive your transaction within a few minutes easily. There are a few exceptions, though.

  1. Non-standard transactions will only be propagated once they are included in a block. That also means that if you're sending a segwit transaction, full nodes that are not segwit compatible will only download the transaction after it is included in a block as it appears non-standard to them. This should only affect few full nodes today, e.g. Bitcoin Unlimited nodes and Bitcoin Core nodes older than 0.13.0.
  2. If your transaction has a fee rate below the minRelayTxFee it will not be propagated and requested by most nodes.
  3. If there is a large number of transactions waiting that exceed the default mempool size and your transactions fee rate is lower than the cutoff, most nodes will not learn about your transaction until the mempool relaxes.
  • 1
    Don't forget conflicting transactions (double spends). – Pieter Wuille Jul 2 '18 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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