Bitcoin Forum
October 19, 2018, 11:09:38 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Compact Blocks: How are blocks validated in high bandwidth mode?  (Read 444 times)
1t0ph20
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
March 17, 2017, 02:50:23 PM
 #1

Hi! Quick clarifying question.

Compact blocks can be used in both high-bandwidth mode and low-bandwidth mode. In high-bandwidth mode, peer A (sending to B) validates just the block header then relays cmpctblock.

My question is what if the rest of the block is invalid? If the majority of the network was using compact blocks in high-bandwidth mode, wouldn't this mean many only partially validated blocks circulating the network?

Thanks!
1539990578
Hero Member
*
Offline Offline

Posts: 1539990578

View Profile Personal Message (Offline)

Ignore
1539990578
Reply with quote  #2

1539990578
Report to moderator
1539990578
Hero Member
*
Offline Offline

Posts: 1539990578

View Profile Personal Message (Offline)

Ignore
1539990578
Reply with quote  #2

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

Posts: 1539990578

View Profile Personal Message (Offline)

Ignore
1539990578
Reply with quote  #2

1539990578
Report to moderator
1539990578
Hero Member
*
Offline Offline

Posts: 1539990578

View Profile Personal Message (Offline)

Ignore
1539990578
Reply with quote  #2

1539990578
Report to moderator
1539990578
Hero Member
*
Offline Offline

Posts: 1539990578

View Profile Personal Message (Offline)

Ignore
1539990578
Reply with quote  #2

1539990578
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1554
Merit: 1704


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
March 17, 2017, 03:26:23 PM
 #2

No. The partially validated block may propagate but nodes will still validate it fully and then reject the block if it is invalid. Relaying a block before validation does not mean that the block will never be validated by the node; the node will still validate it fully.

1t0ph20
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
March 17, 2017, 04:15:47 PM
 #3

Thank you for the reply.  A follow up then, how are the compact blocks uncompressed (if you get relayed a cmpctblock)?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1554
Merit: 1704


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
March 17, 2017, 04:19:47 PM
 #4

Thank you for the reply.  A follow up then, how are the compact blocks uncompressed (if you get relayed a cmpctblock)?
The compact block contains shortened versions of the transaction ids in a block. The node, when it receives the cmpctblock message, will calculate the shortened txids of all of the transactions that it has in its mempool. It retrieves the transactions that have matching shortened txids from the mempool in order to rebuild the full block. If it cannot find a transaction, it will request it from the peer that sent it the cmpctblock message. In this way the block is relayed without needing to actually send all of the data for the block when the block is relayed; most, if not all, of the transactions in the block will likely be found in the node's mempool and can be rebuilt from there.

1t0ph20
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
March 17, 2017, 06:12:30 PM
 #5

Great explanation! Thank you!
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!