Commit graph

37768 commits

Author SHA1 Message Date
MarcoFalke
faf4315c88
test: Return dict in MiniWallet::send_to 2023-05-12 15:26:50 +02:00
Andrew Chow
9d85c03620
Merge bitcoin/bitcoin#27629: doc: remove version number from bips.md
308caf326d doc: remove version number from bips.md (fanquake)

Pull request description:

  This always just needs "bumping" (see previous rc type pulls), and the version number is already whichever version of the code you acquired bips.md with.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 308caf326d
  achow101:
    ACK 308caf326d
  theStack:
    ACK 308caf326d
  hebasto:
    ACK 308caf326d

Tree-SHA512: fcb98e7cdc0c1f8960bfba86be09c2badb36b613060fae394a56e1561c69d28f433434f573c8b1ae1d71ae326277dea2a4841d5c08ad39f8e8848300743146e7
2023-05-11 13:43:32 -04:00
fanquake
308caf326d
doc: remove version number from bips.md
This always just needs "bumping", and the version number is already
whichever version of the code you acquired bips.md with.
2023-05-11 17:49:16 +01:00
fanquake
137a98c5a2
Merge bitcoin/bitcoin#27610: Improve performance of p2p inv to send queues
5b3406094f net_processing: Boost inv trickle rate (Anthony Towns)
228e9201ef txmempool: have CompareDepthAndScore sort missing txs first (Anthony Towns)

Pull request description:

  Couple of performance improvements when draining the inventory-to-send queue:

   * drop txs that have already been evicted from the mempool (or included in a block) immediately, rather than at the end of processing
   * marginally increase outgoing trickle rate during spikes in tx volume

ACKs for top commit:
  willcl-ark:
    ACK 5b34060
  instagibbs:
    ACK 5b3406094f
  darosior:
    utACK 5b3406094f
  glozow:
    code review ACK 5b3406094f
  dergoegge:
    utACK 5b3406094f

Tree-SHA512: 155cd3b5d150ba3417c1cd126f2be734497742e85358a19c9d365f4f97c555ff9e846405bbeada13c3575b3713c3a7eb2f780879a828cbbf032ad9a6e5416b30
2023-05-11 14:20:30 +01:00
fanquake
9ae854da19
depends: no-longer nuke libc++abi.so* in native_clang package
We weren't copying it over in any case.
2023-05-11 12:29:52 +01:00
fanquake
c2f2abd0a4
Merge bitcoin/bitcoin#27125: refactor, kernel: Decouple ArgsManager from blockstorage
5ff63a09a9 refactor, blockstorage: Replace stopafterblockimport arg (TheCharlatan)
18e5ba7c80 refactor, blockstorage: Replace blocksdir arg (TheCharlatan)
02a0899527 refactor, BlockManager: Replace fastprune from arg with options (TheCharlatan)
a498d699e3 refactor/iwyu: Complete includes for blockmanager_args (TheCharlatan)
f0bb1021f0 refactor: Move functions to BlockManager methods (TheCharlatan)
cfbb212493 zmq: Pass lambda to zmq's ZMQPublishRawBlockNotifier (TheCharlatan)
8ed4ff8e05 refactor: Declare g_zmq_notification_interface as unique_ptr (TheCharlatan)

Pull request description:

  The libbitcoin_kernel library should not rely on the `ArgsManager`, but rather use option structs that can be passed to the various classes it uses. This PR removes reliance on the `ArgsManager` from the `blockstorage.*` files. Like similar prior work, it uses the options struct in the `BlockManager` that can be populated with `ArgsManager` values.

  Some related prior work: https://github.com/bitcoin/bitcoin/pull/26889 https://github.com/bitcoin/bitcoin/pull/25862 https://github.com/bitcoin/bitcoin/pull/25527 https://github.com/bitcoin/bitcoin/pull/25487

  Related PR removing blockstorage globals: https://github.com/bitcoin/bitcoin/pull/25781

ACKs for top commit:
  ryanofsky:
    Code review ACK 5ff63a09a9. Since last ACK just added std::move and fixed commit title. Sorry for the noise!
  mzumsande:
    Code Review ACK 5ff63a09a9

Tree-SHA512: 4bde8fd140a40b97eca923e9016d85dcea6fad6fd199731f158376294af59c3e8b163a0725aa47b4be3519b61828044e0a042deea005e0c28de21d8b6c3e1ea7
2023-05-11 10:28:51 +01:00
Andrew Chow
3ff67f7783
Merge bitcoin/bitcoin#19690: util: improve FindByte() performance
72efc26439 util: improve streams.h:FindByte() performance (Larry Ruane)
604df63f6c [bench] add streams findbyte (gzhao408)

Pull request description:

  This PR is strictly a performance improvement; there is no functional change. The `CBufferedFile::FindByte()` method searches for the next occurrence of the given byte in the file. Currently, this is done by explicitly inspecting each byte in turn. This PR takes advantage of `std::find()` to do the same more efficiently, improving its CPU runtime by a factor of about 25 in typical use.

ACKs for top commit:
  achow101:
    re-ACK 72efc26439
  stickies-v:
    re-ACK 72efc26439

Tree-SHA512: ddf0bff335cc8aa34f911aa4e0558fa77ce35d963d602e4ab1c63090b4a386faf074548daf06ee829c7f2c760d06eed0125cf4c34e981c6129cea1804eb3b719
2023-05-10 17:50:42 -04:00
glozow
67b7fecacd [mempool] clear mapDeltas entry if prioritisetransaction sets delta to 0
It's unnecessary to keep the data around, as it doesn't do anything. If
prioritisetransaction is called again, we'll make a new entry in
mapDeltas.

These entries are only deleted when the transaction is mined or conflicted
from a block (i.e. not in replacement or eviction), are persisted in
mempool.dat, and never expire. If node operators use the RPC to
regularly prioritise/de-prioritise transactions, these (meaningless)
map entries may hang around forever and take up valuable mempool memory.
2023-05-10 21:10:44 +01:00
glozow
c1061acb9d [functional test] prioritisation is not removed during replacement and expiry 2023-05-10 21:10:44 +01:00
glozow
0e5874f0b0 [functional test] getprioritisedtransactions RPC 2023-05-10 21:10:44 +01:00
glozow
99f8046829 [rpc] add getprioritisedtransactions
This allows the user to see prioritisation for not-in-mempool
transactions.
2023-05-10 21:10:44 +01:00
glozow
9e9ca36c80 [mempool] add GetPrioritisedTransactions 2023-05-10 21:10:44 +01:00
TheCharlatan
5ff63a09a9
refactor, blockstorage: Replace stopafterblockimport arg
Add a stop_after_block_import field to the BlockManager options. Use
this field instead of the global gArgs.

This should allow users of the BlockManager to not rely on the global
Args.
2023-05-10 19:07:46 +02:00
TheCharlatan
18e5ba7c80
refactor, blockstorage: Replace blocksdir arg
Add a blocks_dir field to the BlockManager options. Move functions
relying on the global gArgs to get the blocks_dir into the BlockManager
class.

This should eventually allow users of the BlockManager to not rely on
the global Args and instead pass in their own options.
2023-05-10 19:07:44 +02:00
TheCharlatan
02a0899527
refactor, BlockManager: Replace fastprune from arg with options
Remove access to the global gArgs for the fastprune argument and
replace it by adding a field to the existing BlockManager Options
struct.

When running `clang-tidy-diff` on this commit, there is a diagnostic
error: `unknown type name 'uint64_t' [clang-diagnostic-error] uint64_t
prune_target{0};`, which is fixed by including cstdint.

This should eventually allow users of the BlockManager to not rely on
the global gArgs and instead pass in their own options.
2023-05-10 19:07:42 +02:00
TheCharlatan
a498d699e3
refactor/iwyu: Complete includes for blockmanager_args 2023-05-10 19:07:30 +02:00
TheCharlatan
f0bb1021f0
refactor: Move functions to BlockManager methods
This is a commit in preparation for the next few commits. The functions
are moved to methods to avoid their re-declaration for the purpose of
passing in BlockManager options.

The functions that were now moved into the BlockManager should no longer
use the params as an argument, but instead use the member variable.

In the moved ReadBlockFromDisk and UndoReadFromDisk, change
the function signature to accept a reference to a CBlockIndex instead of
a raw pointer. The pointer is expected to be non-null, so reflect that
in the type.

To allow for the move of functions to BlockManager methods all call
sites require an instantiated BlockManager, or a callback to one.
2023-05-10 19:06:53 +02:00
TheCharlatan
cfbb212493
zmq: Pass lambda to zmq's ZMQPublishRawBlockNotifier
The lambda captures a reference to the chainman unique_ptr to retrieve
block data. An assert is added on the chainman to ensure that the lambda
is not used while the chainman is uninitialized.

This is done in preparation for the following commits where blockstorage
functions are made BlockManager methods.
2023-05-10 19:06:45 +02:00
Andrew Chow
e0a70c5b4f
Merge bitcoin/bitcoin#27605: refactor: Replace global find_value function with UniValue::find_value method
fa266c4bbf Temporarily work around gcc-13 warning bug in interfaces_tests (MarcoFalke)
fa28850562 Fix clang-tidy performance-unnecessary-copy-initialization warnings (MarcoFalke)
faaa60a30e Remove unused find_value global function (MarcoFalke)
fa422aeec2 scripted-diff: Use UniValue::find_value method (MarcoFalke)
fa548ac872 Add UniValue::find_value method (MarcoFalke)

Pull request description:

  The global function has issues:

  * It causes gcc-13 warnings, see https://github.com/bitcoin/bitcoin/issues/26926
  * There is no rationale for it being a global function, when it acts like a member function
  * `performance-unnecessary-copy-initialization` clang-tidy isn't run on it

  Fix all issues by making it a member function.

ACKs for top commit:
  achow101:
    ACK fa266c4bbf
  hebasto:
    re-ACK fa266c4bbf

Tree-SHA512: 6c4e25da3122cd3b91c376bef73ea94fb3beb7bf8ef5cb3853c5128d95bfbacbcbfb16cc843eb7b1a7ebd350c2b6311f8085eeacf9aeeab3366987037d209e44
2023-05-10 12:56:37 -04:00
MarcoFalke
fa01c3c59c
ci: Remove CI_EXEC bloat 2023-05-10 15:28:19 +02:00
kevkevin
a7b46a1fea
test: added coverage to mining_basic.py
Included a test that checks if we call submitblock with
block.vtx.empty() then it throws an rpc deserialization error, currently
we only test if !block.vtx->IsCoinBase() throws an rpc deserialization
error
2023-05-10 07:50:46 -05:00
MarcoFalke
fa8a428c92
move-only: Move almost all CI_EXEC code to 06_script_b.sh
[WARN] The commit is obviously broken and will not run the CI system. In
the rare case this is hit in a git bisect, just skip the commit.

The goal here was to make it trivial to review with the git option:
--color-moved=dimmed-zebra

It is required to move everything into one file because "exit 0" will
otherwise stop working as intended when the containing bash script is no
longer executed with "source ...".

If there is desire to split up 06_script_b.sh into logical chunks in the
future, it will also be easier after the following commit.
2023-05-10 14:10:38 +02:00
fanquake
104eed1166
Merge bitcoin/bitcoin#27611: refactor: Use ChainType enum exhaustively
e23088707b refactor: Use ChainType enum exhaustively (TheCharlatan)

Pull request description:

  This is a follow up of https://github.com/bitcoin/bitcoin/pull/27491, more concretely https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188847896, for not using default cases (as per the style guide), and https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188852707 and https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188851857 for avoiding dead code.

ACKs for top commit:
  fanquake:
    ACK e23088707b - deals with almost all follow up comments out of #27491.

Tree-SHA512: 1794190b03b91d3ca349a4da08e9610dbb3432983eee7cb21ecc758d1d7d710560c97661de14cdf493c28c00ebe8977511b4696055c0940e7f815b622dbacd16
2023-05-10 12:27:18 +01:00
TheCharlatan
8ed4ff8e05
refactor: Declare g_zmq_notification_interface as unique_ptr
Ensures better memory safety for this global. This came up during
discussion of the following commit, but is not strictly required for its
implementation.
2023-05-10 12:56:46 +02:00
fanquake
883766fa45
Merge bitcoin/bitcoin#27573: ci: Remove CI_EXEC bloat in test/06_script_b.sh
fa1dbd04ca ci: Remove CI_EXEC bloat in test/06_script_b.sh (MarcoFalke)
fae8de926a ci: Move CI container kill out of 06_script_b.sh (MarcoFalke)
fa7d75540e ci: Pass full env to CI pod to avoid missing a var (MarcoFalke)

Pull request description:

  `CI_EXEC` has many issues:

  * It is roughly equivalent to `bash -c "$*"`, meaning that the full command will be treated as a single string, ignoring tokens.
  * It must be put in front of (almost) every command, making it easy to forget, hard to debug the resulting failure, and the code verbose.

  Fix all issues in one script by removing it.

ACKs for top commit:
  fanquake:
    ACK fa1dbd04ca - this conflicts with #27125, but that is going to be rebased soon, and this could be merged in the interim. cc TheCharlatan
  TheCharlatan:
    ACK fa1dbd04ca

Tree-SHA512: e5ab5503a05a787f2bc6ca25e71ad3dc166aade57e25d9677e72b1ca4e5fb6045c058dfd55f47ac93f710538e62d57c12cd7eb9d1260c6f55f3c8091908dc70d
2023-05-10 11:55:29 +01:00
Hennadii Stepanov
a94d75fa81
msvc: Do not define HAVE_CONSENSUS_LIB
The `HAVE_CONSENSUS_LIB` symbol is supposed to be defined when a
user-exposed shared library (DLL) is built which is not the case here.
2023-05-10 11:26:51 +01:00
Hennadii Stepanov
cf6ff1031b
msvc: Clean up libbitcoin_consensus source files
See `libbitcoin_consensus_a_SOURCES` in the `src/Makefile.am`.
2023-05-10 11:26:44 +01:00
Hennadii Stepanov
30aee016f1
scripted-diff: Rename libbitcoinconsensus to libbitcoin_consensus
This build artifact is not a user-exposed shared library (DLL) but a
convenience static library.
See: https://github.com/bitcoin/bitcoin/blob/master/doc/design/libraries.md

-BEGIN VERIFY SCRIPT-
sed -i 's/libbitcoinconsensus/libbitcoin_consensus/g' $(git grep -l "libbitcoinconsensus" -- build_msvc)
git mv build_msvc/libbitcoinconsensus build_msvc/libbitcoin_consensus
git mv build_msvc/libbitcoin_consensus/libbitcoinconsensus.vcxproj build_msvc/libbitcoin_consensus/libbitcoin_consensus.vcxproj
-END VERIFY SCRIPT-
2023-05-10 11:26:35 +01:00
fanquake
3777c75d14
Merge bitcoin/bitcoin#27604: add ryanofsky to trusted-keys
59ebee3fb4 add ryanofsky to trusted-keys (Ryan Ofsky)

Pull request description:

  For maintaining interfaces and other areas of the codebase. Some previous discussion in IRC meeting https://gnusha.org/bitcoin-core-dev/2023-05-04.log

ACKs for top commit:
  darosior:
    ACK 59ebee3fb4 for adding ryanofsky as a maintainer.
  hebasto:
    ACK 59ebee3fb4
  glozow:
    ACK 59ebee3fb4
  pinheadmz:
    ACK 59ebee3fb4
  stickies-v:
    utACK 59ebee3fb4
  brunoerg:
    ACK 59ebee3fb4
  theStack:
    ACK 59ebee3fb4
  mzumsande:
    ACK 59ebee3fb4
  theuni:
    ACK 59ebee3fb4.
  jarolrod:
    ACK 59ebee3fb4

Tree-SHA512: e3d2815d8950e419316ee49ec70f01cb1939de61b3017b8140c0194b519b5b523a618d3ad2ab9fe3fd32543649c1465fdd6baf52ad68da48b680bd4898186ff4
2023-05-10 10:19:05 +01:00
fanquake
dbfc748d3d
Merge bitcoin/bitcoin#27608: p2p: Avoid prematurely clearing download state for other peers
52e52071e0 p2p: Avoid prematurely clearing download state for other peers (Suhas Daftuar)

Pull request description:

  Avoid letting one peer send us data that clears out the download request (and related timers etc) from another peer.

  The exception is if a block is definitely stored to disk, in which case we'll clear the download state (just as we do for compact blocks).

ACKs for top commit:
  jamesob:
    ACK 52e52071e0 ([`jamesob/ackr/27608.1.sdaftuar.p2p_avoid_prematurely_cl`](https://github.com/jamesob/bitcoin/tree/ackr/27608.1.sdaftuar.p2p_avoid_prematurely_cl))
  instagibbs:
    ACK 52e52071e0
  fjahr:
    Code review ACK 52e52071e0
  mzumsande:
    Code Review ACK 52e52071e0

Tree-SHA512: 3ee92507edc3303c16c70ca44ba6c28c104afe95196e4b9167032590ed23d4f569f654f8eb8758940bd6536bc9ca810d2a77d2739db386b927e8b3f3cf55cb16
2023-05-10 10:12:55 +01:00
TheCharlatan
e23088707b
refactor: Use ChainType enum exhaustively
This is a follow up of https://github.com/bitcoin/bitcoin/pull/27491,
more concretely
https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188847896,
for not using default cases (as per the style guide), and
https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188852707 and
https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188851857 for
avoiding dead code.

Also change chain name to chain type in docstrings
2023-05-10 10:39:58 +02:00
Anthony Towns
5b3406094f net_processing: Boost inv trickle rate
If transactions are being added to the mempool at a rate faster than 7tx/s
(INVENTORY_BROADCAST_PER_SECOND) then peers' inventory_to_send queue can
become relatively large. If this happens, increase the number of txids
we include in an INV message (normally capped at 35) by 5 for each 1000
txids in the queue.

This will tend to clear a temporary excess out reasonably quickly; an
excess of 4000 invs to send will be cleared down to 1000 in about 30
minutes, while an excess of 20000 invs would be cleared down to 1000 in
about 60 minutes.
2023-05-10 10:51:26 +10:00
Anthony Towns
228e9201ef txmempool: have CompareDepthAndScore sort missing txs first
We use CompareDepthAndScore to choose an order of txs to inv. Rather
than sorting txs that have been evicted from the mempool at the end
of the list, sort them at the beginning so they are removed from
the queue immediately.
2023-05-10 10:51:26 +10:00
MarcoFalke
fa266c4bbf
Temporarily work around gcc-13 warning bug in interfaces_tests
This can be reverted once gcc excludes lambdas with decltype(auto)
return type from its -Wdangling-reference analysis.
2023-05-09 20:27:05 +02:00
Suhas Daftuar
52e52071e0 p2p: Avoid prematurely clearing download state for other peers 2023-05-09 13:52:13 -04:00
MarcoFalke
fa28850562
Fix clang-tidy performance-unnecessary-copy-initialization warnings 2023-05-09 18:48:52 +02:00
MarcoFalke
faaa60a30e
Remove unused find_value global function 2023-05-09 18:48:10 +02:00
MarcoFalke
fa422aeec2
scripted-diff: Use UniValue::find_value method
-BEGIN VERIFY SCRIPT-
 sed --regexp-extended -i 's/find_value\(([^ ,]+), /\1.find_value(/g' $(git grep -l find_value)
-END VERIFY SCRIPT-
2023-05-09 18:47:14 +02:00
MarcoFalke
fa548ac872
Add UniValue::find_value method 2023-05-09 18:47:14 +02:00
fanquake
fc06881f13
Merge bitcoin/bitcoin#27491: refactor: Move chain constants to the util library
d168458d1f scripted-diff: Remove unused chainparamsbase includes (TheCharlatan)
e9ee8aaf3a Add missing definitions in prep for scripted diff (TheCharlatan)
ba8fc7d788 refactor: Replace string chain name constants with ChainTypes (TheCharlatan)
401453df41 refactor: Introduce ChainType getters for ArgsManager (TheCharlatan)
bfc21c31b2 refactor: Create chaintype files (TheCharlatan)

Pull request description:

  This pull request is part of the `libbitcoinkernel` project https://github.com/bitcoin/bitcoin/issues/24303 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". It is also a follow up to #26177.

  It replaces pull request https://github.com/bitcoin/bitcoin/pull/27294, which just moved the constants to a new file, but did not re-declare them as enums.

  The code move of the chain name constants out of the `chainparamsbase` to their own separate header allows the kernel `chainparams` to no longer include `chainparamsbase`. The `chainparamsbase` contain references to the `ArgsManager` and networking related options that should not belong to the kernel library. Besides this move, the constants are re-declared as enums with helper functions facilitating string conversions.

ACKs for top commit:
  ryanofsky:
    Code review ACK d168458d1f. Just suggested changes since last review.

Tree-SHA512: ac2fbe5cbbab4f52eae1e30af1f16700b6589eb4764c328a151a712adfc37f326cc94a65c385534c57d4bc92cc1a13bf1777d92bc924a20dbb30440e7380b316
2023-05-09 15:42:21 +01:00
fanquake
d5ff96f920
Merge bitcoin/bitcoin#27594: refactor: Remove unused GetTimeMillis
fae1d9cded refactor: Remove unused GetTimeMillis (MarcoFalke)

Pull request description:

  The function is unused, not type-safe, and does not denote the underlying clock type. So remove it.

ACKs for top commit:
  willcl-ark:
    tACK fae1d9cded

Tree-SHA512: 41ea7125d1964192b85a94265be974d02bf1e79b1feb61bff11486dc0ac811745156940ec5cad2ad1f94b653936f8ae563c959c1c4142203a55645fcb83203e8
2023-05-09 15:21:56 +01:00
TheCharlatan
d168458d1f
scripted-diff: Remove unused chainparamsbase includes
This is a follow-up to previous commits moving the chain constants out
of chainparamsbase.

The script removes the chainparamsbase header in all files where it is
included, but not used. This is done by filtering against all defined
symbols of the header as well as its respective .cpp file.

The kernel chainparams now no longer relies on chainparamsbase.

-BEGIN VERIFY SCRIPT-
sed -i '/#include <chainparamsbase.h>/d' $( git grep -l 'chainparamsbase.h' | xargs grep -L 'CBaseChainParams\|CreateBaseChainParams\|SetupChainParamsBaseOptions\|BaseParams\|SelectBaseParams\|chainparamsbase.cpp' )
-END VERIFY SCRIPT-
2023-05-09 15:49:19 +02:00
TheCharlatan
e9ee8aaf3a
Add missing definitions in prep for scripted diff
The missing include and ArgsManager were found after applying the
scripted diff in the following commit.
2023-05-09 15:49:17 +02:00
TheCharlatan
ba8fc7d788
refactor: Replace string chain name constants with ChainTypes
This commit effectively moves the definition of these constants
out of the chainparamsbase to their own file.

Using the ChainType enums provides better type safety compared to
passing around strings.

The commit is part of an ongoing effort to decouple the libbitcoinkernel
library from the ArgsManager and other functionality that should not be
part of the kernel library.
2023-05-09 15:49:14 +02:00
fanquake
b13830eff6
Merge bitcoin/bitcoin#27575: Introduce platform-agnostic ALWAYS_INLINE macro
3f19875d66 scripted-diff: Use platform-agnostic `ALWAYS_INLINE` macro (Hennadii Stepanov)
e16c22fe02 Introduce platform-agnostic `ALWAYS_INLINE` macro (Hennadii Stepanov)

Pull request description:

  Split from https://github.com/bitcoin/bitcoin/pull/24773 as requested in https://github.com/bitcoin/bitcoin/pull/24773#issuecomment-1534954977.

ACKs for top commit:
  theuni:
    utACK 3f19875d66
  fanquake:
    ACK 3f19875d66

Tree-SHA512: a19b713433bb4d3c5fff1ddb4d1413837823a400c1d46363a8181e7632b059846ba92264be1c867f35f532af90945ed20887103471b09c07623e0f3905b4098b
2023-05-09 14:45:52 +01:00
TheCharlatan
401453df41
refactor: Introduce ChainType getters for ArgsManager
These are introduced for the next commit where the usage of the
ChainType is adopted throughout the code.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: TheCharlatan <seb.kung@gmail.com>
2023-05-09 15:38:37 +02:00
TheCharlatan
bfc21c31b2
refactor: Create chaintype files
This is the first of a number of commits with the goal of moving the
chain type definitions out of chainparamsbase to their own file and
implementing them as enums instead of constant strings. The goal is to
allow the kernel chainparams to no longer include chainparamsbase.

The commit is part of an ongoing effort to decouple the libbitcoinkernel
library from the ArgsManager and other functionality that should not be
part of the kernel library.
2023-05-09 11:33:09 +02:00
Ryan Ofsky
59ebee3fb4
add ryanofsky to trusted-keys 2023-05-08 23:30:56 -04:00
Andrew Chow
fa53611cf1
Merge bitcoin/bitcoin#26076: Switch hardened derivation marker to h
fe49f06c0e doc: clarify PR 26076 release note (Sjors Provoost)
bd13dc2f46 Switch hardened derivation marker to h in descriptors (Sjors Provoost)

Pull request description:

  This makes it easier to handle descriptor strings manually, especially when importing from another Bitcoin Core wallet.

  For example the `importdescriptors` RPC call is easiest to use `h` as the marker: `'["desc": ".../0h/..."]'`, avoiding the need for escape characters. With this change `listdescriptors` will use `h`, so you can copy-paste the result, without having to add escape characters or switch `'` to 'h' manually.

  Both markers can still be parsed.

  The `hdkeypath` field in `getaddressinfo` is also impacted by this change, except for legacy wallets. The latter is to prevent accidentally breaking ancient software that uses our legacy wallet.

  See discussion in #15740

ACKs for top commit:
  achow101:
    ACK fe49f06c0e
  darosior:
    re-ACK fe49f06c0e

Tree-SHA512: f78bc873b24a6f7a2bf38f5dd58f2b723e35e6b10e4d65c36ec300e2d362d475eeca6e5afa04b3037ab4bee0bf8ebc93ea5fc18102a2111d3d88fc873c08dc89
2023-05-08 13:31:28 -04:00
fanquake
26cb32c02d
Merge bitcoin/bitcoin#27580: msvc: Cleanup after upgrading libsecp256k1 up to 0.3.0
d9b54c46cc msvc: Cleanup after upgrading libsecp256k1 up to 0.3.0 (Hennadii Stepanov)

Pull request description:

  libsecp256k1 [v0.3.0](https://github.com/bitcoin-core/secp256k1/blob/master/CHANGELOG.md#030---2023-03-08):
  > Removed the configuration header `src/libsecp256k1-config.h`.

  This PR removed the code that has been unused since https://github.com/bitcoin/bitcoin/pull/27230.

  The `USE_ASM_X86_64` is now undefined explicitly (but actually it seems a bit redundant).

  The `ECMULT_GEN_PREC_BITS` and `ECMULT_WINDOW_SIZE` macros are defined by the source code to their defaults.

  ---

  Considering the upcoming CMake-based build system, these changes have a low-priority.

ACKs for top commit:
  fanquake:
    ACK d9b54c46cc

Tree-SHA512: f279aeee1da57af5fdc4bd4f2000f1fea4180895f0e5b576545092a8318c756d36192f09a0cb0929cef74ed384c46777d5e6b6f92f4542b308e984e4abf473dc
2023-05-08 15:12:58 +01:00