Commit graph

24940 commits

Author SHA1 Message Date
TheCharlatan
2b08c55f01
[refactor] Add CChainParams member to CConnman
This is done in preparation to the next commit, but has the nice
effect of removing one further data structure relying on the global
`Params()`.
2023-09-12 22:51:45 +02:00
TheCharlatan
f0d1d8b35c
[refactor] Add missing includes for next commit 2023-09-12 22:51:42 +02:00
TheCharlatan
534b314a74
kernel: Move MessageStartChars to its own file
The protocol.h file contains many non-consensus related definitions and
should thus not be part of the libbitcoinkernel. This commit makes
protocol.h no longer a required include for users of the
libbitcoinkernel.

This commit is part of the libbitcoinkernel project, namely its stage 1
step 3: Decouple most non-consensus headers from libbitcoinkernel.

Co-Authored-By: Cory Fields <cory-nospam-@coryfields.com>
2023-09-12 22:51:38 +02:00
TheCharlatan
9be330b654
[refactor] Define MessageStartChars as std::array 2023-09-12 22:49:49 +02:00
MarcoFalke
37e2b01113
[refactor] Allow std::array<std::byte, N> in serialize.h
This is already possible for C-style arrays, so allow it for C++11
std::array as well.
2023-09-12 22:44:28 +02:00
furszy
bae209e387
gui: macOS, make appMenuBar part of the main app window
By moving the appMenuBar destruction responsibility to the QT
framework, we ensure the disconnection of the submenus signals
prior to the destruction of the main app window.

The standalone menu bar may have served a purpose in earlier
versions when it didn't contain actions that directly open
specific screens within the main application window. However,
at present, all the actions within the appMenuBar lead to the
opening of screens within the main app window. So, the absence
of a main app window makes these actions essentially pointless.
2023-09-12 14:36:16 -03:00
Andrew Chow
adc0921ea1
Merge bitcoin/bitcoin#28101: doc, refactor: changing -torcontrol help to specify that a default port is used
9a84200cfc doc, refactor: Changing -torcontrol help to specify that a default port is used (kevkevin)

Pull request description:

  Right now when we get the help for -torcontrol it says that there is a default ip and port we dont specify if there is a specified ip that we would also use port 9051 as default

  Also I create a new const instead of using 9051 directly in the function

  linking this PR because this was discussed here https://github.com/bitcoin/bitcoin/pull/28018

ACKs for top commit:
  jonatack:
    re-ACK 9a84200cfc
  achow101:
    ACK 9a84200cfc
  MarnixCroes:
    utACK 9a84200cfc
  kristapsk:
    utACK 9a84200cfc

Tree-SHA512: 21d9e65f3c280a2853a9cf60d4e93e8d72caccea106206d1862c19535bde7ea6ada7f55e6ea19a1fc0f59dbe791ec6fc4084fdbe7fa6d6991fa89c62070db637
2023-09-12 12:41:30 -04:00
Andrew Chow
8f9c74cb11
Merge bitcoin/bitcoin#28414: wallet rpc: return final tx hex from walletprocesspsbt if complete
2e249b9227 doc: add release note for PR #28414 (Matthew Zipkin)
4614332fc4 test: remove unnecessary finalizepsbt rpc calls (ismaelsadeeq)
e3d484b603 wallet rpc: return final tx hex from walletprocesspsbt if complete (Matthew Zipkin)

Pull request description:

  See https://github.com/bitcoin/bitcoin/pull/28363#discussion_r1315753887

  `walletprocesspsbt` currently returns a base64-encoded PSBT and a boolean indicating if the tx is "complete". If it is complete, the base64 PSBT can be finalized with `finalizepsbt` which returns the hex-encoded transaction suitable for `sendrawtransaction`.

  With this patch, `walletprocesspsbt` return object will ALSO include the broadcast-able hex string if the tx is already final. This saves users the extra step of calling `finalizepsbt` assuming they have already inspected and approve the transaction from earlier steps.

ACKs for top commit:
  ismaelsadeeq:
    re ACK 2e249b9227
  BrandonOdiwuor:
    re ACK 2e249b9
  Randy808:
    Tested ACK 2e249b9227
  achow101:
    ACK 2e249b9227
  ishaanam:
    ACK 2e249b9227

Tree-SHA512: 229c1103265a9b4248f080935a7ad5607c3be3f9a096a9ab6554093b2cd8aa8b4d1fa55b1b97d3925ba208dbc3ccba4e4d37c40e1491db0d27ba3d9fe98f931e
2023-09-12 12:28:13 -04:00
Andrew Chow
ad0c469d98 wallet: Use CTxDestination in CRecipient rather than scriptPubKey 2023-09-12 12:14:31 -04:00
Andrew Chow
07d3bdf4eb Add PubKeyDestination for P2PK scripts
P2PK scripts are not PKHash destinations, they should have their own
type.

This also results in no longer showing a p2pkh address for p2pk outputs.
However for backwards compatibility, ListCoinst will still do this
conversion.
2023-09-12 12:14:31 -04:00
Andrew Chow
1a98a51c66 Allow CNoDestination to represent a raw script
Even if a script is not a standard destination type, it can still be
useful to have a CTxDestination that stores the script.
2023-09-12 12:14:31 -04:00
Andrew Chow
8dd067088d Make WitnessUnknown members private
Make sure that nothing else can change WitnessUnknown's data members by
making them private. Also change the program to use a vector rather than
C-style array.
2023-09-12 12:14:31 -04:00
dergoegge
97e2e1d641 [fuzz] Use afl++ shared-memory fuzzing
Using shared-memory is faster than reading from stdin, see
7d2122e059/instrumentation/README.persistent_mode.md
2023-09-12 15:07:07 +01:00
fanquake
578f50fc48
Merge bitcoin/bitcoin#28448: rpc: Deprecate rpcserialversion=0
971bae9174 rpc: Deprecate rpcserialversion=0 (Anthony Towns)

Pull request description:

  This option was introduced in #9194 to ease the transition to segwit; now that most libraries and apps have been updated it should no longer be necessary.

ACKs for top commit:
  MarcoFalke:
    review ACK 971bae9174
  Randy808:
    Code Review ACK 971bae9174
  glozow:
    ACK 971bae9174, seems appropriate to remove. Thanks for looking at usage in https://github.com/bitcoin/bitcoin/pull/28448#issuecomment-1714699556

Tree-SHA512: 6880314504281e9d7c288bd159f8cadefb3e653ac2dd148396810f7f5a27ba352ecfe720eb2dbc6172b57820cb9a2a254dcb2585881abae43811013505f0e09a
2023-09-12 14:26:57 +01:00
MarcoFalke
fa19c914f7
scripted-diff: Rename CBufferedFile to BufferedFile
While touching all constructors in the previous commit, the class name
can be adjusted to comply with the style guide.

-BEGIN VERIFY SCRIPT-
 sed -i 's/CBufferedFile/BufferedFile/g' $( git grep -l CBufferedFile )
-END VERIFY SCRIPT-
2023-09-12 12:55:29 +02:00
MarcoFalke
fa2f2413b8
Remove unused GetType() from CBufferedFile and CAutoFile
GetType() is only called in tests, so it is unused and can be removed.
2023-09-12 12:35:13 +02:00
TheCharlatan
5c2b3cd4b8 dbwrapper: Use DataStream for batch operations 2023-09-12 12:07:39 +02:00
fanquake
fd69ffbbfb
Merge bitcoin/bitcoin#28427: index: coinstats reorg, fail when block cannot be reversed
c0bf667912 index: add [nodiscard] attribute to functions writing to the db (furszy)
eef595560e index: coinstats reorg, fail when block cannot be reversed (furszy)

Pull request description:

  Found it while reviewing https://github.com/bitcoin/bitcoin/pull/24230#discussion_r1310863359.

  During a reorg, continuing execution when a block cannot be reversed leaves the
  coinstats index in an inconsistent state.
  This was surely overlooked when 'CustomRewind' was implemented.

ACKs for top commit:
  ryanofsky:
    Code review ACK c0bf667912. Only change since last review is new commit adding [[nodiscard]]

Tree-SHA512: f4fc8522508d23e4fff09a29c935971819b1bd3b2a260e08e2e2b72f9340980d74fbec742a58fe216baf61d27de057c7c8300e8fa075f8507cd1227f128af909
2023-09-12 09:44:55 +01:00
Hennadii Stepanov
befb42f146
qt: Silence -Wcast-function-type warning
Required for https://github.com/bitcoin/bitcoin/pull/25972.
Picked from https://trac.nginx.org/nginx/ticket/1865.
2023-09-11 16:30:58 +01:00
Anthony Towns
971bae9174 rpc: Deprecate rpcserialversion=0 2023-09-11 17:21:53 +10:00
Pieter Wuille
64704386b2 doc: fix typos and mistakes in BIP324 code comments 2023-09-10 16:12:30 -04:00
Pieter Wuille
9bde93df2c net: do not use send buffer to store/cache garbage
Before this commit the V2Transport::m_send_buffer is used to store the
garbage:
* During MAYBE_V1 state, it's there despite not being sent.
* During AWAITING_KEY state, while it is being sent.
* At the end of the AWAITING_KEY state it cannot be wiped as it's still
  needed to compute the garbage authentication packet.

Change this by introducing a separate m_send_garbage field, taking over
the first and last role listed above. This means the garbage is only in
the send buffer when it's actually being sent, removing a few special
cases related to this.
2023-09-10 16:12:27 -04:00
Pieter Wuille
b6934fd03f net: merge V2Transport constructors, move key gen
This removes the ability for BIP324Cipher to generate its own key, moving that
responsibility to the caller (mostly, V2Transport). This allows us to write
the random-key V2Transport constructor by delegating to the explicit-key one.
2023-09-10 16:11:52 -04:00
fanquake
e25af11225
Merge bitcoin/bitcoin#28431: Remove needless GetTransactionOutputWeight helper
8d6228fc1f consensus/validation.h: remove needless GetTransactionOutputWeight helper (Antoine Poinsot)

Pull request description:

  Introduced in #26567. My bad. Thanks AJ for noticing.

ACKs for top commit:
  ajtowns:
    utACK 8d6228fc1f

Tree-SHA512: cf13647b4aac82fb6a54ae0338e3928e9bdf226ed4f5e91d529996328471744132db2bee9676e0b3f40a8bbe0e0ca51a9e5f91560a84e0f33597290551a1ee18
2023-09-09 11:45:15 +01:00
fanquake
579c49b3a6
Merge bitcoin/bitcoin#28428: Hard-code version number value for CBlockLocator and CDiskBlockIndex
e73d2a8018 refactor: remove clientversion include from dbwrapper.h (Cory Fields)
4240a082b8 refactor: Use DataStream now that version/type are unused (Cory Fields)
f15f790618 Remove version/hashing options from CBlockLocator/CDiskBlockIndex (Cory Fields)

Pull request description:

  This is also a much simpler replacement for #28327.

  There are version fields in `CBlockLocator` and `CDiskBlockIndex` that have always been written but discarded when read.

  I intended to convert them to use SerParams as introduced by #25284, which [ended up looking like this](3e3af45165). However because we don't currently have any definition of what a hash value would mean for either one of those, and we've never assigned the version field any meaning, I think it's better to just not worry about them.

  If we ever need to assign meaning in the future, we can introduce `SerParams` as was done for `CAddress`.

  As for the dummy values chosen:

  `CDiskBlockIndex::DUMMY_VERSION` was easy as the highest ever client version, and I don't expect any objection there.

  `CBlockLocator::DUMMY_VERSION` is hard-coded to the higest _PROTOCOL_ version ever used. This is to avoid a sudden bump that would be visible on the network if CLIENT_VERSION were used instead. In the future, if we ever need to use the value, we can discard anything in the CLIENT_VERSION range (for a few years as needed), as it's quite a bit higher.

  While reviewing, I suggest looking at the throwaway `SerParams` commit above as it shows where the call-sites are. I believe that should be enough to convince one's self that hashing is never used.

ACKs for top commit:
  TheCharlatan:
    Re-ACK e73d2a8018
  ajtowns:
    reACK e73d2a8018

Tree-SHA512: 45b0dd7c2e918493e2ee92a8e35320ad17991cb8908cb811150a96c5fd584ce177c775baeeb8675a602c90b9ba9203b8cefc0a2a0c6a71078b1d9c2b41e1f3ba
2023-09-09 11:30:57 +01:00
furszy
e14cc8fc69
gui: macOS, do not process dock icon actions during shutdown
As the 'QMenuBar' is created without a parent window in MacOS, the
app crashes when the user presses the shutdown button and, right
after it, triggers any action in the menu bar.

This happens because the QMenuBar is manually deleted in the
BitcoinGUI destructor but the events attached to it children
actions are not disconnected, so QActions events such us the
'QMenu::aboutToShow' could try to access null pointers.

Instead of guarding every single QAction pointer inside the
QMenu::aboutToShow slot, or manually disconnecting all
registered events in the destructor, we can check if a
shutdown was requested and discard the event.

The 'node' field is a ref whose memory is held by the
main application class, so it is safe to use here. Events
are disconnected prior destructing the main application object.

Furthermore, the 'MacDockIconHandler::dockIconClicked' signal
can make the app crash during shutdown for the very same
reason. The 'show()' call triggers the 'QApplication::focusWindowChanged'
event, which is connected to the 'minimize_action' QAction,
which is also part of the app menu bar, which could no longer exist.
2023-09-08 11:33:52 -03:00
Cory Fields
e73d2a8018 refactor: remove clientversion include from dbwrapper.h 2023-09-08 13:40:15 +00:00
Cory Fields
4240a082b8 refactor: Use DataStream now that version/type are unused 2023-09-08 13:40:15 +00:00
Cory Fields
f15f790618 Remove version/hashing options from CBlockLocator/CDiskBlockIndex 2023-09-08 13:40:15 +00:00
furszy
c0bf667912
index: add [nodiscard] attribute to functions writing to the db 2023-09-08 10:04:14 -03:00
fanquake
4e1a38c6df
Merge bitcoin/bitcoin#28196: BIP324 connection support
db9888feec net: detect wrong-network V1 talking to V2Transport (Pieter Wuille)
91e1ef8684 test: add unit tests for V2Transport (Pieter Wuille)
297c888997 net: make V2Transport preallocate receive buffer space (Pieter Wuille)
3ffa5fb49e net: make V2Transport send uniformly random number garbage bytes (Pieter Wuille)
0be752d9f8 net: add short message encoding/decoding support to V2Transport (Pieter Wuille)
8da8642062 net: make V2Transport auto-detect incoming V1 and fall back to it (Pieter Wuille)
13a7f01557 net: add V2Transport class with subset of BIP324 functionality (Pieter Wuille)
dc2d7eb810 crypto: Spanify EllSwiftPubKey constructor (Pieter Wuille)
5f4b2c6d79 net: remove unused Transport::SetReceiveVersion (Pieter Wuille)
c3fad1f29d net: add have_next_message argument to Transport::GetBytesToSend() (Pieter Wuille)

Pull request description:

  This is part of #27634.

  This implements the BIP324 v2 transport (which implements all of what the BIP calls transport layer *and* application layer), though in a non-exposed way. It is tested through an extensive fuzz test, which verifies that v2 transports can talk to v2 transports, and v1 transports can talk to v2 transports, and a unit test that exercises a number of unusual scenarios. The transport is functionally complete, including:
  * Autodetection of incoming V1 connections.
  * Garbage, both sending and receiving.
  * Short message type IDs, both sending and receiving.
  * Ignore packets (receiving only, but tested in a unit test).
  * Session IDs are visible in `getpeerinfo` output (for manual comparison).

  Things that are not included, left for future PRs, are:
  * Actually using the v2 transport for connections.
  * Support for the `NODE_P2P_V2` service flag.
  * Retrying downgrade to V1 when attempted outbound V2 connections immediately fail.
  * P2P functional and unit tests

ACKs for top commit:
  naumenkogs:
    ACK db9888feec
  theStack:
    re-ACK db9888feec
  mzumsande:
    Code Review ACK db9888feec

Tree-SHA512: 8906ac1e733a99e1f31c9111055611f706d80bbfc2edf6a07fa6e47b21bb65baacd1ff17993cbbf588063b2f5ad30b3af674a50c7bc8e8ebf4671483a21bbfeb
2023-09-08 10:24:03 +01:00
Antoine Poinsot
8d6228fc1f
consensus/validation.h: remove needless GetTransactionOutputWeight helper
Introduced in 9b7ec393b8. This copied the format of the other Get.*Weight helpers but it's useless for a CTxOut.
2023-09-08 11:16:06 +02:00
glozow
925bb723ca [refactor] batch-add transactions to DisconnectedBlockTransactions
No behavior change.
In a future commit, we can optimize by reserving vtx.size().
2023-09-07 18:55:44 +01:00
fanquake
238d29aff9
Merge bitcoin/bitcoin#28361: fuzz: add ConstructPubKeyBytes util function
1580e3be83 fuzz: add ConstructPubKeyBytes function (josibake)

Pull request description:

  In https://github.com/bitcoin/bitcoin/pull/28246 and https://github.com/bitcoin/bitcoin/pull/28122 , we add a `PubKeyDestination` and a `V0SilentPaymentsDestination`. Both of these PRs update `fuzz/util.cpp` and need a way to create well-formed pubkeys. Currently in `fuzz/util.cpp`, we have some logic for creating pubkeys in the multisig data provider. This logic is duplicated in #28246 and duplicated again in #28122. Seems much better to have a `ConstructPubKeyBytes` function that both PRs (and any future work) can reuse.

  This PR introduces a function to do this and has the existing code use it. While the purpose is to introduce a utility function, the previous multisig code used `ConsumeIntegralInRange(4, 7)` which would have created some uncompressed pubkeys with the prefix 0x05, which is incorrect (see https://bitcoin.stackexchange.com/questions/57855/c-secp256k1-what-do-prefixes-0x06-and-0x07-in-an-uncompressed-public-key-signif)

  tldr; using `PickValueFromArray` is more correct as it limits to the set of defined prefixes for compressed and uncompressed pubkeys.

ACKs for top commit:
  Sjors:
    ACK 1580e3be83

Tree-SHA512: c87c8bcd1f6b3a97ef772be93102efb912811c59f32211cfd531a116f1da8a57c8c6ff106b34f2a2b88d8b34fb5bc30d9f9ed6d2720113ffcaaa2f8d5dc9eb27
2023-09-07 16:22:16 +01:00
furszy
eef595560e
index: coinstats reorg, fail when block cannot be reversed
During a reorg, continuing execution when a block cannot be
reversed leaves the coinstats index in an inconsistent state,
which was surely overlooked when 'CustomRewind' was implemented.
2023-09-07 12:15:34 -03:00
Pieter Wuille
db9888feec net: detect wrong-network V1 talking to V2Transport 2023-09-07 09:04:55 -04:00
Pieter Wuille
91e1ef8684 test: add unit tests for V2Transport 2023-09-07 09:04:55 -04:00
Pieter Wuille
297c888997 net: make V2Transport preallocate receive buffer space 2023-09-07 09:04:55 -04:00
Pieter Wuille
3ffa5fb49e net: make V2Transport send uniformly random number garbage bytes 2023-09-07 09:04:55 -04:00
Pieter Wuille
0be752d9f8 net: add short message encoding/decoding support to V2Transport 2023-09-07 09:04:51 -04:00
Pieter Wuille
8da8642062 net: make V2Transport auto-detect incoming V1 and fall back to it 2023-09-07 09:01:01 -04:00
Pieter Wuille
13a7f01557 net: add V2Transport class with subset of BIP324 functionality
This introduces a V2Transport with a basic subset of BIP324 functionality:
* no ability to send garbage (but receiving is supported)
* no ability to send decoy packets (but receiving them is supported)
* no support for short message id encoding (neither encoding or decoding)
* no waiting until 12 non-V1 bytes have been received
* (and thus) no detection of V1 connections on the responder side
  (on the sender side, detecting V1 is not supported either, but that needs
  to be dealt with at a higher layer, by reconnecting)
2023-09-07 09:00:58 -04:00
Pieter Wuille
dc2d7eb810 crypto: Spanify EllSwiftPubKey constructor 2023-09-07 08:53:45 -04:00
Pieter Wuille
5f4b2c6d79 net: remove unused Transport::SetReceiveVersion 2023-09-07 08:53:45 -04:00
Pieter Wuille
c3fad1f29d net: add have_next_message argument to Transport::GetBytesToSend()
Before this commit, there are only two possibly outcomes for the "more" prediction
in Transport::GetBytesToSend():
* true: the transport itself has more to send, so the answer is certainly yes.
* false: the transport has nothing further to send, but if vSendMsg has more message(s)
         left, that still will result in more wire bytes after the next
         SetMessageToSend().

For the BIP324 v2 transport, there will arguably be a third state:
* definitely not: the transport has nothing further to send, but even if vSendMsg has
                  more messages left, they can't be sent (right now). This happens
                  before the handshake is complete.

To implement this, we move the entire decision logic to the Transport, by adding a
boolean to GetBytesToSend(), called have_next_message, which informs the transport
whether more messages are available. The return values are still true and false, but
they mean "definitely yes" and "definitely no", rather than "yes" and "maybe".
2023-09-07 08:53:45 -04:00
fanquake
8e0d9796da
Merge bitcoin/bitcoin#25284: net: Use serialization parameters for CAddress serialization
fa626af3ed Remove unused legacy CHashVerifier (MarcoFalke)
fafa3fc5a6 test: add tests that exercise WithParams() (MarcoFalke)
fac81affb5 Use serialization parameters for CAddress serialization (MarcoFalke)
faec591d64 Support for serialization parameters (MarcoFalke)
fac42e9d35 Rename CSerAction* to Action* (MarcoFalke)
aaaa3fa947 Replace READWRITEAS macro with AsBase wrapping function (MarcoFalke)

Pull request description:

  It seems confusing that picking a wrong value for `ADDRV2_FORMAT` could have effects on consensus. (See the docstring of `ADDRV2_FORMAT`).

  Fix this by implementing https://github.com/bitcoin/bitcoin/issues/19477#issuecomment-1147421608 .

  This may also help with libbitcoinkernel, see https://github.com/bitcoin/bitcoin/pull/28327

ACKs for top commit:
  TheCharlatan:
    ACK fa626af3ed
  ajtowns:
    ACK fa626af3ed

Tree-SHA512: 229d379da27308890de212b1fd2b85dac13f3f768413cb56a4b0c2da708f28344d04356ffd75bfcbaa4cabf0b6cc363c4f812a8f1648cff9e436811498278318
2023-09-07 11:34:34 +01:00
fanquake
d98180a969
Merge bitcoin/bitcoin#28419: fuzz: introduce and use ConsumePrivateKey helper
583af18fd1 fuzz: introduce and use `ConsumePrivateKey` helper (Sebastian Falbesoner)

Pull request description:

  In the course of reviewing BIP324 related PRs I noticed a frequent pattern of creating private keys (`CKey` instances) with data consumed from the fuzz data provider:
  ```
      auto key_data = provider.ConsumeBytes<unsigned char>(32);
      key_data.resize(32);
      CKey key;
      key.Set(key_data.begin(), key_data.end(), /*fCompressedIn=*/true);
  ```
  This PR introduces a corresponding helper `ConsumePrivateKey` in order to deduplicate code. The compressed flag can either be set to a fixed value, or, if `std::nullopt` is passed (=default), is also consumed from the fuzz data provider via `.ConsumeBool()`.

  Note that this is not a pure refactor, as some of the replaced call-sites previously consumed a random length (`ConsumeRandomLengthByteVector`) instead of a fixed size of 32 bytes for key data. As far as I can see, there is not much value in using a random size, as in all those cases we can only proceed or do something useful with a valid private key, and key data with sizes other than 32 bytes always lead to invalid keys.

ACKs for top commit:
  sipa:
    utACK 583af18fd1
  brunoerg:
    crACK 583af18fd1

Tree-SHA512: 58a178432ba1eb0a2f7597b6700e96477e8b10f429ef642445a52db12e74d81aec307888315b772bfda9610f90df3e1d556cf024c2bef1d520303b12584feaaa
2023-09-07 11:20:12 +01:00
Andrew Chow
d2ccca253f
Merge bitcoin/bitcoin#26567: Wallet: estimate the size of signed inputs using descriptors
10546a569c wallet: accurately account for the size of the witness stack (Antoine Poinsot)
9b7ec393b8 wallet: use descriptor satisfaction size to estimate inputs size (Antoine Poinsot)
8d870a9873 script/signingprovider: introduce a MultiSigningProvider (Antoine Poinsot)
fa7c46b503 descriptor: introduce a method to get the satisfaction size (Antoine Poinsot)
bdba7667d2 miniscript: introduce a helper to get the maximum witness size (Antoine Poinsot)
4ab382c2cd miniscript: make GetStackSize independent of P2WSH context (Antoine Poinsot)

Pull request description:

  The wallet currently estimates the size of a signed input by doing a dry run of the signing logic. This is unnecessary since all outputs we can sign for can be represented by a descriptor, and we can derive the size of a satisfaction ("signature") directly from the descriptor itself.
  In addition, the current approach does not generalize well: dry runs of the signing logic are only possible for the most basic scripts. See for instance the discussion in #24149 around that.

  This introduces a method to get the maximum size of a satisfaction from a descriptor, and makes the wallet use that instead of the dry-run.

ACKs for top commit:
  sipa:
    utACK 10546a569c
  achow101:
    re-ACK 10546a569c

Tree-SHA512: 43ed1529fbd30af709d903c8c5063235e8c6a03b500bc8f144273d6184e23a53edf0fea9ef898ed57d8a40d73208b5d935cc73b94a24fad3ad3c63b3b2027174
2023-09-06 13:31:03 -04:00
Matthew Zipkin
e573f24202
unit test: add coverage for BlockManager 2023-09-06 10:39:54 -04:00
Sebastian Falbesoner
583af18fd1 fuzz: introduce and use ConsumePrivateKey helper 2023-09-06 13:59:12 +02:00