This repository has been archived by the owner on Oct 9, 2019. It is now read-only.
forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 55
2M base block size increase #11
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b86592d
chainparams: segwit2x deployment on testnet, regtest
jgarzik 5318a1e
[consensus] Decouple max-tx-per-block from max-block-size
jgarzik 3fe3029
[consensus] Forward port BIP102 - 2M block size increase
jgarzik c470ca6
consensus/consensus.h: unify fork trigger code
jgarzik e024d5c
[consensus] Add 3-month minimum seasoning requirement for SegWit
jgarzik 4f8f744
[consensus] double MAX_BLOCK_SERIALIZED_SIZE sanity check consensus l…
jgarzik 3d7172c
[consensus] Scale block weight based on base block size
jgarzik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000; | |
/** Maximum number of signature check operations in an IsStandard() P2SH script */ | ||
static const unsigned int MAX_P2SH_SIGOPS = 15; | ||
/** The maximum number of sigops we're willing to relay/mine in a single tx */ | ||
static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5; | ||
static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = 16000; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is that 16000 number come from? Should it have a comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the same value as before. |
||
/** Default for -maxmempool, maximum megabytes of mempool memory usage */ | ||
static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300; | ||
/** Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or BIP 125 replacement **/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -681,17 +681,17 @@ UniValue getblocktemplate(const JSONRPCRequest& request) | |
result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1)); | ||
result.push_back(Pair("mutable", aMutable)); | ||
result.push_back(Pair("noncerange", "00000000ffffffff")); | ||
int64_t nSigOpLimit = MAX_BLOCK_SIGOPS_COST; | ||
int64_t nSigOpLimit = MaxBlockSigOpsCost(pindexPrev->nHeight+1, fPreSegWit?false:true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fPreSegWit?false:true is probably more conventionally written as |
||
if (fPreSegWit) { | ||
assert(nSigOpLimit % WITNESS_SCALE_FACTOR == 0); | ||
nSigOpLimit /= WITNESS_SCALE_FACTOR; | ||
} | ||
result.push_back(Pair("sigoplimit", nSigOpLimit)); | ||
if (fPreSegWit) { | ||
result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_BASE_SIZE)); | ||
result.push_back(Pair("sizelimit", (int64_t)MAX_LEGACY_BLOCK_SIZE)); | ||
} else { | ||
result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SERIALIZED_SIZE)); | ||
result.push_back(Pair("weightlimit", (int64_t)MAX_BLOCK_WEIGHT)); | ||
result.push_back(Pair("weightlimit", (int64_t)MaxBlockWeight(0, false))); | ||
} | ||
result.push_back(Pair("curtime", pblock->GetBlockTime())); | ||
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits))); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 60, I think. Why did you remove this definition "(::GetSerializeSize(CTransaction(), SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS))"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used for a sanity check in compact block stuff. It must be the absolute minimum size of a serialised CTransaction (zero inputs, zero outputs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which in turn increases the vtx limit (below) to 100000 from 16666