Commit graph

437 commits

Author SHA1 Message Date
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
ffa0c01a17 Merge cc2ecbb978 into merged_master (Elements PR #1378) 2025-01-06 11:39:25 +02:00
Byron Hambly
8499b13762
lint: fix lint issues 2024-12-03 14:02:33 +02:00
Byron Hambly
d78604da4c Merge 2534141e19 into merged_master (Elements PR ElementsProject/elements#1219) 2024-12-02 08:51:39 +02:00
Byron Hambly
dcef84b6be Merge 447f50e4ae into merged_master (Bitcoin PR bitcoin/bitcoin#25946) 2024-11-26 12:39:48 +02:00
Pablo Greco
22cc8dfe34 Accept by default discountct in liquidv1 2024-11-18 05:00:12 -08:00
Byron Hambly
28d35f619e Merge 510ac41eac into merged_master (Bitcoin PR bitcoin/bitcoin#25331) 2024-10-18 13:14:02 +02:00
Andrew Poelstra
57ab101352
simplicity: copy activation threshold/period from taproot
Copy the parameters for mainnet because they seem to have worked fine
for Taproot and are therefore a good starting point for Simplicity.
Copy them for regtest so that we can also copy the functional test for
activation, without needing to change a whole bunch of numbers.
2024-10-08 14:41:40 +00:00
Andrew Poelstra
3621e7adc0
liquid testnet: enable simplicity at all times
This will effectively activate Simplicity as soon as the sole Liquid
Testnet signer is updated.
2024-10-08 14:41:39 +00:00
Andrew Poelstra
850b82095c
disable simplicity on regtest
We want to test Simplicity activation using evbparams.
2024-10-08 14:41:39 +00:00
James Dorfman
db0c6bd4fe Merge 86ffda8a7d into merged_master (Elements PR #1360) 2024-10-08 06:01:00 +00:00
James Dorfman
a61b1d1240 Merge e1d6b66ead into merged_master (Elements PR #1346) 2024-10-08 05:35:12 +00:00
Russell O'Connor
bcd508f409 Add Simplicity Deployment structure 2024-10-07 14:39:10 -04:00
Pablo Greco
5c04f7d9a0 Accept discount-ct by default in liquidtestnet 2024-08-19 08:29:18 -07:00
James Dorfman
84f5f4cf9c Merge f436bfd126 into merged_master (Bitcoin PR bitcoin/bitcoin#22953) 2024-08-02 05:19:51 +00:00
Byron Hambly
47d6c34382
discount: fix override for creatediscountct 2024-07-24 09:34:16 +02:00
James Dorfman
9c1d4cc8ff Merge a4d7ac7bbe into merged_master (Elements PR #1317) 2024-05-24 16:13:46 +00:00
James Dorfman
05aec5204c Merge 99e502f90c into merged_master (Elements PR #1324) 2024-05-24 15:27:04 +00:00
Byron Hambly
c1661b251a
discount: introduce config args 2024-05-14 19:03:17 +02:00
snoppy
605acb0a40
chore: fix typos 2024-03-31 23:07:05 +08:00
James Dorfman
087b2f13f4 Merge 7c08d81e11 into merged_master (Bitcoin PR bitcoin/bitcoin#23536) 2024-03-19 19:58:32 +00:00
Byron Hambly
75b07c4252 Merge 2860a91df0 into merged_master (Bitcoin PR bitcoin/bitcoin#24527) 2023-10-15 11:57:43 +00:00
Byron Hambly
816db0450b Merge 40ab879f11 into merged_master (Bitcoin PR bitcoin/bitcoin#24418) 2023-07-02 16:39:55 +00:00
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
Byron Hambly
a5f6936dd9 Merge feedb9c84e into merged_master (Bitcoin PR bitcoin/bitcoin#23268) 2023-05-11 13:12:42 +00:00
James Dorfman
09180a78f9 Merge 3c776fdcec into merged_master (Bitcoin PR bitcoin/bitcoin#23122) 2023-04-27 19:58:29 +00:00
Byron Hambly
b33a4cdb4f elements: fixes for bitcoin/bitcoin#22976 2023-04-24 12:05:24 +00:00
Byron Hambly
723ede3bb9 Merge 68bbfcc250 into merged_master (Bitcoin PR bitcoin/bitcoin#23021) 2023-04-24 11:28:34 +00:00
Byron Hambly
7856df2733 test: elements fixes for Bitcoin PR bitcoin/bitcoin#22818 2023-04-24 08:30:36 +00:00
Byron Hambly
13fb374543 Merge 8e9801bfc4 into merged_master (Bitcoin PR bitcoin/bitcoin#22818) 2023-04-24 07:13:42 +00:00
Byron Hambly
1acda7580c Merge adccbb380b into merged_master (Bitcoin PR bitcoin/bitcoin#21862) 2023-04-11 08:09:30 +00:00
Byron Hambly
4cc48afd88 Merge 0b5344b0d1 into merged_master (Bitcoin PR bitcoin/bitcoin#22632) 2023-04-09 06:06:34 +00:00
Byron Hambly
570683e6ac Merge ad0fc453cc into merged_master (Bitcoin PR bitcoin/bitcoin#16333) 2023-04-06 11:43:11 +00:00
Byron Hambly
d7c38ee168
Merge 10fbb37268 into merged_master (Bitcoin PR bitcoin/bitcoin#22098) 2023-04-04 19:29:03 +02:00
James Dorfman
17e6efe7fe Merge 5d83e7d714 into merged_master (Bitcoin PR bitcoin/bitcoin#21090)
We comment out a newly-added assert from the Bitcoin
side, because it's unclear how to replicate it
correctly in Elements.

Co-authored-by: Glenn Willen <gwillen@nerdnet.org>
2023-03-22 01:11:20 +00:00
Pablo Greco
4cbe3d4322 Allow starting regtest networks with p2wsh peg-in addresses 2023-02-07 18:16:43 -03:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2022-12-24 23:49:50 +00:00
Pablo Greco
48ddfbf8d7 liquidtestnet: Add fixed seeds 2022-09-08 19:02:07 +00:00
Pablo Greco
3b34c8e927 liquidtestnet: Add seed nodes 2022-09-08 19:01:54 +00:00
Pablo Greco
0d1964766f liquidtestnet: Accept multi OP_RETURN 2022-09-08 19:01:39 +00:00
Pablo Greco
f955cb3d9c liquidtestnet: Add chainparams 2022-09-08 19:01:27 +00:00
Pablo Greco
0fa20d006d CCustomParams: Move some defaults away from UpdateFromArgs 2022-09-08 19:01:27 +00:00
Janna
767d825e27 Update chainparams for 24.0 release 2022-08-31 15:31:34 +03:00
MacroFake
faf9accd66
Use HashWriter where possible 2022-07-20 15:34:36 +02:00
Glenn Willen
f035196ceb Merge 586e5c7dd7 into merged_master (Elements PR ElementsProject/elements#1062) 2022-04-20 21:51:53 -07:00
Sebastian Falbesoner
9cc8e876e4 refactor: introduce single-separator split helper SplitString
This helper uses spanparsing::Split internally and enables to replace
all calls to boost::split where only a single separator is passed.

Co-authored-by: Martin Ankerl <Martin.Ankerl@gmail.com>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2022-04-11 22:19:46 +02:00
laanwj
7c08d81e11
Merge bitcoin/bitcoin#23536: Enforce Taproot script flags whenever WITNESS is set
cccc1e70b8 Enforce Taproot script flags whenever WITNESS is set (MarcoFalke)
fa42299411 Remove nullptr check in GetBlockScriptFlags (MarcoFalke)
faadc606c7 refactor: Pass const reference instead of pointer to GetBlockScriptFlags (MarcoFalke)

Pull request description:

  Now that Taproot is active, it makes sense to enforce its rules on all blocks, even historic ones, regardless of the deployment status.

  ### Benefits:

  (With "script flags" I mean "taproot script verification flags".)

  * Script flags are known ahead for all blocks (even blocks not yet created) and do not change. This may benefit static analysis, code review, and development of new script features that build on Taproot.
  * Any future bugs introduced in the deployment code won't have any effect on the script flags, as they are independent of deployment.
  * Enforcing the taproot rules regardless of the deployment status makes testing easier because invalid blocks after activation are also invalid before activation. So there is no need to differentiate the two cases.
  * It gives belt-and-suspenders protection against a practically expensive and theoretically impossible IBD reorg attack where the node is eclipsed. While `nMinimumChainWork` already protects against this, the cost for a few months worth of POW might be lowered until a major version release of Bitcoin Core reaches EOL. The needed work for the attack is the difference between `nMinimumChainWork` and the work at block 709632.

  For reference, previously the same was done for P2SH and WITNESS in commit 0a8b7b4b33.

  ### Implementation:

  I found one block which fails verification with the flags applied, so I added a `TaprootException`, similar to the `BIP16Exception`.

  For reference, the debug log:

  ```
  ERROR: ConnectBlock(): CheckInputScripts on b10c007c60e14f9d087e0291d4d0c7869697c6681d979c6639dbd960792b4d41 failed with non-mandatory-script-verify-flag (Witness program was passed an empty witness)
  BlockChecked: block hash=0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad state=non-mandatory-script-verify-flag (Witness program was passed an empty witness)
  InvalidChainFound: invalid block=0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad  height=692261  log2_work=92.988459  date=2021-07-23T08:24:20Z
  InvalidChainFound:  current best=0000000000000000000067b17a4c0ffd77c29941b15ad356ca8f980af137a25d  height=692260  log2_work=92.988450  date=2021-07-23T07:47:31Z
  ERROR: ConnectTip: ConnectBlock 0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad failed, non-mandatory-script-verify-flag (Witness program was passed an empty witness)
  ```

  Hint for testing, make sure to set `-noassumevalid`.

  ### Considerations

  Obviously this change can lead to consensus splits on the network in light of massive reorgs. Currently the last block before Taproot activation, that is the last block without the Taproot script flags set, is only buried by a few days of POW. However, when and if this patch is included in the next major release, it will be buried by a few months of POW. BIP90 considerations apply when looking at reorgs this large.

ACKs for top commit:
  Sjors:
    tACK cccc1e70b8
  achow101:
    ACK cccc1e70b8
  laanwj:
    Code review ACK cccc1e70b8
  ajtowns:
    ACK cccc1e70b8 ; code review; wrote a "getblockscriptflags" rpc to quickly check that blocks just had bit 17 (taproot) added; review of earlier revisions had established non-exception blocks do validate with taproot rules enabled.
  jamesob:
    ACK cccc1e70b8 ([`jamesob/ackr/23536.1.MarcoFalke.enforce_taproot_script_f`](https://github.com/jamesob/bitcoin/tree/ackr/23536.1.MarcoFalke.enforce_taproot_script_f))

Tree-SHA512: 00044de68939caef6420ffd588c1291c041a8b397c80a3df1e3e3487fbeae1821d23975c51c95e44e774558db76f943b00b4e27cbd0213f64a9253116dc6edde
2022-03-25 14:11:18 +01:00
Martin Zumsande
5ce3057c8e test: set segwit height back to 0 on regtest
This was changed in #22818 from 0 to 1. Since it changes
BLOCK_OPT_WIT of the genesis block, older versions of bitcoin
core would not read regtest directories created with newer versions
without a reindex.
2022-03-10 20:24:11 +01:00
laanwj
dca693e08e Update nMinimumChainWork, defaultAssumeValid for 23.x
Co-authored-by: Suhas Daftuar <sdaftuar@gmail.com>
2022-02-24 16:19:09 +01:00
laanwj
85e71a3baa Update chainTxData for 23.x
Co-authored-by: Suhas Daftuar <sdaftuar@gmail.com>
2022-02-24 16:19:09 +01:00