Added original Bitcoin white paper.
This feels at home because it really is the basis of the project. A PDF is wanted because this document is not supposed to be edited.
On some systems, these tests fail because the default 200
BIP101-version blocks are mined before the test begins, causing
them to think BIP65 is already in effect.
This is a belt-and-suspenders fix to make sure CreateNewBlock() or external mining software can never produce a block that violates the MAX_BLOCK_SIGHASH rule.
It does this by rejecting transactions that do too much signature hashing -- they are not added to the memory pool, and so will not be considered for inclusion in new blocks.
How the code works: every transaction uses up some fraction of the MAX_BLOCK_SIZE limit and the MAX_BLOCK_SIGHASH limit. If a transaction uses up a larger fraction of the SIGHASH limit than the SIZE limit, it is rejected. That ensures that no matter which transactions are selected for the block, the SIZE limit will be hit before the SIGHASH limit.
This is a much simpler solution than modifying CreateNewBlock or external transaction selection software to keep track of the SIZE limit, the SIGOPS limit, AND the new SIGHASH limit.
This is belt-and-suspenders because, in practice, the 100,000-byte IsStandard size limit prevents the block SIGHASH limit from being hit.
The IsStandard code related to the old SIGOPS limit is left unchanged.
Conflicts:
src/main.cpp
Adds a ValidationCostTracker class that is passed to
CheckInputs() / CScriptCheck() to keep track of the exact number
of signature operations required to validate a block, and the
exact number of bytes hashed to compute signature hashes.
Also extends CHashWriter to keep track of number of bytes hashed.
Signature operations per block are limited to MAX_BLOCK_SIGOPS
(unchanged at 20,000)
Bytes hashed to compute signatures is limited to MAX_BLOCK_SIGHASH
(1.3 GB in this commit).
Conflicts:
src/main.cpp
src/miner.cpp
src/script/interpreter.h
Activation code for a two megabyte block size increase.
Activation condition:
750 of 1000 blocks with version bit 0x10000000 set, then a four-week
(28-day) grace period, after which miners may create 2MB
blocks.
Conflicts:
qa/pull-tester/rpc-tests.sh
qa/rpc-tests/bipdersig-p2p.py
src/chainparams.cpp
src/main.cpp
src/miner.cpp
Additionall; Fix unit test.
Instead of relying on default, specify block size.
b460004 release-notes: Minor corrections and clarifications re Priority (Luke Dashjr)
3450f4c release-notes: Significantly rewrite priority transactions section (Gregory Maxwell)
d0dbb6d release-notes: Remove suggestion to use 0.11 (Luke Dashjr)
73a0375 release-notes: Mention possibility of priority removal in 0.13, uncertainty of priority calculation being changed back, and request community input (Luke Dashjr)
4b8d2bc release-notes: Cover priority changes correctly, removing mentions of possible futures (Luke Dashjr)
If number of conflict confirms cannot be determined, this means
that the block is still unknown or not yet part of the main chain,
for example during a reindex. Do nothing in that case,
instead of crash with an assertion.
Fixes#7234.
Github-Pull: #7491
Rebased-From: 40e7b61835