Bitcoin Forum
May 21, 2024, 02:07:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Distribution range for sending Transaction to inbound and outbound connections  (Read 53 times)
Thomason222 (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 6


View Profile
March 05, 2024, 12:37:05 PM
Merited by BlackHatCoiner (4), ABCbits (2)
 #1

Hi,
I would like to know in which files of the Bitcoin core code I can find the Transaction propagation algorithm? The exact thing I need is to know the time distribution, when the transactions are sent to the inbound and outbound connections. I guess it is some uniform distribution or something like that, but need to know the distribution range.
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
March 05, 2024, 01:28:08 PM
Merited by ABCbits (4), BlackHatCoiner (4)
 #2

It's an exponential distribution. Transactions are relayed through the inv messages, and there are indeed delays to prevent topological analysis. The timing depends on whether it is an inbound and outbound, should be lambda of 5 seconds for inbound connections, 2 for outbound connections.

Relevant code is here for the delay: https://github.com/bitcoin/bitcoin/blob/2b260eadf7960290328e13dbdb029fd506105ca4/src/net_processing.cpp#L5784
Function for the exp dist function: https://github.com/bitcoin/bitcoin/blob/2b260eadf7960290328e13dbdb029fd506105ca4/src/random.cpp#L764

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Thomason222 (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 6


View Profile
March 05, 2024, 01:39:08 PM
 #3

Thank you so much!
Really appreciate.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!