This PR should allow people to look at the current implementation. [work in progress]
[WIP] Segregated Witness #7404
pull jonasschnelli wants to merge 49 commits into bitcoin:0.12 from sipa:segwit changing 94 files +6921 −2607-
jonasschnelli commented at 8:47 PM on January 23, 2016: contributor
- sipa force-pushed on Jan 25, 2016
- sipa force-pushed on Jan 27, 2016
-
in src/chainparams.cpp:None in 37973bf2ef outdated
76 | @@ -77,6 +77,7 @@ class CMainParams : public CChainParams { 77 | consensus.BIP34Height = 227931; 78 | consensus.BIP34Hash = uint256S("0x000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8"); 79 | consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); 80 | + consensus.SegWitHeight = 2000000000;
rebroad commented at 2:00 PM on January 31, 2016:what is this number?
sipa commented at 5:15 PM on March 23, 2016:"some long time in the future" (as we don't have a planned activation date for segwit on mainnet yet). actual segwit will be deployed using versionbits, so this will go away
in src/chainparamsseeds.h:None in 37973bf2ef outdated
888 | @@ -889,6 +889,13 @@ static SeedSpec6 pnSeed6_main[] = { 889 | {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xcf,0x7b,0x5e,0x3a,0x53,0x21,0x5b,0x62,0xe3,0x7a}, 8333} 890 | }; 891 | 892 | +static SeedSpec6 pnSeed6_seg[] = {
rebroad commented at 2:03 PM on January 31, 2016:would be nice if the code has more comments that referred to documentation that explains what some of these numbers are
sipa force-pushed on Feb 5, 2016sipa force-pushed on Feb 9, 2016laanwj added the label Validation on Feb 16, 2016sipa force-pushed on Mar 16, 2016sipa force-pushed on Mar 16, 2016sipa force-pushed on Mar 25, 2016sipa force-pushed on Mar 25, 2016sipa force-pushed on Mar 25, 2016sipa force-pushed on Mar 26, 2016sipa force-pushed on Mar 31, 2016sipa force-pushed on Mar 31, 2016sipa force-pushed on Apr 1, 2016sipa force-pushed on Apr 4, 2016sipa force-pushed on Apr 4, 2016sipa force-pushed on Apr 12, 2016Keep addrman's nService bits consistent with outbound observations 6fc1480076Verify that outbound connections have expected services 3dbfdf98c9Only store and connect to NODE_NETWORK nodes 2554857896test: Re-introduce JSON pretty printing in test builder bbf0f18e6f25c1f67032test: Script_error checking in script_invalid tests
Check the returned script_error. Add expected script_error for generated as well as custom tests. The specific error is not part of consensus, however it could avoid unclear reporting issues such as #6862 in the future. Fixes #7513.
Fix JSON pretty printing in script_tests 42b73b42f560b329287cFix some misconstructed tests
They claimed to be testing P2SH scripts with non-push scriptSigs, but 1) they were not enabling P2SH 2) they have push-only scriptSigs Fix this, and add a few more related cases.
Fix formatting of NOPs for generated script tests 3bb79007edMake script_error a mandatory 4th field for script_tests 5f66cdabd4Get rid of expect in script_tests as it's implied by scripterror 9b85c68a4dMerge script_valid and script_invalid tests 90125c2332[qa] wallet: Wait for reindex to catch up 4f90d36e90c7474657c9Use txid as key in mapAlreadyAskedFor
Previously we used the CInv that would be sent to the peer announcing the transaction as the key, but using the txid instead allows us to decouple the p2p layer from the application logic (which relies on this map to avoid duplicate tx requests).
Change mapRelay to store CTransactions 119677249d--- [SEGWIT] begin: segnet --- 2a74ff09abefbd772eb6Don't check the genesis block PoW
Inspired by Jorge Timon's "Testchain: Don't check the genesis block", but restricted to just PoW check. Code by Matt Corallo, originally submitted as a patch to segwit.
Create segnet4 c5a44b64c0Add segnet seed nodes f7e2a3053eqt: Work (don't crash) with -segnet ee501e9188--- [SEGWIT] begin: P2P/node/consensus --- c8f76270c2526b553aefAdd segregated witness transaction serialization
Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier.
Removed ppszTypeName from protocol.cpp 49d0bd978egetdata enum issue fix f822e15fa6d1f2258fdcIntroduce and preferentially peer with NODE_WITNESS service bit
Service bit logic by Nicolas Dorier.
f5ddc462f4Witness commitment validation
Includes a fix by Suhas Daftuar
Script validation logic for witnesses 25d4d9e461Enable SCRIPT_VERIFY_WITNESS for mempool transactions be10fb4c1aActivate script consensus rules through BIP9 a43536a33bOnly download blocks from witness peers after fork 92fc17104bObserve input amounts: verification e66b0148d846daedfaa5Add signature version 1 with updated sighash
Includes simplifications by Eric Lombrozo.
54eabc939cReturn witness data
Includes RPC field name changes by Luke-jr.
d6c69c2266Implement block size/sigop cost rules, limits, and GBT support
Includes changes by Suhas Daftuar and Luke-jr.
Add command line options to loosen mempool acceptance rules c730637ae7fd9390f662bitcoinconsensus: add method that accepts amount, and return error when verify_script receives VERIFY_WITNESS flag
script_tests: always test bitcoinconsensus_verify_script_with_amount if VERIFY_WITNESS isn't set Rename internal method + make it static trim bitcoinconsensus_ prefix Add SERIALIZE_TRANSACTION_WITNESS flag
4d90727666Increase MAX_PROTOCOL_MESSAGE_LENGTH
Witness blocks can be greater than 2MiB, but cannot be validly greater than 4MB.
Add rewind logic to deal with post-fork software updates e95b6a42e9--- [SEGWIT] begin: wallet --- da279a967aWitness script signing a5f8cbb96b15585e091fAdd witness address RPCs (using P2SH)
Includes support for pushkeyhash wit v0 by Alex Morcos.
signrawtransaction can sign P2WSH cc61707ada--- [SEGWIT] begin: tests --- 61ff637364Signing tests 47d9337502ab215e49ccAdd rpc test for segwit
Amended by Pieter Wuille to use multisig 1-of-1 for P2WSH tests, and BIP9 based switchover logic.
0ec3d4473cAdd transaction tests for segwit
...with the four types of segwit payment, as well as all sighash combinaisons.
Add segwit support to script_tests ed9c2f877eAutogeneration support for witness in script_tests 240cc9aa7b5bd6e9ede2Update p2p test framework with segwit support
mininode now supports witness transactions/blocks, blocktools has a helper for adding witness commitments to blocks, and script has a function to calculate hashes for signature under sigversion 1, used by segwit.
P2P test for segwit fb4873ead5sipa force-pushed on Apr 17, 2016jonasschnelli commented at 3:23 PM on April 19, 2016: contributorClosing in favor of #7910
jonasschnelli closed this on Apr 19, 2016fanquake locked this on Oct 28, 2018ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 12:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 12:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me