Skip to content

Commit 9d4ec80

Browse files
committed
bip-0300: Reorder upvote vector version numbers to leave 1/2 bytes as version 1,2 respectively
1 parent 69d8724 commit 9d4ec80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bip-0300.mediawiki

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,11 @@ The upvote vector will code "abstain" as 0xFF (or 0xFFFF); it will code "alarm"
287287

288288
For example: if there are two sidechains, and we wish to upvote the 7th bundle on sidechain #1 plus the 4th bundle on sidechain #2, then the upvote vector would be { 07, 04 }. And M4 would be [0x6A,D77D1776,00,0006,0003].
289289

290-
The version number allows us to shrink the upvote vector in many cases. Version 0x00 requires a full two bytes per sidechain, but it always works. Version 0x01 uses half that (one byte per sidechain), and it works while all sidechains have fewer than 255 disputed withdrawals (ie, 99.99%+ of the time). Version 0x02 uses zero bytes (ie, 6 bytes for the whole M4) and sets this block's M4 equal to the previous block's M4. Version 0x03 upvotes only those withdrawals that are leading their rivals by at least 50 votes.
290+
The version number allows us to shrink the upvote vector in many cases.
291+
Version 0x00 omits the upvote vector entirely (ie, 6 bytes for the whole M4) and sets this block's M4 equal to the previous block's M4.
292+
Version 0x01 uses one byte per sidechain, and can be used while all ACKed withdrawals have an index under 256 (ie, 99.99%+ of the time).
293+
Version 0x02 uses a full two bytes per sidechain, but it always works no matter how many withdrawl proposals exist.
294+
Version 0x03 omits the upvote vector, and instead upvotes only those withdrawals that are leading their rivals by at least 50 votes.
291295

292296
If a sidechain has no pending bundles, then it is skipped over when M4 is created and parsed.
293297

0 commit comments

Comments
 (0)