Skip to content

Conversation

Sjors
Copy link
Member

@Sjors Sjors commented Aug 8, 2018

Salvaged from #12138, and adjusted to current test framework conventions.

Block index inconsistencies are one of the most critical types of
bugs we could see. Making sure we get good coverage of
CheckBlockIndex() is pretty important (and there is minimal, if any
performance difference in a default run).

Test suite on master takes 928-988 seconds on my machine, with this change it takes 901-1045 seconds (n=2, and not a perfect experimental setup).

Block index inconsistencies are one of the most critical types of
bugs we could see. Making sure we get good coverage of
CheckBlockIndex() is pretty important (and there is minimal, if any
performance difference in a default run).
@Sjors
Copy link
Member Author

Sjors commented Aug 8, 2018

cc @TheBlueMatt

@maflcko
Copy link
Member

maflcko commented Aug 8, 2018

utACK 9f47bde

Note that we enable tx pool consistency checks for regtest by default and regtest is the network used by the test framework. So an alternative could be to enable it by default for regtest. Though, the current patch is already a clear improvement.

For reference the help text of the bool arg:

  -checkblockindex
       Do a full consistency check for mapBlockIndex, setBlockIndexCandidates,
       chainActive and mapBlocksUnlinked occasionally. (default: 0)

@maflcko maflcko added the Tests label Aug 8, 2018
@maflcko maflcko changed the title Default to running -checkblockindex in test_framework test: Default to running -checkblockindex in test_framework Aug 8, 2018
@maflcko maflcko changed the title test: Default to running -checkblockindex in test_framework test: Default to running -checkblockindex in test_framework (TheBlueMatt) Aug 8, 2018
@domob1812
Copy link
Contributor

I agree with @MarcoFalke - ideally, these checks should be enabled for regtest net automatically, similar to the mempool checks. That seems much cleaner to me than enabling them using command-line arguments (because those can be forgotten / acidentally removed more easily).

Concept ACK to running the checks regularly on regtest.

@Empact
Copy link
Contributor

Empact commented Aug 11, 2018

As noted by @MarcoFalke in #13913, checkblockindex is active by default on regtest.

fDefaultConsistencyChecks = true;

maflcko pushed a commit that referenced this pull request Aug 11, 2018
…_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  #13912. CC #12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
@Sjors Sjors deleted the 2018/08/test-checkblockindex branch August 11, 2018 11:34
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
…x extra_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  bitcoin#13912. CC bitcoin#12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…x extra_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  bitcoin#13912. CC bitcoin#12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…x extra_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  bitcoin#13912. CC bitcoin#12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…x extra_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  bitcoin#13912. CC bitcoin#12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…x extra_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  bitcoin#13912. CC bitcoin#12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…x extra_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  bitcoin#13912. CC bitcoin#12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…x extra_args

fa31ca0 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke)

Pull request description:

  They are already enabled by default for regtest:

  https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007

  Closes  bitcoin#13912. CC bitcoin#12138

Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574
@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.

5 participants