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

BIP100: Dynamic maximum block size by miner vote #188

Merged
merged 8 commits into from May 14, 2017

Conversation

dgenr8
Copy link
Member

@dgenr8 dgenr8 commented Mar 13, 2017

These changes are for Bitcoin XT. For the Bitcoin Core version, see bitcoinxt/bitcoin#1.

Implementation of the BIP100 specification as published.

Full nodes need no configuration to follow the network sizelimit as determined by BIP100. Miners may set their coinbase /B vote using

-maxblocksizevote=<n> Set vote for maximum block size in megabytes (default: network sizelimit)

Most RPC's return the sizelimit as of the current tip, consistent with the other attributes. getblocktemplate returns the sizelimit for a block built on the current tip, which may change by a factor of up to 1.05 at the start of a difficulty interval, per the specification.

On first run, block index entries starting at the activation height (449568, which was in January 2017) are updated to track miner size votes and sizelimit history. Use -debug=reindex (NOT -reindex) to see the progress of this update.

The current network sizelimit is published in the user agent string as EB.

This implementation does not lift the 32MB physical MAX_SIZE limit. File buffer sizes, sanity checks in bitcoin-tx, verifytxoutproof, and merkle blocks also continue to reference MAX_BLOCK_SIZE as a general scale indicator.

@dgenr8
Copy link
Member Author

dgenr8 commented Mar 21, 2017

Pushed a parser bugfix from @dagurval. We'll squash these after a while.

@dgenr8
Copy link
Member Author

dgenr8 commented Mar 23, 2017

Pushed changes to support specification update jgarzik/bip100#20.

@dgenr8
Copy link
Member Author

dgenr8 commented Mar 26, 2017

Pushed coinbaseaux support from @dagurval.

dgenr8 and others added 3 commits May 1, 2017 17:31
With Dagur Johannsson <dagurval@pvv.ntnu.no>
Unit tests for GetNextMaxBlockSize and FindVote.
Multi-node voting regression test.

With Tom Harding <tomh@thinlink.com>
Includes regtest routines by Gavin Andresen <gavinandresen@gmail.com>
@dgenr8
Copy link
Member Author

dgenr8 commented May 2, 2017

Pushed vote search edge cases and some squashes.

dagurval and others added 5 commits May 1, 2017 18:23
Max sigops calculation changed to use actual block size
rather than hardLimit
This adds BIP100 votes to blocks generated by miner software that
uses the rpc call getblocktemplate.
A vote of zero in either B or EB is distinct from garbage.
Makes validation compatible with BIP100.
@dgenr8
Copy link
Member Author

dgenr8 commented May 2, 2017

Added compact blocks update from @dagurval.

@dgenr8 dgenr8 modified the milestone: G May 10, 2017
@dgenr8 dgenr8 added the G label May 10, 2017
@dagurval
Copy link
Member

ACK

@dgenr8 dgenr8 merged commit 9837cfa into bitcoinxt:master May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants