Author

Topic: How am I, the payee, notified so quickly of incoming transactions? (Read 772 times)

full member
Activity: 238
Merit: 109
It doesn't generate the quickest route, or any particular route at all. When someone sends a transaction, it is sent to every peer that client is connected to, and every one of those peers relays it on to every peer that they're connected to, and so on, taking every possible route. Obviously one of those routes must be the quickest one.

That's not to say you can't set up a direct connection in order to guarantee that a fast route will always be available, but that simply isn't necessary for most applications.

So, I drew it out in paint to help explain it to myself (Not very good with P2P imagination, if I'm honest), and, I understand that. In the below picture I drew, where nodes are in a 'circle' (Obviously they geographically could be anywhere, and, connected to any node anywhere else), each node is connected to four other nodes, two to it's left, and, two to it's right. The originating node is red, the receiving node is green, the fastest route is blue, and, any 'extra' relays are black:-



Now, everyone should (in theory, am I wrong?) receive the same transaction four times, and, broadcast it off three times (Excluding the sender, who receives it zero times and sends it four times). Now, what if that happens, and, everyone is happy that all their 'connected' nodes know that this transaction exists, but, then a new node connects to the network BEFORE the transaction is put into a block? That means that it doesn't have to 'update' to said block, as, the transaction hasn't been placed into a block yet, but, everyone already thinks everyone else is aware of it.

So, they connect (Pink node), and, connect to four random nodes themselves (Brown lines):-


At this point, would the pink node be unaware of any transaction before they joined, but, after the most recent block? I know I'm deviating away from the main question I asked, but, I feel like you explained it pretty well and I don't need any more explanation on that topic, however, it did spark this question.
legendary
Activity: 1302
Merit: 1007
To add to the above post, even if it took the longest route to get to you, you would probably not notice any delay still. You can sort of compare it to websites. You can load a European website from Australia in less than a second without noticing the difference between that and a website located in your neighbor's house.
legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
It doesn't generate the quickest route, or any particular route at all. When someone sends a transaction, it is sent to every peer that client is connected to, and every one of those peers relays it on to every peer that they're connected to, and so on, taking every possible route. Obviously one of those routes must be the quickest one.

That's not to say you can't set up a direct connection in order to guarantee that a fast route will always be available, but that simply isn't necessary for most applications.
full member
Activity: 238
Merit: 109
Literally seconds after sending a payment across the global, I'm notified of it. How does this work? There must be some sort of direct connection going on, and, not it just being relayed by randomized P2P connections.

So, how does it generate the quickest route to me? If we left it down to randomness, I'm sure it'd take at-least a minute, if not a whole lot longer, am I wrong?
Jump to: