Commit Graph

22789 Commits

Author SHA1 Message Date
Odysseas Gabrielides
ce51386f9f
fix: added missing specific_legacy_bls_scheme (#5184)
<!--
*** Please remove the following help text before submitting: ***

Provide a general summary of your changes in the Title above

Pull requests without a rationale and clear improvement may be closed
immediately.

Please provide clear motivation for your patch and explain how it
improves
Dash Core user experience or Dash Core developer experience
significantly:

* Any test improvements or new tests that improve coverage are always
welcome.
* All other changes should have accompanying unit tests (see
`src/test/`) or
functional tests (see `test/`). Contributors should note which tests
cover
modified code. If no tests exist for a region of modified code, new
tests
  should accompany the change.
* Bug fixes are most welcome when they come with steps to reproduce or
an
explanation of the potential issue as well as reasoning for the way the
bug
  was fixed.
* Features are welcome, but might be rejected due to design or scope
issues.
If a feature is based on a lot of dependencies, contributors should
first
  consider building the system outside of Dash Core, if possible.
-->
Passing the `specific_legacy_bls_scheme` flag when parsing BLS public
key was missing.
(Affected RPC was: `protx update_registrar_legacy`)

## Issue being fixed or feature implemented
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->


## What was done?
<!--- Describe your changes in detail -->


## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->


## Breaking Changes
<!--- Please describe any breaking changes your code introduces -->


## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-07 19:33:13 +02:00
PastaPastaPasta
3f802035fd
Merge pull request #5072 from kittywhiskers/sqlite
backport: merge bitcoin#20130, #19077, #20156, #20216, #20308, #20324, #20202, #20275, #21634, #21540, #21962, #25378, #23112 (sqlite)
2023-02-07 10:54:05 -06:00
Kittywhiskers Van Gogh
ca962a6e42 merge bitcoin#23112: enable SQLite extended result codes 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
dc7ad45131 merge bitcoin#25378: sqlite 3380500 in depends 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
f3407ce3f3 merge bitcoin#21962: dedup sqlite PRAGMA access 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
b2d22d9b3f merge bitcoin#21540: refactor: dedup sqlite statement preparations/deletions 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
9795605d3b merge bitcoin#21634: Skip SQLite fsyncs while testing 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
6900545ca8 merge bitcoin#20275: List all wallets in non-SQLite and non-BDB builds 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
9c4f84efc5 merge bitcoin#20324: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
7758b424f2 merge bitcoin#20308: Set bilingual error completely 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
1bec382e0b merge bitcoin#20216: fix buffer over-read in SQLite file magic check 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
a55cb7a635 merge bitcoin#20202: Make BDB support optional 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
4c7112b106 merge bitcoin#20156: Make sqlite support optional (compile-time) 2023-02-07 10:53:33 -06:00
UdjinM6
90c7f16596 build: Avoid fcntl64@GLIBC_2.28 in libsqlite3.a 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
f42288c984 partial bitcoin#19077: Add sqlite as an alternative wallet database and use it for new descriptor wallets 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
0fa0991e6e merge bitcoin#20130: remove db mode string 2023-02-07 10:53:33 -06:00
Konstantin Akimov
e2224cbf8a
build: remove cmake from list of packages (#5179)
## Issue being fixed or feature implemented
Seems as `cmake` package is not needed anymore so far as `immer` moved
inside src/ directory.
`immer` is integrated to our Makefile.am and do not requires extra call
of cmake as it used to be.

## What was done?
Removed cmake from list of packages and removed package `cmake.mk`


## How Has This Been Tested?
Tested build with HEAD - succeed.
After that reverted to the old revision that have `immer` package
(85d6cadbfa).
Failed as expected:
```
make: *** No rule to make target 'cmake', needed by '/home/knst/projects/dash/depends/built/x86_64-pc-linux-gnu/bls-dash/bls-dash-1.2.0-6213882c069.tar.gz'.  Stop.
```


## Breaking Changes
No breaking changes


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-02-07 09:31:20 -06:00
Konstantin Akimov
197aa65f73
refactor: remove dependency of dummyWallet in RecoverDatabaseFile on NodeContext (#5178)
## Issue being fixed or feature implemented
Bitcoin#15639 removes libbitcoin-server library from list of wallet
linkage list.
It is not possible to remove this dependency in dash now because
coinjoin hardly used libbitcoin-server in client side.
Despite that, this dependency can be removed.

## What was done?
Removed NodeContext from dummyWallet by providing nullptr as a chain
pointer.


## How Has This Been Tested?
Validated, that linkage error "NodeContext is unknown symbol"
disappeared in case if remove libbitcoin-server dependency.

## Breaking Changes
No breaking changes

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone
2023-02-06 13:57:24 -06:00
Odysseas Gabrielides
c6bc33738b
docs: Release notes for BLS upgrade (#5137)
## Issue being fixed or feature implemented

## What was done?

## How Has This Been Tested?

## Breaking Changes

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone

---------

Co-authored-by: thephez <thephez@users.noreply.github.com>
2023-02-06 09:02:53 -06:00
PastaPastaPasta
8362f9d639
Merge pull request #5170 from knst/bc-bp-psbt-1.9
backport:  bitcoin#17156, #17524, #16944, #16326, #14055, #13712 (psbt's related)
2023-02-04 10:03:04 -06:00
fanquake
63ed912c73 Merge #17156: psbt: check that various indexes and amounts are within bounds
deaa6dd144f5650b385658a0c4f9a014aff8dde2 psbt: check output index is within bounds before accessing (Andrew Chow)
f1ef7f0aa46338f4cd8de79696027a1bf868f359 Don't calculate tx fees for PSBTs with invalid money values (Andrew Chow)

Pull request description:

  Fixes #17149

  Two classes of issues were found by the psbt fuzzer: values out of range and causing overflows, and prevout indexes being out of range. This PR fixes both.

  When accessing a specific output using the index given in the tx, check that it is actually a possible output before trying to access the output.

  When summing and checking amounts for `decodepsbt` and `analyzepsbt`, make sure that the values are actually valid money values.. Otherwise, stop summing and don't show the fee. For `analyzepsbt`, return that the next role is the Creator since the Creator needs to remake the transaction to be valid.

ACKs for top commit:
  practicalswift:
    ACK deaa6dd144f5650b385658a0c4f9a014aff8dde2 -- only change since last ACK was the addition of tests
  gwillen:
    tested ACK deaa6dd, would also like to see this merged!

Tree-SHA512: 06c36720bbb5a7ab1c29f7d15878bf9f0d3e5760c06bff479d412e1bf07bb3e0e9ab6cca820a4bfedaab71bfd7af813807e87cbcdf0af25cc3f66a53a06dbcfd
2023-02-04 10:02:37 -06:00
MarcoFalke
bd0f27310f Merge #17524: psbt: handle unspendable psbts
773d4572a4864ab7b6380858d07d9579ff6dd9a2 Mark PSBTs spending unspendable outputs as invalid in analysis (Andrew Chow)
638e40cb6080800c7b0a7f4028f63326acbe4700 Have a PSBTAnalysis state that indicates invalid PSBT (Andrew Chow)

Pull request description:

  When analyzing an unspendable PSBT, report that it is unspendable and exit analysis early.

ACKs for top commit:
  Sjors:
    ACK 773d457
  instagibbs:
    After some thought ACK 773d4572a4

Tree-SHA512: 99b0cb2fa1ea37593fc65a20effe881639d69ddeeecf5197bc87bc7f2220cbeb40f1d429d517e4d27f2e9fb563a00cd845d2b4b1ce05246a75a6cb56fb9b0ba5
2023-02-04 10:02:37 -06:00
Samuel Dobson
a5d1e8d831 Merge #16944: gui: create PSBT with watch-only wallet
c6dd565c8820aa8a98b190621e10c6e2821a9ecc [gui] watch-only wallet: copy PSBT to clipboard (Sjors Provoost)
39465d545d521e66bb3accfa788aa94bffaf47eb [wallet] add fillPSBT to interface (Sjors Provoost)
848f88920853724511387ca0b7ef652fa14ced71 [gui] send: include watch-only (Sjors Provoost)
40537f090907f81ba885edb7dff1558382976912 [wallet] ListCoins: include watch-only for wallets without private keys (Sjors Provoost)

Pull request description:

  For wallets with `WALLET_FLAG_DISABLE_PRIVATE_KEYS` this makes the watch-only balance available on the send screen (including coin selection). Instead of sending a transaction it generates a PSBT.

  The user can take this PSBT and process it with [HWI](https://github.com/bitcoin-core/HWI) or put it an SD card for hardware wallets that support that.

  The PSBT is copied to the clipboard. This was the easiest approach; we can add a dialog later to display it, as well as an option to save to disk.

ACKs for top commit:
  instagibbs:
    test and code review ACK c6dd565c88
  meshcollider:
    re-ACK c6dd565c8820aa8a98b190621e10c6e2821a9ecc

Tree-SHA512: ebc3da0737e33b255ed926191b84569aedb6097d14868662bd5dce726ce3048e86e9a31eba987b10dffe1482b35c21ae1cd595c2caa4634bc4cf78a826a83852
2023-02-04 10:02:37 -06:00
fanquake
940348388f Merge #16326: [RPC] add new utxoupdatepsbt arguments to the CRPCCommand and CPRCCvertParam tables
91cc18f602fe2ff7fe47335a8e1e7734895a19d9 [docs] Add release notes for PR 15427 (John Newbery)
3b11420b3c91f731b03805a39e48ee32e54484a2 [RPC] add new utxoupdatepsbt arguments to the CRPCCommand and CPRCConvertParam tables (John Newbery)

Pull request description:

  The new `descriptors` argument was not added to the CRPCCommand and CPRCCvertParam tables, meaning that it couldn't be used with bitcoin-cli or named arguments.

  Before this PR:

  ```
  > bitcoin-cli utxoupdatepsbt 'cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' "[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]"
  error code: -3
  error message:
  Expected type array, got string
  > bitcoin-cli --named utxoupdatepsbt psbt='cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' descriptors="[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]"
  error code: -8
  error message:
  Unknown named parameter descriptors
  ```

  After this PR:

  ```
  bitcoin-cli utxoupdatepsbt 'cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' "[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]"
  cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==
  bitcoin-cli --named utxoupdatepsbt psbt='cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' descriptors="[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]"
  cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==
  ```

ACKs for top commit:
  promag:
    ACK 91cc18f.
  fanquake:
    re-ACK 91cc18f602fe2ff7fe47335a8e1e7734895a19d9

Tree-SHA512: 279b2339a5cac17e363002e4ab743e251d6757c904c89f1970575bdce18d4f63d5e13507e171bf2bdc1bf6dd457db345a4b11b15d4ff71b96c2fedc4ffe52b23
2023-02-04 10:02:37 -06:00
Konstantin Akimov
cd6de8000f Merge #14055: fix walletcreatefundedpsbt deriv paths, add test
61fe653 fix walletcreatefundedpsbt deriv paths, add test (Gregory Sanders)

Pull request description:

  Added the regression in #13968

Tree-SHA512: a31290b57ed80a8486925e562ca5412500d4215a238de7e448f48edfa671c87aebd79ee179a8340b289d9811ae6fa30ef75eefd5f5890fb6285174c5db72ff65
2023-02-04 10:02:37 -06:00
MarcoFalke
fa52d3bc12 Merge #13712: wallet: Fix non-determinism in ParseHDKeypath(...). Avoid using an uninitialized variable in path calculation.
27ee53c1ae wallet: Add error handling. Check return value of ParseUInt32(...) in ParseHDKeypath(...). (practicalswift)
7223263899 wallet: Add tests for ParseHDKeypath(...) (practicalswift)

Pull request description:

  Add error handling. Check return value of `ParseUInt32(...)` in `ParseHDKeypath(...)`.

  `ParseUInt32(...)` returns `false` if the entire string could not be parsed or when an overflow or underflow occurred. In such case the uninitialized variable `number` would be used in the calculation of `path` (prior to this commit).

  An example key path triggering this is `m/0/4294967296`:

  ```
    ParseHDKeypath("m/0/4294967296", keypath);
  ```

  `4294967296` is `1` + `0xFFFFFFFF` (`uint32_t` max: `4294967295`).

  Introduced in a4b06fb42eb0ad94e562ca839391b57e69285136 which was merged into `master` 14 hours ago as part of #13557 ("BIP 174 PSBT Serializations and RPCs").

Tree-SHA512: e5ff423f67c18d82c1231bde6343587a453e793c32004d93dc9b61be6d9372b57a6b2c9978d9eb1000d6cc82fd180f2486013f928dca737fb92daad22c16e467
2023-02-04 10:02:37 -06:00
PastaPastaPasta
6757616559
Merge pull request #5168 from kittywhiskers/p2pbp
backport: merge bitcoin#19053, #19174, #19293, #19704, #19472, #19583 (net_processing.{cpp|h} refactoring)
2023-02-03 16:24:40 -06:00
Kittywhiskers Van Gogh
383f902abf merge bitcoin#19583: clean up Misbehaving() 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
24546f93e5 merge bitcoin#19472: Reduce cs_main scope in MaybeDiscourageAndDisconnect() 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
4dd3ec2cb9 refactor: pass CNode reference as const when possible 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
99f6c314c0 refactor: rearrange argument order to be more consistent 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
a4e0327c29 refactor: pass CNode by reference for ProcessMessage functions 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
97d485159b refactor: rename ProcessSporkMessages to match other functions 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
260ef0a811 merge bitcoin#19704: move ProcessMessage() to PeerLogicValidation 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
af0dd17ca6 merge bitcoin#19293: Avoid redundant and confusing FAILED log 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
0b1a30afc1 merge bitcoin#19174: replace CConnman pointers by references in net_processing.cpp 2023-02-03 15:25:38 -06:00
Kittywhiskers Van Gogh
0385df1bc7 merge bitcoin#19053: replace CNode pointers by references within net_processing.{h,cpp} 2023-02-03 15:25:38 -06:00
Konstantin Akimov
90d888dc31
refactor: tidy up implementation of special tx manager (#5172)
## Issue being fixed or feature implemented
It is preparation work for #5026 (moved out a refactoring as a new pull
request)

## What was done?
 - tidy up header dependencies
 - move general code to proper headers


## How Has This Been Tested?
Run unit/functional tests

## Breaking Changes
No breaking changes

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-02 23:22:51 -06:00
Konstantin Akimov
9a03334893
fix: keeping reference to local variable in Coin Join unit tests (#5174)
It become a visible UB (crash) after backport bitcoin#19848

## What was done?
Increased life-term for object under reference

## How Has This Been Tested?
Run unit/functional tests with and without bitcoin#19848

## Breaking Changes
No breaking changes

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone
2023-01-31 11:27:01 -06:00
Konstantin Akimov
967d413db3
fix: governance should not lock mempool mutex even call GetTransaction (#5175)
## Issue being fixed or feature implemented
Previously noticed, that GetTransaction is called deep inside governance
objects and it is true indeed.
But so far it is used `nullptr` as a mempol object instead any real
mempool in GetTransaction and no usage of a global mempool or any other
mempool, this locks are useless.

This changes are important for mempool globalization.

## What was done?
Removed LOCK for ::mempool.cs in governance's code

## How Has This Been Tested?
Run unit/functional tests. Also done deglobalization of mempool to
validate that governance indeed doesn't use global mempool implicit in
#5169

## Breaking Changes
No breaking changes

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone
2023-01-31 11:08:25 -06:00
PastaPastaPasta
aa3ecbf6af
Merge pull request #5171 from PastaPastaPasta/develop-trivial-2023-01-23
backport: trivial backports 2023 01 23
2023-01-31 11:07:55 -06:00
MarcoFalke
046eb910a1
Merge #20759: doc: [test] Remove outdated comment in fuzz runner
fa511042b0bbec02016761bcd0d30f57e0386550 doc: [test] Remove outdated comment in fuzz runner (MarcoFalke)

Pull request description:

  All folders are soft-created with `os.makedirs`

ACKs for top commit:
  RiccardoMasutti:
    ACK fa51104

Tree-SHA512: 4051688946a205a981bbb005300fe3263495ead26591042b38ae44f4297c7689a613b560052fb5405a62054734d2599cfb0554a37c7b7369fb3a3636743d04a8
2023-01-23 12:22:32 -06:00
MarcoFalke
83a47b79ff
Merge #20748: test: Add race:SendZmqMessage tsan suppression
fa957f8dc9990e4479e4d2af46a63ceae89cd39b test: Add race:SendZmqMessage tsan suppression (MarcoFalke)

Pull request description:

  Add suppression for `race:SendZmqMessage`, which isn't covered by the existing `zmq::*` suppression

  Fixes #20618

ACKs for top commit:
  hebasto:
    re-ACK fa957f8dc9990e4479e4d2af46a63ceae89cd39b, as my previous comment is not directly related to this pull changes.

Tree-SHA512: 8642a8b79bbfa4bee89042b66e528f27fd78c5e84a33023df440662e9114e31445fd7b04940f44b11fa4ab7438d346385a21816289c818cce9958a9b16730452
2023-01-23 12:22:32 -06:00
MarcoFalke
c6826bd02e
Merge #20199: wallet: ignore (but warn) on duplicate -wallet parameters
58cfbc38e040925b51cb8d35d23b50e9cf06fb2a Ignoring (but warn) on duplicate -wallet parameters (Jonas Schnelli)

Pull request description:

  I expect that there are many users with load on startup wallet definitions in `bitcoin.conf` or via startup CLI argument.
  With the new `settings.json` r/w configuration file, users unloading and loading a wallet through the GUI or via the RPC calls might end up with a duplicate `-wallet` entry (one that still remains in bitcoin.conf or CLI) plus the new duplication in `settings.json` due to the unload/load.

  Steps to reproduce
  * create wallet (if via RPC set `load_on_startup` or unloadwallet/loadwallet then set `load_on_startup`).
  * stop bitcoin
  * start bitcoind again with same `--wallet=mywallet`

  I guess it is acceptable to skip duplicates.

ACKs for top commit:
  achow101:
    Tested ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a
  meshcollider:
    Code review ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a
  ryanofsky:
    Code review ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a. Changes since previous review: rebased, tweaked warning message, squashed/fixed test

Tree-SHA512: f94e5a999bdd7dc291f0bc142911b0a8033929350d6f6a35b58c4a06a3c8f83147be0f0c402d4e946dedbbcc85b7e023b672c731b6d7a8984d4780017c961cfb
2023-01-23 12:22:32 -06:00
fanquake
8c5fc766e3
Merge #20214: test: Fix rpc_net intermittent issue
fa5f46600fb98f1b35346bedc1a66c9019d01114 test: Fix rpc_net intermittent issue (MarcoFalke)

Pull request description:

  Without the sync, the nodes might generate blocks at the same height and thus never be able to sync

ACKs for top commit:
  practicalswift:
    ACK fa5f46600fb98f1b35346bedc1a66c9019d01114: patch looks correct

Tree-SHA512: 21255795c2121c71fc620beb766855e57c7af94a668331d1b625665e22eb4b485a2b5c3ad2bb9a7042744f3c3e49c71251bcec41ba25bca03fd54aae32968a3a
2023-01-23 12:22:32 -06:00
fanquake
2434142e15
Merge #20055: rpc: Set HTTP Content-Type in bitcoin-cli
7eab781a145a35d0373c4ab4d237a82b4919e88d rpc: Set HTTP Content-Type in bitcoin-cli (Wladimir J. van der Laan)

Pull request description:

  We don't set any `Content-Type` in the client. It is more consistent with our other JSON-RPC use to set it to `application/json`.

  Note that our server doesn't enforce content types, so it doesn't make a difference in practice. But it is fairly strange HTTP behavior to not set it at all for a POST request.

  This came up in #18950.

ACKs for top commit:
  promag:
    ACK 7eab781a145a35d0373c4ab4d237a82b4919e88d.
  jonatack:
    Tested ACK 7eab781a145a35d0373c4ab4d237a82b4919e88d
  practicalswift:
    ACK 7eab781a145a35d0373c4ab4d237a82b4919e88d: patch looks correct
  fanquake:
    ACK 7eab781a145a35d0373c4ab4d237a82b4919e88d - Looks fine to me.

Tree-SHA512: a9fa155324d0f7bff955585a336ead6bb60b721039f424521a435e4bb0fad3f4532e5cc7b7a9acc4e93585e8d3db3082c010138810f22c0e92b8f749b86ef653
2023-01-23 12:22:31 -06:00
Samuel Dobson
d90567b719
Merge #19919: bugfix: make LoadWallet assigns status always
8b39a875581bed1c2f40a7d9616bdb7cc642bf59 bugfix: make LoadWallet assigns status always (Akio Nakamura)

Pull request description:

  In my enviroment, ```test/functional/wallet_multiwallet.py``` failed in line 237 for master( 147d50d63 ).
  It got an expected rpc-error-message, but error code was not (-4) but (-18).

  This is because that although loadwallet() in rpcwallet.cpp assumes LoadWallet() always assign some value to the 'status', but LoadWallet() does not do so in some situation.

  This PR intends to fix above and prevends loadwallet() returns ambiguous error code.

ACKs for top commit:
  hebasto:
    re-ACK 8b39a875581bed1c2f40a7d9616bdb7cc642bf59, that is the same as 1728059730abef04f3fa84de0b6e20044be7a9d6.
  ryanofsky:
    Code review ACK 8b39a875581bed1c2f40a7d9616bdb7cc642bf59 (same as previous)
  meshcollider:
    utACK 8b39a875581bed1c2f40a7d9616bdb7cc642bf59

Tree-SHA512: a75d8240f60325bfdb69a07d392269fec97de743f38fe108371eb63a0aba5d8ce3cc484ecc69e81febf8040f5ab64f3a9450b98f8e07a0c17803784bb6f342bf
2023-01-23 12:22:31 -06:00
MarcoFalke
9ada13f974
Merge #19508: Work around memory-aliasing in descriptor ParsePubkey
fa2ae0ac8d43086430a29c73940ad6b1cd129e96 span: Add Span::empty() and use it in script/descriptor (MarcoFalke)
fa8a99258947a9ee3749fa472180542920cd471c Work around memory-aliasing in descriptor ParsePubkey (MarcoFalke)

Pull request description:

  While this is not undefined behaviour, the memory aliasing trick is confusing when reading the code. Having `a.size()==0` and then access `a[0]` works in this particular case, but should probably be avoided to harden the code for the future.

ACKs for top commit:
  theStack:
    re-ACK fa2ae0ac8d
  elichai:
    ACK fa2ae0ac8d43086430a29c73940ad6b1cd129e96
  jonatack:
    ACK fa2ae0ac8d43086430a29c73940ad6b1cd129e96

Tree-SHA512: 0ec7b09eef45504973a195923cdf1aa8522117c8e2f69b453e5ce9aa8a7e327c71138518022c32d05133dc99cb861101ed0f60fa891814ee3e9dab3a6fa61a84
2023-01-23 12:22:31 -06:00
fanquake
931e2ad0cd
Merge #19555: rpc: deduplicate WriteHDKeypath() used in decodepsbt
55057ffc51697daafac1224664d5e3258ae0b116 rpc: deduplicate WriteHDKeypath() used in decodepsbt (Sebastian Falbesoner)

Pull request description:

  The functionality is already provided in the BIP32 utility library `util/bip32.h` with the exact same name and function signature.

ACKs for top commit:
  achow101:
    ACK 55057ffc51697daafac1224664d5e3258ae0b116
  instagibbs:
    utACK 55057ffc51
  jonatack:
    ACK 55057ffc51697daafac1224664d5e3258ae0b116

Tree-SHA512: 074c1a71ffb32908926bf07f0c5428a46309f6e0d21e7c20b1008197c820b97776a441736d0b6fd8ab0c0852522a0b5a5ddb26a1e4a1100ca02aabc65a07a018
2023-01-23 12:22:31 -06:00
Wladimir J. van der Laan
ae38bd6a52
Merge #19023: test: Fix intermittent ETIMEDOUT on FreeBSD
fab908f18a080912a0e833f12cccc27f27662e3b test: Fix intermittent ETIMEDOUT on FreeBSD (MarcoFalke)

Pull request description:

  Example backtrace: https://cirrus-ci.com/task/5307019047469056?command=functional_test#L1059

ACKs for top commit:
  laanwj:
    ACK fab908f18a080912a0e833f12cccc27f27662e3b

Tree-SHA512: 06e383e9993e083d6da4c546dde8811ace02559ddbb1c24e307938307763b3abe630699054e7067cf4aea993c82865e259b77b4bee518666a03d26e0f81c0656
2023-01-23 12:22:30 -06:00