7

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

And by everyone I mean every single node that was connected to the network at that time.

Given some time for network latency, do messages reach all connected peers, and if so, how long does it take for them to do that?

2
  • @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
    Commented Jul 1, 2018 at 22:35
  • @Murch i want to incredibly simple ways to get more people to read content
    – Zombie
    Commented Jul 3, 2018 at 13:43

2 Answers 2

8

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.

1
  • 4
    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
    Commented Jan 18, 2019 at 14:05
2

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, non-segwit nodes will not add it to their mempool or propagate it 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.
  4. Nodes usually will not accept any transactions to their mempool that conflict with another transaction they already know about. E.g. if a node heard about two transactions that spend the same input, it would only consider the first valid (unless the other gets included in a block).
0

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.