-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BIP155: clarify variable integer format and change time to fixed 32 bit #967
Conversation
32 bit unsigned can represent time up to year 2106 (32 bit signed is limited to just 2038). So, we don't need to have "time" encoded as variable integer which would take 5 bytes instead of 4.
41f49f2
to
44ff4bf
Compare
cc @jonasschnelli @luke-jr - this touches your suggestions. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good
ACK but agree with @jonatack nit |
ACK |
The Bitcoin Core source code has `VARINT` type which is different than the "variable integer" format used all over the P2P protocol and also for the "services" field in this BIP. The latter is called `CompactSize` in some BIPs and also in the Bitcoin Core source code, thus use the word `CompactSize` to refer to it and link to its documentation.
44ff4bf
to
87ef5aa
Compare
Addressed nit: |
re-ACK |
reACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Clarify that by
VARINT
(variable integer) we meanCompactSize
, notVARINT
(as in the source code) (huh!?). Relevant IRC discussion: http://www.erisian.com.au/bitcoin-core-dev/log-2020-07-27.html#l-94Change
time
to fixed 32 bits as that will work until year 2106, not just 2038 and takes 1 byte less than a variable integer format.