Permalink
Browse files

Merge #8149: Segregated witness rebased

f852813 BIP9 parameters for testnet (Johnson Lau)
070dbc4 --- [SEGWIT] begin: deployment --- (Pieter Wuille)
fdb43df [qa] Add GetTransactionSigOpCost unit tests (Jonas Nick)
d846e02 [qa] script_tests: witness tests can specify tx amount (Suhas Daftuar)
330b0f3 [qa] p2p segwit tests (Suhas Daftuar)
4f7ff00 [qa] Add rpc test for segwit (Alex Morcos)
66cca79 [qa] Autogeneration support for witness in script_tests (Pieter Wuille)
06d3805 [qa] Add segwit support to script_tests (Pieter Wuille)
00f46cb [qa] Add transaction tests for segwit (NicolasDorier)
0aa9207 [qa] Witness version 0 signing unit tests (Pieter Wuille)
978e200 --- [SEGWIT] begin: tests --- (Pieter Wuille)
745eb67 [RPC] signrawtransaction can sign P2WSH (NicolasDorier)
f4691ab [RPC] Add wallet support for witness transactions (using P2SH) (Pieter Wuille)
605e847 BIP143: Signing logic (Pieter Wuille)
9757b57 --- [SEGWIT] begin: wallet --- (Pieter Wuille)
af87a67 Do not use compact blocks when segwit is enabled (Pieter Wuille)
6032f69 Add rewind logic to deal with post-fork software updates (Pieter Wuille)
b7dbeb2 [libconsensus] Script verification API with amounts (Thomas Kerin)
2b1f6f9 BIP141: Other consensus critical limits, and BIP145 (Pieter Wuille)
7c4bf77 [RPC] Return witness data in blockchain RPCs (Johnson Lau)
3dd4102 BIP143: Verification logic (Pieter Wuille)
0ef1dd3 Refactor script validation to observe amounts (Pieter Wuille)
b8a9749 BIP144: Handshake and relay (receiver side) (Pieter Wuille)
8b49040 BIP141: Commitment structure and deployment (Pieter Wuille)
449f9b8 BIP141: Witness program (Pieter Wuille)
7030d9e BIP144: Serialization, hashes, relay (sender side) (Pieter Wuille)
ecacfd9 --- [SEGWIT] begin: P2P/node/consensus --- (Pieter Wuille)
  • Loading branch information...
laanwj committed Jun 24, 2016
2 parents af2421c + f852813 commit d612837814020ae832499d18e6ee5eb919a87907
Showing with 5,305 additions and 571 deletions.
  1. +1 −1 contrib/devtools/check-doc.py
  2. +2 −0 qa/pull-tester/rpc-tests.py
  3. +7 −7 qa/rpc-tests/maxuploadtarget.py
  4. +1,646 −0 qa/rpc-tests/p2p-segwit.py
  5. +209 −0 qa/rpc-tests/segwit.py
  6. +24 −1 qa/rpc-tests/test_framework/blocktools.py
  7. +187 −25 qa/rpc-tests/test_framework/mininode.py
  8. +51 −1 qa/rpc-tests/test_framework/script.py
  9. +26 −9 src/bitcoin-tx.cpp
  10. +2 −2 src/blockencodings.cpp
  11. +2 −0 src/chain.h
  12. +14 −0 src/chainparams.cpp
  13. +9 −3 src/consensus/consensus.h
  14. +11 −0 src/consensus/merkle.cpp
  15. +6 −0 src/consensus/merkle.h
  16. +1 −0 src/consensus/params.h
  17. +3 −0 src/consensus/validation.h
  18. +1 −1 src/core_io.h
  19. +22 −2 src/core_memusage.h
  20. +15 −1 src/core_read.cpp
  21. +21 −0 src/init.cpp
  22. +365 −75 src/main.cpp
  23. +25 −2 src/main.h
  24. +1 −1 src/merkleblock.cpp
  25. +93 −26 src/miner.cpp
  26. +11 −7 src/miner.h
  27. +7 −3 src/net.cpp
  28. +20 −2 src/net.h
  29. +13 −3 src/policy/policy.cpp
  30. +11 −3 src/policy/policy.h
  31. +9 −0 src/primitives/block.cpp
  32. +3 −2 src/primitives/block.h
  33. +18 −5 src/primitives/transaction.cpp
  34. +166 −16 src/primitives/transaction.h
  35. +13 −33 src/protocol.cpp
  36. +21 −12 src/protocol.h
  37. +17 −1 src/qt/coincontroldialog.cpp
  38. +3 −0 src/qt/guiutil.cpp
  39. +2 −1 src/qt/walletmodeltransaction.cpp
  40. +5 −0 src/rpc/blockchain.cpp
  41. +27 −9 src/rpc/mining.cpp
  42. +38 −0 src/rpc/misc.cpp
  43. +41 −12 src/rpc/rawtransaction.cpp
  44. +25 −4 src/script/bitcoinconsensus.cpp
  45. +9 −1 src/script/bitcoinconsensus.h
  46. +227 −13 src/script/interpreter.cpp
  47. +25 −8 src/script/interpreter.h
  48. +17 −2 src/script/ismine.cpp
  49. +38 −0 src/script/script.cpp
  50. +16 −0 src/script/script.h
  51. +14 −0 src/script/script_error.cpp
  52. +9 −0 src/script/script_error.h
  53. +1 −1 src/script/sigcache.h
  54. +198 −85 src/script/sign.cpp
  55. +27 −10 src/script/sign.h
  56. +41 −0 src/script/standard.cpp
  57. +3 −0 src/script/standard.h
  58. +33 −0 src/streams.h
  59. +2 −2 src/test/DoS_tests.cpp
  60. +290 −1 src/test/data/script_tests.json
  61. +63 −4 src/test/data/tx_invalid.json
  62. +170 −0 src/test/data/tx_valid.json
  63. +6 −5 src/test/mempool_tests.cpp
  64. +4 −1 src/test/miner_tests.cpp
  65. +11 −10 src/test/multisig_tests.cpp
  66. +2 −1 src/test/policyestimator_tests.cpp
  67. +7 −6 src/test/script_P2SH_tests.cpp
  68. +273 −97 src/test/script_tests.cpp
  69. +3 −3 src/test/sighash_tests.cpp
  70. +177 −0 src/test/sigopcount_tests.cpp
  71. +1 −1 src/test/test_bitcoin.cpp
  72. +3 −3 src/test/test_bitcoin.h
  73. +308 −10 src/test/transaction_tests.cpp
  74. +1 −1 src/test/txvalidationcache_tests.cpp
  75. +25 −19 src/txmempool.cpp
  76. +12 −11 src/txmempool.h
  77. +4 −0 src/versionbits.cpp
  78. +81 −1 src/wallet/rpcwallet.cpp
  79. +9 −5 src/wallet/wallet.cpp
  80. +1 −0 src/wallet/walletdb.h
@@ -21,7 +21,7 @@
REGEX_ARG = re.compile(r'(?:map(?:Multi)?Args(?:\.count\(|\[)|Get(?:Bool)?Arg\()\"(\-[^\"]+?)\"')
REGEX_DOC = re.compile(r'HelpMessageOpt\(\"(\-[^\"=]+?)(?:=|\")')
# list unsupported, deprecated and duplicate args as they need no documentation
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay'])
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-prematurewitness', '-walletprematurewitness', '-promiscuousmempoolflags'])
def main():
used = check_output(CMD_GREP_ARGS, shell=True)
@@ -136,6 +136,8 @@
'invalidtxrequest.py',
'abandonconflict.py',
'p2p-versionbits-warning.py',
'p2p-segwit.py',
'segwit.py',
'importprunedfunds.py',
'signmessages.py',
]
@@ -97,7 +97,7 @@ def __init__(self):
def setup_network(self):
# Start a node with maxuploadtarget of 200 MB (/24h)
self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-maxuploadtarget=200", "-blockmaxsize=999000"]))
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-maxuploadtarget=800", "-blockmaxsize=999000"]))
def mine_full_block(self, node, address):
# Want to create a full block
@@ -175,13 +175,13 @@ def run_test(self):
getdata_request = msg_getdata()
getdata_request.inv.append(CInv(2, big_old_block))
max_bytes_per_day = 200*1024*1024
daily_buffer = 144 * MAX_BLOCK_SIZE
max_bytes_per_day = 800*1024*1024
daily_buffer = 144 * 4000000
max_bytes_available = max_bytes_per_day - daily_buffer
success_count = max_bytes_available // old_block_size
# 144MB will be reserved for relaying new blocks, so expect this to
# succeed for ~70 tries.
# 576MB will be reserved for relaying new blocks, so expect this to
# succeed for ~235 tries.
for i in range(success_count):
test_nodes[0].send_message(getdata_request)
test_nodes[0].sync_with_ping()
@@ -198,9 +198,9 @@ def run_test(self):
# Requesting the current block on test_nodes[1] should succeed indefinitely,
# even when over the max upload target.
# We'll try 200 times
# We'll try 800 times
getdata_request.inv = [CInv(2, big_new_block)]
for i in range(200):
for i in range(800):
test_nodes[1].send_message(getdata_request)
test_nodes[1].sync_with_ping()
assert_equal(test_nodes[1].block_receive_map[big_new_block], i+1)
Oops, something went wrong.

0 comments on commit d612837

Please sign in to comment.