From 53553df4a87a2b11964636a9aca9a5f8b074f50c Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Tue, 5 Jun 2018 10:31:39 -0700 Subject: [PATCH] [lbry] blockchain, txscript: change maxScriptElementSize from 520 t0 20,000 bytes --- blockchain/fullblocktests/generate.go | 4 ++-- txscript/script.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blockchain/fullblocktests/generate.go b/blockchain/fullblocktests/generate.go index aee67810..592a14de 100644 --- a/blockchain/fullblocktests/generate.go +++ b/blockchain/fullblocktests/generate.go @@ -35,7 +35,7 @@ const ( minCoinbaseScriptLen = 2 maxCoinbaseScriptLen = 100 medianTimeBlocks = 11 - maxScriptElementSize = 520 + maxScriptElementSize = 20000 // numLargeReorgBlocks is the number of blocks to use in the large block // reorg test (when enabled). This is the equivalent of 1 week's worth @@ -1875,7 +1875,7 @@ func Generate(includeLargeReorg bool) (tests [][]TestInstance, err error) { // // Comment assumptions: // maxBlockSigOps = 20000 - // maxScriptElementSize = 520 + // maxScriptElementSize = 20000 // // [0-19999] : OP_CHECKSIG // [20000] : OP_PUSHDATA4 diff --git a/txscript/script.go b/txscript/script.go index 696bfe2d..1b3a60bd 100644 --- a/txscript/script.go +++ b/txscript/script.go @@ -39,9 +39,9 @@ const ( // These are the constants specified for maximums in individual scripts. const ( - MaxOpsPerScript = 201 // Max number of non-push operations. - MaxPubKeysPerMultiSig = 20 // Multisig can't have more sigs than this. - MaxScriptElementSize = 520 // Max bytes pushable to the stack. + MaxOpsPerScript = 201 // Max number of non-push operations. + MaxPubKeysPerMultiSig = 20 // Multisig can't have more sigs than this. + MaxScriptElementSize = 20000 // Max bytes pushable to the stack. ) // isSmallInt returns whether or not the opcode is considered a small integer,