Bitcoin Forum
December 18, 2017, 09:38:05 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How am I, the payee, notified so quickly of incoming transactions?  (Read 665 times)
Automatic
Full Member
***
Offline Offline

Activity: 238


View Profile
November 27, 2013, 12:49:56 AM
 #1

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?

Please ask for a signed message from my on-site Bitcoin address (Check my profile) before doing any offsite trades with me.
1513589885
Hero Member
*
Offline Offline

Posts: 1513589885

View Profile Personal Message (Offline)

Ignore
1513589885
Reply with quote  #2

1513589885
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513589885
Hero Member
*
Offline Offline

Posts: 1513589885

View Profile Personal Message (Offline)

Ignore
1513589885
Reply with quote  #2

1513589885
Report to moderator
1513589885
Hero Member
*
Offline Offline

Posts: 1513589885

View Profile Personal Message (Offline)

Ignore
1513589885
Reply with quote  #2

1513589885
Report to moderator
Foxpup
Legendary
*
Offline Offline

Activity: 2044



View Profile
November 27, 2013, 03:03:40 AM
 #2

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.

Will pretend to do unverifiable things (while actually eating an enchilada-style burrito) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
btcton
Hero Member
*****
Offline Offline

Activity: 980

Professional SysAdmin / Hobbyist Developer


View Profile
November 27, 2013, 04:44:21 AM
 #3

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.

Automatic
Full Member
***
Offline Offline

Activity: 238


View Profile
November 28, 2013, 04:11:36 AM
 #4

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.

Please ask for a signed message from my on-site Bitcoin address (Check my profile) before doing any offsite trades with me.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!