Skip to content
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

Merged
merged 2 commits into from
Oct 1, 2020

Conversation

vasild
Copy link
Contributor

@vasild vasild commented Aug 13, 2020

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.
@vasild vasild force-pushed the bip155_time_and_varint branch from 41f49f2 to 44ff4bf Compare August 13, 2020 09:53
@vasild
Copy link
Contributor Author

vasild commented Aug 13, 2020

cc @jonasschnelli @luke-jr - this touches your suggestions.

@vasild
Copy link
Contributor Author

vasild commented Aug 13, 2020

Render preview

@vasild
Copy link
Contributor Author

vasild commented Aug 13, 2020

cc also @laanwj as the author of BIP155 and @sipa who was involved in the VARINT vs CompactSize discussion.

@sipa
Copy link
Member

sipa commented Sep 16, 2020

LGTM

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good

@laanwj
Copy link
Member

laanwj commented Sep 17, 2020

ACK but agree with @jonatack nit

@troygiorshev
Copy link

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.
@vasild vasild force-pushed the bip155_time_and_varint branch from 44ff4bf to 87ef5aa Compare September 29, 2020 09:13
@vasild
Copy link
Contributor Author

vasild commented Sep 29, 2020

Addressed nit: s/64-bit wide/64 bits wide/

@laanwj
Copy link
Member

laanwj commented Sep 29, 2020

re-ACK

@troygiorshev
Copy link

reACK

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@luke-jr luke-jr merged commit 94073de into bitcoin:master Oct 1, 2020
@vasild vasild deleted the bip155_time_and_varint branch October 1, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants