Commit graph

419 commits

Author SHA1 Message Date
James Dorfman
84f5f4cf9c Merge f436bfd126 into merged_master (Bitcoin PR bitcoin/bitcoin#22953) 2024-08-02 05:19:51 +00: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
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
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
laanwj
37282dcf78 Update m_assumed_* chain parameters for 23.x
- `m_assumed_chain_state_size` doesn't seem to need to be changed for mainnet.
- No change needed for testnet/signet.

Co-authored-by: Suhas Daftuar <sdaftuar@gmail.com>
2022-02-24 14:06:53 +01:00
MarcoFalke
cccc1e70b8
Enforce Taproot script flags whenever WITNESS is set 2022-01-29 14:48:37 +01:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
Pablo Greco
85c3c2b819 Deprecate con_dyna_deploy_start in favor of evbparams 2021-11-23 14:36:03 +00:00
Pablo Greco
d15d08c605 Dynafed is already activated in liquidv1, remove start argument parsing 2021-11-23 14:36:03 +00:00
Pablo Greco
19f54eb5e0 Make sure command line takes precedence when processing evbparams 2021-11-23 14:36:03 +00:00
Pablo Greco
24cafa50cf Implement vbparams for Elements (evbparams) 2021-11-23 14:36:03 +00:00
Andrew Poelstra
6ab7760cac test: add dynafed params for testnet (only used in unit tests, fix needed for uninit mem linter) 2021-10-15 00:20:23 +00:00
Andrew Poelstra
ba8273ac94 lint: fix non-pylint linter errors
Includes fixing all the spelling mistakes that are our fault,
but not those present upstream in Core.
2021-10-15 00:20:20 +00:00
Prayank
ca2c313aa2 Use absolute FQDN for DNS seed domains 2021-10-14 17:49:52 +05:30
Andrew Poelstra
5fedc912ba Merge dfb3c4647a into merged_master (Elements PR ElementsProject/elements#1054) 2021-10-06 19:23:55 +00:00
Glenn Willen
a4b66a24b7 Update hardcoded PAK list for Liquid v1 2021-10-06 14:57:10 +00:00
Andrew Poelstra
ea62009330 Merge 4798e8ee2c into merged_master (Elements PR ElementsProject/elements#1052) 2021-10-02 14:06:41 +00:00
MarcoFalke
fa189621cc
doc: Remove un-actionable TODO from chainparams.cpp 2021-09-28 20:18:20 +02:00
Andrew Poelstra
0628311b53 chainparams: change magic bytes for liquidv1test
This is basically a Liquid-prod-ish version of regtest. Its default magic
should not collide with that for Liquid prod.
2021-09-28 17:29:13 +00:00
W. J. van der Laan
68bbfcc250
Merge bitcoin/bitcoin#23021: net: switch to signet DNS seed
dc10ca346b net: switch to signet DNS seed (Sjors Provoost)

Pull request description:

  I spun up a DNS seed for Signet, source: https://github.com/sipa/bitcoin-seeder/pull/94

  If anyone else spins up a DNS seed, let me know in the comment and I'll add it.

  Because one DNS seed is not very diverse, this PR leaves two hardcoded nodes just in case (). The one dropped node no longer exists.

  Replaces #23000.

ACKs for top commit:
  kallewoof:
    utACK dc10ca346b
  laanwj:
    Concept and code review ACK dc10ca346b
  jarolrod:
    ACK dc10ca346b
  shaavan:
    ACK dc10ca346b

Tree-SHA512: 534d189becd51974042fddc3efe3df230484f05cd945e756eaf6a4a8a580e2161b3a959eb3d44dea526269eea6f87a033f7cbfe86586782c6ca4ee7c7c4097a9
2021-09-27 14:48:33 +02:00
Andrew Poelstra
5d8b55ce47 Merge f7f9555792 into merged_master (Elements PR ElementsProject/elements#1044) 2021-09-18 23:15:14 +00:00
Andrew Poelstra
dc31deacff Merge bc0494cc39 into merged_master (Elements PR ElementsProject/elements#1040) 2021-09-18 14:58:14 +00:00