Bitcoin Forum
April 30, 2024, 10:07:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why do nodes receive unconfirmed transactions while they're at IBD?  (Read 97 times)
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1498
Merit: 7302


Farewell, Leo


View Profile
October 29, 2022, 07:51:09 PM
 #1

I was just testing a clean machine and realized this; why does a syncing node have a mempool? A node that hasn't reached the chain tip can't know if the received unconfirmed transactions are valid or not. I don't know if it propagates them too (haven't made any github search), but since it receives them, and keeps them in memory (confirmed it with a getmempoolinfo), I presume that it's reasonable to propagate them as well.

But, since it hasn't reached the chain tip, the conclusion is that it receives (and propagates) transactions whose validity hasn't been checked (by consensus rules' enforcement). Is this true? If yes, why? Can't there be an attack established on non-synced nodes who'll propagate invalid transactions and have their IP blacklisted?

I'm confident that there's always an answer for everything in Bitcoin Core.

Edit: I misinterpreted getmempoolinfo. With a getrawmempool, it returns an empty array. So... no mempool for non-synced nodes?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
1714471642
Hero Member
*
Offline Offline

Posts: 1714471642

View Profile Personal Message (Offline)

Ignore
1714471642
Reply with quote  #2

1714471642
Report to moderator
1714471642
Hero Member
*
Offline Offline

Posts: 1714471642

View Profile Personal Message (Offline)

Ignore
1714471642
Reply with quote  #2

1714471642
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714471642
Hero Member
*
Offline Offline

Posts: 1714471642

View Profile Personal Message (Offline)

Ignore
1714471642
Reply with quote  #2

1714471642
Report to moderator
1714471642
Hero Member
*
Offline Offline

Posts: 1714471642

View Profile Personal Message (Offline)

Ignore
1714471642
Reply with quote  #2

1714471642
Report to moderator
1714471642
Hero Member
*
Offline Offline

Posts: 1714471642

View Profile Personal Message (Offline)

Ignore
1714471642
Reply with quote  #2

1714471642
Report to moderator
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10517



View Profile
October 30, 2022, 04:19:52 AM
Last edit: October 30, 2022, 04:35:22 AM by pooya87
 #2

There are two ways to send mempool transactions. One is through a tx message which is rejected right away if it is received by a node that is currently syncing (Initial Block Download)
https://github.com/bitcoin/bitcoin/blob/4f270d2b63913b86c4366756031c5003837075d6/src/net_processing.cpp#L3977

Another way (the main way) is through an inv message which is rejected only if the txrelay returns false. Although I can't figure out whether there is a connection with IBD and if this line returns false if the node is during IBD.
https://github.com/bitcoin/bitcoin/blob/4f270d2b63913b86c4366756031c5003837075d6/src/net_processing.cpp#L1062-L1063

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5568


Self-proclaimed Genius


View Profile
October 30, 2022, 04:28:49 AM
 #3

Edit: I misinterpreted getmempoolinfo. With a getrawmempool, it returns an empty array. So... no mempool for non-synced nodes?
getmempoolinfo should also return with empty "size" if it's empty.
This is a wild guess but I think you've used getmemoryinfo instead of getmempoolinfo the first time you tried.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!