Commit graph

25204 commits

Author SHA1 Message Date
Ruslan Kasheparov
fecf4f1cf1 fix help man 2026-06-10 16:24:33 +02:00
Ruslan Kasheparov
8408b79dff fix help man 2026-05-14 17:41:43 +02:00
Tom Trevethan
6e079ea838 updated documentation for elements chain types 2026-03-31 16:46:46 +01:00
Tom Trevethan
56b2572cef enabled > 21m for issued assets in GUI amount field 2026-03-17 12:16:36 +00:00
Pablo Greco
56eb713150
Log status of ELIP 203 2026-03-10 08:39:25 -07:00
Pablo Greco
d8052363f3
liquidv1: allow enabling -acceptunlimitedissuances 2026-03-10 06:37:54 -07:00
merge-script
7791d31bcf
Merge ElementsProject/elements#1499: ELIP 202: Implementation of optional sidechain peg-in subsidy and minimum peg-in amount
a18a88b31b grammar: prefer peg-in to pegin in messages (Byron Hambly)
90b2b3bbb0 test: add pegin subsidy functional test (Byron Hambly)
186bb25a08 validation: check for peg-in subsidy and minimum (Byron Hambly)
51c89c65d0 subsidy: implementation for claimpegin, createrawpegin, and RPCs (Byron Hambly)
94cde59dc3 subsidy: add chainparams and init (Byron Hambly)
f3b63f4b8c DecomposePeginWitness: fix deserialization flags for MerkleBlock proof (Byron Hambly)

Pull request description:

  Implementation for [ELIP 202](https://github.com/ElementsProject/ELIPs/blob/main/elip-0202.mediawiki)

ACKs for top commit:
  jsarenik:
    Running ACK a18a88b
  tomt1664:
    Tested ACK a18a88b31b

Tree-SHA512: 984fe2aa32e6814e14c9535e9fea7e03d3b6cf7a35621ccfb2a081a6ebab01906c5e883c5b505ced53f254401d30b6e975cb05e88efc8d3fbedc79abd0be72a2
2026-02-09 09:14:44 -08:00
Byron Hambly
4c79d5a572
fix: use liquidnetwork or liquidtestnet for uri in elements mode 2026-01-30 10:54:24 +02:00
merge-script
e360a967b6
Merge ElementsProject/elements#1518: Avoid Simplicity header dependency propogation
6c7788adf3 Avoid Simplicity header dependency propogation (Russell O'Connor)

Pull request description:

  The problem with including <simplicity/elements/env.h> in interpreter.h is that now everyone who needs to include interpreter.h also needs access to Simplicity's header files too.

  This commit breaks that dependency chain by using forward declarations.  It will pay signifigant dividends when elements switches to CMake.

ACKs for top commit:
  delta1:
    ACK 6c7788a; built and tested locally
  apoelstra:
    ACK 6c7788adf3; successfully ran local tests

Tree-SHA512: 78d043a094f0a2bb51e0f103313ae568b42ec2852d8fe9a3fbbcad9c0fbf6829ef1347f83bfd361547ec165c01965e7342188a38d8faacfcf90ef70c5b7001f6
2026-01-22 14:52:00 +02:00
Byron Hambly
5d64e8945d
rpc!: change tweakfedpegscript to output P2WSH address
Changes tweakfedpegscript to return both p2wsh and p2shwsh version of
the tweaked address.

"address" has been removed from the result and replaced with "p2wsh" and
"p2shwsh".
2026-01-20 15:03:08 +02:00
Byron Hambly
a18a88b31b
grammar: prefer peg-in to pegin in messages 2026-01-15 18:10:52 +02:00
Byron Hambly
186bb25a08
validation: check for peg-in subsidy and minimum 2026-01-15 18:10:51 +02:00
Byron Hambly
51c89c65d0
subsidy: implementation for claimpegin, createrawpegin, and RPCs 2026-01-15 18:10:51 +02:00
Byron Hambly
94cde59dc3
subsidy: add chainparams and init 2026-01-15 18:10:50 +02:00
Byron Hambly
f3b63f4b8c
DecomposePeginWitness: fix deserialization flags for MerkleBlock proof
In CreatePeginWitnessInner, the MerkleBlock is always serialized without
witness: PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS

In DecomposePeginWitness before this change, the MerkleBlock was
deserialized with witness: PROTOCOL_VERSION

This was only noticed as an issue in the pegin subsidy implementation,
in a failure in the feature_dynafed functional test. In the
test_transition_mempool_eject test case, the Merkle block proof is coming
from the same chain where we are creating a pegin.

See the comment: "hack: since we're not validating peg-ins in parent chain,
just make both the funding and claim tx on same chain (printing money)"

I haven't investigated enough to explain why this causes a
deserialization failure in this specific case, but presumably this change
is correct since we're always serializing without witness. Before this
DecomposePeginWitness was only used in src/psbt.cpp
2026-01-15 18:10:50 +02:00
Byron Hambly
4539002bee
Merge commit '87c0b44f78' into 2026-01-simplicity-update 2026-01-12 12:56:33 +02:00
Russell O'Connor
6c7788adf3 Avoid Simplicity header dependency propogation
The problem with including <simplicity/elements/env.h> in interpreter.h is that
now everyone who needs to include interpreter.h also needs access to
Simplicity's header files too.

This commit breaks that dependency chain by using forward declarations.  It will
pay signifigant dividends when elements switches to CMake.
2025-12-24 09:50:30 -05:00
Tom Trevethan
a700d7f2b8 add reissuance token moneyrange check 2025-11-11 00:24:23 +00:00
Tom Trevethan
2dd017d98c added unlimitedissuance config option for CLiquidV1TestParams 2025-09-30 11:40:24 +01:00
Tom Trevethan
a937d53a23 moved acceptunlimitedissuances to chainparams and set defaults 2025-09-26 14:15:46 +01:00
Byron Hambly
93c84a97f9
fix: unblinded re/issuance for non-policy asset greater than 21 million (#1445)
* test: add test for unblinded re/issuance greater than 21 million

Co-authored-by: Mihailo Milenkovic <mihailo.milenkovic84@gmail.com>

* fix: unblinded re/issuance for greater than 21 million

Co-authored-by: Mihailo Milenkovic <mihailo.milenkovic84@gmail.com>

* enable with param config

* change range check to policy with config option

* refactoring, additional error messages and test extension

---------

Co-authored-by: Mihailo Milenkovic <mihailo.milenkovic84@gmail.com>
Co-authored-by: Tom Trevethan <ttrevethan@blockstream.com>
2025-09-23 13:17:02 +02:00
Tom Trevethan
e145690b42
apply mandatory coinbase only to policyAsset (#1488)
Co-authored-by: Tom Trevethan <ttrevethan@blockstream.com>
2025-09-19 11:44:39 +01:00
Tom Trevethan
9f1cc945b6
Fix: address error messages and test (#1486)
* fix address error messages and test

* newline

---------

Co-authored-by: Tom Trevethan <ttrevethan@blockstream.com>
2025-08-25 15:05:57 +02:00
Pablo Greco
7cb85f19c4
Merge pull request #1477 from ElementsProject/simplicity
Unconditionally accept Simplicity spends in the mempool
2025-08-06 06:20:25 -07:00
Byron Hambly
6e2d87990e
Merge pull request #1333 from delta1/mintxfee
wallet: allow mintxfee=0
2025-07-31 10:07:07 +02:00
Tom Trevethan
2eb5b084bc
Enable sending of different assets to the same address (#1479)
* enable rawtransaction send multiple assets to same address

* fix whitespace

* Update test/functional/feature_issuance.py

Co-authored-by: Byron Hambly <byron@hambly.dev>

* Update test/functional/feature_issuance.py

Co-authored-by: Byron Hambly <byron@hambly.dev>

---------

Co-authored-by: Tom Trevethan <ttrevethan@blockstream.com>
Co-authored-by: Byron Hambly <byron@hambly.dev>
2025-07-30 12:41:37 +01:00
Russell O'Connor
ddda11cb6a Unconditionally accept Simplicity spends in the mempool
Taproot and other soft-forks historically in Bitcoin have not gated mempool access.
2025-07-23 17:26:53 -04:00
Tom Trevethan
ef7525a446 re-enable zero fee check 2025-07-22 12:10:18 +01:00
Tom Trevethan
cd1b94e64b Merge remote-tracking branch 'origin/master' into mintxfee 2025-07-22 11:57:05 +01:00
Tom Trevethan
e8e19528b0 Zero fee transactions without fee output 2025-07-22 11:37:30 +01:00
Byron Hambly
b379bb2465
Merge pull request #1459 from ElementsProject/simplicity
Update Simplicity integeration
2025-07-17 17:04:48 +02:00
Tom Trevethan
c4bc9fd5b4
Fix position of version argument in walletcreatefundedpsbt (#1474)
* fix position of version argument and add test

* add test for version number

---------

Co-authored-by: Tom Trevethan <ttrevethan@blockstream.com>
2025-07-11 12:27:43 +02:00
Byron Hambly
2f6f7ce26d
Merge pull request #1472 from tomt1664/fix_race_condition
net: fix race condition in self-connect detection
2025-07-09 11:05:05 +02:00
glozow
8db506f406 Merge bitcoin/bitcoin#30394: net: fix race condition in self-connect detection
16bd283b3a Reapply "test: p2p: check that connecting to ourself leads to disconnect" (Sebastian Falbesoner)
0dbcd4c148 net: prevent sending messages in `NetEventsInterface::InitializeNode` (Sebastian Falbesoner)
66673f1c13 net: fix race condition in self-connect detection (Sebastian Falbesoner)

Pull request description:

  This PR fixes a recently discovered race condition in the self-connect detection (see #30362 and #30368).

  Initiating an outbound network connection currently involves the following steps after the socket connection is established (see [`CConnman::OpenNetworkConnection`](bd5d1688b4/src/net.cpp (L2923-L2930)) method):
  1. set up node state
  2. queue VERSION message (both steps 1 and 2 happen in [`InitializeNode`](bd5d1688b4/src/net_processing.cpp (L1662-L1683)))
  3. add new node to vector `m_nodes`

  If we connect to ourself, it can happen that the sent VERSION message (step 2) is received and processed locally *before* the node object is added to the connection manager's `m_nodes` vector (step 3). In this case, the self-connect remains undiscovered, as the detection doesn't find the outbound peer in `m_nodes` yet (see `CConnman::CheckIncomingNonce`).

  Fix this by swapping the order of 2. and 3., by taking the `PushNodeVersion` call out of `InitializeNode` and doing that in the `SendMessages` method instead, which is only called for `CNode` instances in `m_nodes`.

  The temporarily reverted test introduced in #30362 is readded. Fixes #30368.

  Thanks go to vasild, mzumsande and dergoegge for suggestions on how to fix this (see https://github.com/bitcoin/bitcoin/issues/30368#issuecomment-2200625017 ff. and https://github.com/bitcoin/bitcoin/pull/30394#discussion_r1668290789).

ACKs for top commit:
  naiyoma:
    tested ACK [https://github.com/bitcoin/bitcoin/pull/30394/commits/16bd283b3ad05daa41259a062aee0fc05b463fa6](https://github.com/bitcoin/bitcoin/pull/30394/commits/16bd283b3ad05daa41259a062aee0fc05b463fa6),  built and tested locally,  test passes successfully.
  mzumsande:
    ACK 16bd283b3a
  tdb3:
    ACK 16bd283b3a
  glozow:
    ACK 16bd283b3a
  dergoegge:
    ACK 16bd283b3a

Tree-SHA512: 5b8aced6cda8deb38d4cd3fe4980b8af505d37ffa0925afaa734c5d81efe9d490dc48a42e1d0d45dd2961c0e1172a3d5b6582ae9a2d642f2592a17fbdc184445
2025-07-08 13:53:58 +01:00
Byron Hambly
67cd78dbc2
Merge pull request #1451 from tomt1664/v25+_cherry_pick
Selected Bitcoin v25 and onwards patches
2025-07-08 14:17:15 +02:00
Tom Trevethan
288e2a94eb removed duplicate solving_data for funding tx rpcs 2025-07-07 15:55:11 +01:00
Russell O'Connor
0a0a69f315 Update Simplicity integeration
This Simplicity update has
- renamed a few types
- moved some files around
- added a minCost parameter, currently set to 0
- added a new error code
2025-06-24 11:38:08 -04:00
Russell O'Connor
f41af64c1c Merge commit 'aef3f5a7e5' into simplicity 2025-06-24 11:37:54 -04:00
merge-script
8614ff46c9 Merge bitcoin/bitcoin#30435: init: change shutdown order of load block thread and scheduler
5fd4836019 init: change shutdown order of load block thread and scheduler (Martin Zumsande)

Pull request description:

  This avoids situations during a reindex, in which the shutdown doesn't finish since `LimitValidationInterfaceQueue()` is called by the load block thread when the scheduler is already stopped, in which case it would block indefinitely. This can lead to intermittent failures in `feature_reindex.py` (#30424), which I could locally reproduce with
  ```diff
  diff --git a/src/validation.cpp b/src/validation.cpp
  index 74f0e4975c..be1706fdaf 100644
  --- a/src/validation.cpp
  +++ b/src/validation.cpp
  @@ -3446,6 +3446,7 @@ static void LimitValidationInterfaceQueue(ValidationSignals& signals) LOCKS_EXCL
       AssertLockNotHeld(cs_main);

       if (signals.CallbacksPending() > 10) {
  +        std::this_thread::sleep_for(std::chrono::milliseconds(50));
           signals.SyncWithValidationInterfaceQueue();
       }
   }
  ```
  It has also been reported by users running `reindex-chainstate` (#23234).

  I thought for a bit about potential downsides of changing this order, but couldn't find any.

  Fixes #30424
  Fixes #23234

ACKs for top commit:
  maflcko:
    review ACK 5fd4836019
  hebasto:
    re-ACK 5fd4836019.
  tdb3:
    ACK 5fd4836019
  BrandonOdiwuor:
    Code Review ACK 5fd4836019

Tree-SHA512: 3b8894e99551c5d4392b55eaa718eee05841a7287aeef2978699e1d633d5234399fa2f5a3e71eac1508d97845906bd33e0e63e5351855139e7be04c421359b36
2025-06-24 10:25:22 +01:00
Ryan Ofsky
3c730034ec Merge bitcoin/bitcoin#29776: ThreadSanitizer: Fix #29767
bbe82c116e Fix #29767, set m_synced = true after Commit() (nanlour)

Pull request description:

  I think this problem https://github.com/bitcoin/bitcoin/issues/29767#issue-2216373048 is because of
  in BaseIndex::Sync
  61de64df67/src/index/base.cpp (L163-L168)
  Setup m_synced = true; before Commit();
  So this may cause a race condition window to BaseIndex::BlockConnected
  61de64df67/src/index/base.cpp (L271-L274)
  So i try to fix it with move m_synced = true after Commit().
  Also see comment of Sync():
  61de64df67/src/index/base.h (L151-L156)
  I am a newcomer interested in Bitcoin, trying to become a member of the Bitcoin Core development team. Please give me some feedback if you could, as I may be doing something wrong. Thank you!

ACKs for top commit:
  fjahr:
    Code review ACK bbe82c116e
  ryanofsky:
    Code review ACK bbe82c116e

Tree-SHA512: 89a09498a232c87ef1e083d4cc4ed9bb15f045ad0624d5d150a87187b2b8a48a41137974dbc7ea5c37f73da90742c43259f5aa7f84b4179eb8d62033e44fa479
2025-06-24 10:25:22 +01:00
Ryan Ofsky
203ee5d7fe Merge bitcoin/bitcoin#30094: rpc: move UniValue in blockToJSON
b77bad309e rpc: move UniValue in blockToJSON (willcl-ark)

Pull request description:

  Fixes: #24542
  Fixes: #30052

  Without explicitly declaring the move, these `UniValues` get copied, causing increased memory usage. Fix this by explicitly moving the `UniValue` objects.

  Used by `rest_block` and `getblock` RPC.

ACKs for top commit:
  maflcko:
    review ACK b77bad309e
  ismaelsadeeq:
    ACK b77bad309e
  TheCharlatan:
    ACK b77bad309e
  theuni:
    utACK b77bad309e
  hebasto:
    ACK b77bad309e, I have reviewed the code and it looks OK.
  BrandonOdiwuor:
    ACK b77bad309e

Tree-SHA512: 767608331040f9cfe5c3568ed0e3c338920633472a1a50d4bbb47d1dc69d2bb11466d611f050ac8ad1a894b47fe1ea4d968cf34cbd44d4bb8d479fc5c7475f6d
2025-06-24 10:25:22 +01:00
merge-script
b8aa7eba90 Merge bitcoin/bitcoin#30085: p2p: detect addnode cjdns peers in GetAddedNodeInfo()
d0b047494c test: add GetAddedNodeInfo() CJDNS regression unit test (Jon Atack)
684da97070 p2p, bugfix: detect addnode cjdns peers in GetAddedNodeInfo() (Jon Atack)

Pull request description:

  Addnode peers connected to us via the cjdns network are currently not detected by `CConnman::GetAddedNodeInfo()`, i.e. `fConnected` is always false. This causes the following issues:

  - RPC `getaddednodeinfo` incorrectly shows them as not connected

  - `CConnman::ThreadOpenAddedConnections()` continually retries to connect them

  Fix the issue and add a unit regression test. Extracted from #28248. Suggest running the test with:

  `./src/test/test_bitcoin -t net_peer_connection_tests -l test_suite`

ACKs for top commit:
  mzumsande:
    utACK d0b047494c
  brunoerg:
    crACK d0b047494c
  pinheadmz:
    ACK d0b047494c

Tree-SHA512: a4d81425f79558f5792585611f3fe8ab999b82144daeed5c3ec619861c69add934c2b2afdad24c8488a0ade94f5ce8112f5555d60a1ce913d4f5a1cf5dbba55a
2025-06-24 10:25:22 +01:00
Andrew Chow
cb5c59e8a5 Merge bitcoin/bitcoin#28784: rpc: keep .cookie file if it was not generated
7cb9367157 rpc: keep .cookie if it was not generated (Roman Zeyde)

Pull request description:

  Otherwise, starting bitcoind twice may cause the `.cookie` file generated by the first instance to be deleted by the second instance shutdown (after failing to obtain a lock).

ACKs for top commit:
  willcl-ark:
    re-ACK 7cb9367157
  achow101:
    ACK 7cb9367157
  kristapsk:
    re-ACK 7cb9367157
  stickies-v:
    ACK 7cb9367157

Tree-SHA512: 0960dbc457975b0e0535f3d814824a879d7f85c9f1191537415b3fc253429a316a8e4badde56c8bc139778f132392983cec5fbe03891fb15ff61d3bc3f6e681b
2025-06-24 10:25:22 +01:00
Pablo Greco
c76710933c liquidtestnet: Update liquidtestnet.com ipv4 2025-06-20 10:45:24 -07:00
Pablo Greco
ea75778bf3 Use 1/0 instead of bool in args help, so it matches real parsing 2025-06-18 09:46:22 -07:00
Byron Hambly
10a8e36813
Merge pull request #1428 from psgreco/master-showpak
wallet: Show full pak entry in getwalletpakinfo
2025-06-10 19:30:06 +02:00
Ava Chow
285f81b88b Merge bitcoin/bitcoin#30568: addrman: change internal id counting to int64_t
51f7668d31 addrman: change nid_type from int to int64_t (Martin Zumsande)
051ba3290e addrman, refactor: introduce user-defined type for internal nId (Martin Zumsande)

Pull request description:

  With `nIdCount` being incremented for each addr received, an attacker could cause an overflow in the past, see https://bitcoincore.org/en/2024/07/31/disclose-addrman-int-overflow/
  Even though that attack was made infeasible indirectly by addr rate-limiting (PR #22387), to be on the safe side and prevent any regressions change the `nId`s used internally to `int64_t`.
  This is being done by first introducing a user-defined type for `nId`s in the first commit, and then updating it to `int64_t` (thanks sipa for help with this!).

  Note that `nId` is only used internally, it is not part of the serialization, so `peers.dat` should not be affected by this.

  I assume that the only reason this was not done in the past is to not draw attention to this previously undisclosed issue.

ACKs for top commit:
  naumenkogs:
    ACK 51f7668d31
  stratospher:
    ACK 51f7668d31. I think it's a good change to make the nId space large(64 bits) so that the nId values are distinct.
  achow101:
    ACK 51f7668d31

Tree-SHA512: 68d4b8b0269a01a9544bedfa7c1348ffde00a288537e4c8bf2b88372ac7d96c4566a44dd6b06285f2fcf31b4f9336761e3bca7253fbc20db5e0d04e887156224
2025-05-01 15:32:12 +01:00
merge-script
3a1d2b0eb0 Merge bitcoin/bitcoin#29823: minisketch: update subtree to 3472e2f5ec75ace39ce9243af6b3fee233a67492
4722b7c715 build: remove minisketch clz check (fanquake)
1eea10a6d2 Squashed 'src/minisketch/' changes from a571ba20f9..3472e2f5ec (fanquake)

Pull request description:

  https://github.com/sipa/minisketch/pull/81 will fix #29799.
  Minor build cleanups after https://github.com/sipa/minisketch/pull/80.

ACKs for top commit:
  dergoegge:
    utACK 4722b7c715
  hebasto:
    ACK 4722b7c715, I have verified the subtree update and reviewed the build system changes. Both look OK.

Tree-SHA512: eabd82e5a13cc4f32155319df97368f2e8c93320a4265b6c372efcb1ea4e756f6693df7c02498c8ea989ccd376a20277fa110c66d0754cb9bca5e54d18e0a965
2025-04-24 13:55:37 +01:00
Thomas Trevethan
6585a84970 Merge commit '1ad1651f21' into minisketch_patches 2025-04-24 13:52:13 +01:00
Thomas Trevethan
1ad1651f21 Squashed 'src/minisketch/' changes from 7eeb778fef..a571ba20f9
a571ba20f9 Merge sipa/minisketch#68: Add missed `#include <string>`
b9a7f7e2bc Merge sipa/minisketch#69: refactor: Drop unused `total` local variables
8a5af94edc Merge sipa/minisketch#70: build: Remove `-Qunused-arguments` workaround for clang + ccache
c36f1f03a3 Merge sipa/minisketch#72: Fix MSVC implementation of `CountBits()` function
0078bedda6 Ignore `HAVE_CLZ` macro when building with MSVC
1c772918c4 Fix MSVC implementation of `CountBits()` function
98f87c55f4 build: Remove `-Qunused-arguments` workaround for clang + ccache
11a1e25c81 refactor: Drop unused `total` local variables
ed6c8fcfd9 Add missed `#include <string>`
47f0a2d26f Merge sipa/minisketch#66: msvc: remove direct Bitcoin Core `compat.h` include
64f17584c7 msvc: remove Core compat.h include
a223557ce1 Merge sipa/minisketch#65: Update broken links
127f7763e8 Update broken links

git-subtree-dir: src/minisketch
git-subtree-split: a571ba20f9dd1accab6a2309d066369878042ca6
2025-04-24 13:52:13 +01:00