2
1
In Bolt 3 of the Lightning Network specs, for commitment transactions it states:
locktime: upper 8 bits are 0x20, lower 24 bits are the lower 24 bits of the obscured commitment number.
sequence: upper 8 bits are 0x80, lower 24 bits are upper 24 bits of the obscured commitment number
What is the reason for those specific upper 8 bits? I understand that the lower 24 bits are effectively arbitrary data used for storing the obscured commitment, but then why not use all 32 bits for both?
Ah okay that makes a lot of sense!
So if I understand correctly, technically for the sequence number, instead of setting the first byte specifically to 0x80, both nodes could agree to set it to any number equal to or higher than 0x80, and use the rest of the 7 bits for storing more data, without it affecting any on-chain consensus? – Darius – 2019-11-11T08:30:00.587
2Yes that seems reasonable. Though it would of course violate the Lightning Network "Consensus" which on the channel level is only local anyway (which specifically means that partners could deviate from it) – Rene Pickhardt – 2019-11-11T09:45:01.103