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

DEPENDENT: Chainparams: Introduce N testnet chains to test different block sizes #6382

Closed
wants to merge 15 commits into from

Conversation

jtimon
Copy link
Contributor

@jtimon jtimon commented Jul 6, 2015

This creates std::numeric_limits<uint64_t>::max() new testchains, each one with a different maximum block size and genesis block.
It would be generally good to have more people collecting data and
conduction simulations related to different consensus maximum block sizes.
This PR attempts to simplify that work.
Even if it may take long until it is merged (because it requires many
little steps to be taken first), this branch (or a fork of it) can be used right now for
testing purposes.

One can use it, for example, like this: ./src/qt/bitcoin-qt -chain=sizetest -debug -printtoconsole -gen=1 -genproclimit=20 -blocksize=2000000

I will rebase and update the list of dependencies accordingly as
things get merged.

Dependencies:

Similar branches on top of older versions:

https://github.com/jtimon/bitcoin/tree/chainparams-sizetest-0.11

@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch 2 times, most recently from 4d8e7d9 to cb64088 Compare July 7, 2015 00:08
@jtimon jtimon changed the title DEPENDENT: Chainparams: Introduce N testnet chains to test different block sizes WIP: Chainparams: Introduce N testnet chains to test different block sizes Jul 7, 2015
@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch 2 times, most recently from 4d1a42a to 6d33e08 Compare July 12, 2015 10:27
@laanwj laanwj added the Tests label Jul 17, 2015
@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch 2 times, most recently from 8f8eef1 to 321715d Compare July 21, 2015 17:37
@jtimon
Copy link
Contributor Author

jtimon commented Jul 21, 2015

Rebased after #6381. Also rebased back in time to 0.11: https://github.com/jtimon/bitcoin/tree/chainparams-sizetest-0.11

@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch from 321715d to 490793a Compare July 21, 2015 18:24
@JornC
Copy link

JornC commented Jul 30, 2015

Spun up a node and block explorer on top of this PR:

http://sizenet.yogh.io/#json:getinfo
http://sizenet.yogh.io/#json:getblockchaininfo

Availability subject to change, will jump back to the main chain when no longer needed - if needed at all.

(still synching)

@jtimon
Copy link
Contributor Author

jtimon commented Aug 21, 2015

Rebased and fixed (see #6077 (comment) ).

@jtimon jtimon changed the title WIP: Chainparams: Introduce N testnet chains to test different block sizes DEPENDENT: Chainparams: Introduce N testnet chains to test different block sizes Aug 27, 2015
@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch 2 times, most recently from 8237db6 to e20dc9d Compare September 4, 2015 19:15
@jtimon
Copy link
Contributor Author

jtimon commented Sep 4, 2015

This wasn't passing travis because of a small bug in jtimon@989e374 (#6625). I will wait for travis to approve this to force push #6625.

@TheBlueMatt
Copy link
Contributor

NACK. I think the code should exist for people to use for testing, but I dont think Bitcoin Core is the place to support a ton of test/benchmark chains. This is different from the regtest/testnet chains, which exist to create a bitcoin-in-a-box for testing, but which try to mimic Bitcoin where convinient for testing, not to test changes to Bitcoin itself.

@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch 3 times, most recently from b332cd8 to 90bf990 Compare November 14, 2015 14:27
@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch 3 times, most recently from 8fdf0bd to 729bf3b Compare December 1, 2015 22:11
jtimon and others added 15 commits December 3, 2015 12:47
…tion number

This is a no-op change. For now, everything passes MAX_BLOCK_SIZE / 60, so the
result matches what it would've before.

Tests use a number equal to the number of transactions where necessary,
to ensure that they're never rejected when blocksizesize isn't being tested.
This is a no-op change.

Tests use a value of std::numeric_limits<uint64_t>::max() where necessary, to ensure that they're never
rejected when size isn't being tested.
…sus.h (as functions)

The following are now tied to a chain rather than being defined as global
constants. Their values have not changed.

nMinTxSize
nMaxBlockSize
nMaxTxSize
nMaxBlockSigops
nCoinbaseMaturity

Also, for free (diff-wise):

Blocksize: Turn MAX_BLOCK_SIZE (nMaxBlockSize) and MAX_BLOCK_SIGOPS (nMaxBlockSigops) into functions

...which take Consensus::Params as parameter
This will be convenient to reduce the diff of any proposal that changes the blocksize as a hardfork
@jtimon jtimon force-pushed the chainparams-sizetest-0.11.99 branch from 729bf3b to 2e7cb31 Compare December 3, 2015 12:32
@jtimon
Copy link
Contributor Author

jtimon commented Jan 13, 2016

Closing. It will be eventually replaced with a similar one that doesn't use block size as an example.

@jtimon jtimon closed this Jan 13, 2016
jtimon referenced this pull request in sipa/bitcoin Apr 6, 2016
Rebased by Pieter Wuille.
Cleanup by Matt Corallo.
jtimon referenced this pull request in sipa/bitcoin Apr 6, 2016
jtimon added a commit to jtimon/bitcoin that referenced this pull request Mar 24, 2017
- Chainparams: Use a regular factory for creating chainparams
- Chainparams: Get rid of CChainParams& Params(std::string)
- Chainparams: Use the factory for pow tests

Upstream: [0.13-chainparams-factory] (replaces bitcoin#6382)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants