Commit graph

422 commits

Author SHA1 Message Date
ivanlele
464433bd1b
Merge 81276540d3 into merged_master (Bitcoin PR bitcoin/bitcoin#30148) 2026-03-24 16:04:14 +00:00
ivanlele
d06014267a
Merge da083d4bbd into merged_master (Bitcoin PR bitcoin/bitcoin#29775) 2026-03-11 17:10:37 +00:00
ikripaka
006073614d
Merge 011a895a82 into merged_master (Bitcoin PR bitcoin/bitcoin#29015) 2026-02-27 22:51:31 +00:00
ivanlele
4aef8053f4
Merge 1bcc91a52c into merged_master (Bitcoin PR bitcoin/bitcoin#29521) 2026-02-26 12:00:08 +00:00
Tom Trevethan
9ab55b7c05 Merge a44b0f771f into merged_master (Bitcoin PR bitcoin/bitcoin#30238) 2026-02-26 01:08:00 +00:00
Tom Trevethan
b64d8b87c8 Merge 6300438a2e into merged_master (Bitcoin PR bitcoin/bitcoin#30115) 2026-02-23 23:41:30 +00:00
ivanlele
c3eebcf145
Merge 75118a608f into merged_master (Bitcoin PR bitcoin/bitcoin#27101) 2026-02-20 16:40:57 +00:00
ivanlele
f64242fec3
Merge 8efd03ad04 into merged_master (Bitcoin PR bitcoin/bitcoin#29494) 2026-02-19 16:14:46 +00:00
ivanlele
9bf3ef6967
Merge 16a6174613 into merged_master (Bitcoin PR bitcoin/bitcoin#29904) 2026-02-18 16:43:54 +00:00
ivanlele
1b13cad223
Merge dec74c035b into merged_master (Bitcoin PR bitcoin/bitcoin#29657) 2026-02-18 13:10:22 +00:00
ivanlele
8b9fcbd78b
Merge c407caa297 into merged_master (Bitcoin PR bitcoin/bitcoin#29687) 2026-02-17 13:25:22 +00:00
Byron Hambly
6a9d92b28b
Merge 4baa162dbb into merged_master (Bitcoin PR bitcoin/bitcoin#29212) 2025-11-18 10:16:07 +02:00
Byron Hambly
5db91236bd
Merge 063a8b8387 into merged_master (Bitcoin PR bitcoin/bitcoin#29058) 2025-11-18 08:50:19 +02:00
Byron Hambly
edc585d157 Merge 9564f98fee into merged_master (Bitcoin PR bitcoin/bitcoin#27636) 2025-06-25 11:40:46 +02:00
Byron Hambly
a40347d7f5 Merge e0a70c5b4f into merged_master (Bitcoin PR bitcoin/bitcoin#27605) 2025-06-20 09:50:22 +02:00
Byron Hambly
c5e6e709b8 Merge 104eed1166 into merged_master (Bitcoin PR bitcoin/bitcoin#27611) 2025-06-20 09:31:55 +02:00
Byron Hambly
cbd7b123d9 Merge fc06881f13 into merged_master (Bitcoin PR bitcoin/bitcoin#27491) 2025-06-19 16:08:36 +02:00
Byron Hambly
5ac82e15a9 Merge 669af32632 into merged_master (Bitcoin PR bitcoin/bitcoin#27419) 2025-05-09 11:47:45 +02:00
Byron Hambly
e04de3e652 Merge 3963067555 into merged_master (Bitcoin PR bitcoin/bitcoin#26642) 2025-04-11 22:28:06 +02:00
Byron Hambly
e24c402fac Merge b175bdb9b2 into merged_master (Bitcoin PR bitcoin/bitcoin#27238) 2025-04-10 08:26:17 +02:00
Byron Hambly
4d00218319 Merge 8303f11e10 into merged_master (Bitcoin PR bitcoin/bitcoin#27170) 2025-04-09 12:38:49 +02:00
Byron Hambly
57e13e480e Merge 68e484afbb into merged_master (Bitcoin PR bitcoin/bitcoin#26584) 2025-04-05 17:47:02 +02:00
Byron Hambly
e9d751c3ea Merge 329d7e379d into merged_master (Bitcoin PR bitcoin/bitcoin#26328) 2025-04-01 21:20:57 +02:00
Byron Hambly
feb8f8cf2b Merge 9887fc7898 into merged_master (Bitcoin PR bitcoin/bitcoin#26758) 2025-04-01 21:20:49 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
c66623d5d0
Merge 295f617988 into merged_master (Bitcoin PR bitcoin/bitcoin#26505) 2025-03-03 12:10:21 +02:00
Byron Hambly
b83abdf89a
Merge UP TO e42ba134f4 into merged_master (UP TO Bitcoin PR bitcoin/bitcoin#26448)
1667577042 2022-11-04T16:50:42+01:00 e42ba134f4 Bitcoin Merge bitcoin/bitcoin#26448: test: fix intermittent failure in p2p_sendtxrcncl.py
1667576919 2022-11-04T15:48:39+00:00 83cf055bef Bitcoin Merge bitcoin/bitcoin#26443: doc: mention BIP86 in doc/bips.md
1667478613 2022-11-03T13:30:13+01:00 28653a596a Bitcoin Merge bitcoin/bitcoin#26445: .python-version: bump patch version to 3.6.15
1667471345 2022-11-03T10:29:05+00:00 2a7c9984db Bitcoin Merge bitcoin/bitcoin#25248: refactor: Add LIFETIMEBOUND / -Wdangling-gsl to Assert()
1667397640 2022-11-02T15:00:40+01:00 5274f32437 Bitcoin Merge bitcoin/bitcoin#26417: test: fix intermittent failure in feature_index_prune.py
1667372848 2022-11-02T08:07:28+01:00 39f026b1ec Bitcoin Merge bitcoin/bitcoin#26396: net: Avoid SetTxRelay for feeler connections
1667316369 2022-11-01T16:26:09+01:00 bf0cb43990 Bitcoin Merge bitcoin/bitcoin#26437: test: remove unused `CHANGE_{XPRV,XPUB}` constants
1667300957 2022-11-01T11:09:17+00:00 5668ccec1d Bitcoin Merge bitcoin/bitcoin#25548: gui: Check for readlink buffer overflow and handle gracefully
1667297563 2022-11-01T10:12:43+00:00 c041d8f2c9 Bitcoin Merge bitcoin/bitcoin#26360: build: remove threadinterrupt from libbitcoinkernel
1667297149 2022-11-01T10:05:49+00:00 27e76afe24 Bitcoin Merge bitcoin/bitcoin#26294: build: move util/url to common/url
1667291397 2022-11-01T08:29:57+00:00 d08b63baa0 Bitcoin Merge bitcoin/bitcoin#26373: Update minisketch subtree to latest upstream
1667230521 2022-10-31T15:35:21+00:00 43e813cab2 Bitcoin Merge bitcoin/bitcoin#26387: p2p: TryLowWorkHeadersSync follow-ups
1667217075 2022-10-31T11:51:15+00:00 4766cd1981 Bitcoin Merge bitcoin/bitcoin#24051: Bugfix: configure: bitcoin-{cli,tx,util} don't need UPnP, NAT-PMP, or ZMQ
1667213203 2022-10-31T11:46:43+01:00 2856dee808 Bitcoin Merge bitcoin/bitcoin#26402: doc: Fix typos
1667202170 2022-10-31T08:42:50+01:00 c75c0d8e11 Bitcoin Merge bitcoin/bitcoin#26424: doc: correct deriveaddresses RPC name
1667034850 2022-10-29T11:14:10+02:00 4f270d2b63 Bitcoin Merge bitcoin/bitcoin#26404: test: fix intermittent failure in rpc_getblockfrompeer.py
1667030363 2022-10-29T09:59:23+02:00 984a01589b Bitcoin Merge bitcoin/bitcoin#26408: test: Remove spam from debug log
1666985837 2022-10-28T15:37:17-04:00 8b050762b1 Bitcoin Merge bitcoin/bitcoin#26409: refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts
1666949533 2022-10-28T11:32:13+02:00 1bad29fe02 Bitcoin Merge bitcoin/bitcoin#26377: test: Make `system_tests/run_command` test locale and platform agnostic
2025-02-27 13:40:17 +02:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
Byron Hambly
8499b13762
lint: fix lint issues 2024-12-03 14:02:33 +02:00
Byron Hambly
1006327a13 Merge 9eaef10801 into merged_master (Bitcoin PR bitcoin/bitcoin#25707) 2024-11-04 11:26:40 +02:00
Byron Hambly
a1f37eeae6 Merge e09ad284c7 into merged_master (Bitcoin PR bitcoin/bitcoin#24675) 2024-10-25 11:37:05 +02:00
Byron Hambly
068f46b4f5 Merge 5c82ca3365 into merged_master (Bitcoin PR bitcoin/bitcoin#25493) 2024-10-17 18:03:37 +02:00
James Dorfman
1e24510c7e Merge b91055ea55 into merged_master (Bitcoin PR bitcoin/bitcoin#25251) 2024-09-10 18:10:02 +00:00
James Dorfman
7ec702f8f0 Merge 44037a2912 into merged_master (Bitcoin PR bitcoin/bitcoin#25176) 2024-09-06 05:45:13 +00:00
Ava Chow
81276540d3
Merge bitcoin/bitcoin#30148: cli: restrict multiple exclusive argument usage in bitcoin-cli
c8e6771af0 test: restrict multiple CLI arguments (naiyoma)
8838c4f171 common/args.h: automate check for multiple cli commands (naiyoma)

Pull request description:

  This PR is a continuation of the validation suggested [here](https://github.com/bitcoin/bitcoin/pull/27815) to ensure that only one Request Handler can be specified at a time.

ACKs for top commit:
  stratospher:
    reACK c8e6771.
  achow101:
    ACK c8e6771af0
  tdb3:
    cr re ACK c8e6771af0

Tree-SHA512: f4fe036fee342a54f1a7ac702ac35c40bf3d420fde6ab16313a75327292d5ee5c8ece1be9f852a13fcf73da1148b143b37b4894e294052abdde6eefb2e8c6f3f
2024-09-04 14:47:38 -04:00
James Dorfman
e940df7e48 Merge 6407c0e8a3 into merged_master (Bitcoin PR bitcoin/bitcoin#25101) 2024-08-13 06:33:14 +00:00
James Dorfman
06a6044137 Merge 0de36941ec into merged_master (Bitcoin PR bitcoin/bitcoin#25153) 2024-08-13 06:00:38 +00:00
James Dorfman
31df518140 Merge 7b3343f300 into merged_master (Bitcoin PR bitcoin/bitcoin#25108) 2024-08-13 04:20:55 +00:00
James Dorfman
0027999db1 Merge 002411dc53 into merged_master (Bitcoin PR bitcoin/bitcoin#25157) 2024-08-13 04:12:31 +00:00
James Dorfman
cac4a07224 Merge dd9f61a184 into merged_master (Bitcoin PR bitcoin/bitcoin#25102) 2024-08-09 21:19:15 +00:00
naiyoma
8838c4f171 common/args.h: automate check for multiple cli commands
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2024-08-06 14:55:20 +03:00
Fabian Jahr
74a04f9e7a
testnet: Introduce Testnet4 2024-08-06 01:38:10 +02:00
James Dorfman
1fda45d8e8 Merge 3bbc46ddaf into merged_master (Bitcoin PR bitcoin/bitcoin#24632) 2024-07-30 05:26:33 +00:00
James Dorfman
5499524906 Merge d906329c28 into merged_master (Bitcoin PR bitcoin/bitcoin#24681) 2024-07-29 19:05:12 +00:00
Ava Chow
011a895a82
Merge bitcoin/bitcoin#29015: kernel: Streamline util library
c7376babd1 doc: Clarify distinction between util and common libraries in libraries.md (Ryan Ofsky)
4f74c59334 util: Move util/string.h functions to util namespace (Ryan Ofsky)
4d05d3f3b4 util: add TransactionError includes and namespace declarations (Ryan Ofsky)
680eafdc74 util: move fees.h and error.h to common/messages.h (Ryan Ofsky)
02e62c6c9a common: Add PSBTError enum (Ryan Ofsky)
0d44c44ae3 util: move error.h TransactionError enum to node/types.h (Ryan Ofsky)
9bcce2608d util: move spanparsing.h to script/parsing.h (Ryan Ofsky)
6dd2ad4792 util: move spanparsing.h Split functions to string.h (Ryan Ofsky)
23cc8ddff4 util: move HexStr and HexDigit from util to crypto (TheCharlatan)
6861f954f8 util: move util/message to common/signmessage (Ryan Ofsky)
cc5f29fbea build: move memory_cleanse from util to crypto (Ryan Ofsky)
5b9309420c build: move chainparamsbase from util to common (Ryan Ofsky)
ffa27af24d test: Add check-deps.sh script to check for unexpected library dependencies (Ryan Ofsky)

Pull request description:

  Remove `fees.h`, `errors.h`, and `spanparsing.h` from the util library. Specifically:

  - Move `Split` functions from `util/spanparsing.h` to `util/string.h`, using `util` namespace for clarity.
  - Move remaining spanparsing functions to `script/parsing.h` since they are used for descriptor and miniscript parsing.
  - Combine `util/fees.h` and `util/errors.h` into `common/messages.h` so there is a place for simple functions that generate user messages to live, and these functions are not part of the util library.

  Motivation for this change is that the util library is a dependency of the kernel, and we should remove functionality from util that shouldn't be called by kernel code or kernel applications. These changes should also improve code organization and make functions easier to discover. Some of these same moves are (or were) part of #28690, but did not help with code organization, or made it worse, so it is better to move them and clean them up in the same PR so code only has to change one time.

ACKs for top commit:
  achow101:
    ACK c7376babd1
  TheCharlatan:
    Re-ACK c7376babd1
  hebasto:
    re-ACK c7376babd1.

Tree-SHA512: 5bcef16c1255463b1b69270548711e7ff78ca0dd34e300b95e3ca1ce52ceb34f83d9ddb2839e83800ba36b200de30396e504bbb04fa02c6d0c24a16d06ae523d
2024-06-12 17:12:54 -04:00
Ava Chow
1bcc91a52c
Merge bitcoin/bitcoin#29521: cli: Detect port errors in rpcconnect and rpcport
24bc46c83b cli: Add warning for duplicate port definition (tdb3)
e208fb5d3b cli: Sanitize ports in rpcconnect and rpcport (tdb3)

Pull request description:

  Adds invalid port detection to bitcoin-cli for -rpcconnect and -rpcport.

  In addition to detecting malformed/invalid ports (e.g. those outside of the 16-bit port range, not numbers, etc.), bitcoin-cli also now considers usage of port 0 to be invalid.  bitcoin-cli previously considered port 0 to be valid and attempted to use it to reach bitcoind.

  Functional tests were added for invalid port detection as well as port prioritization.
  Additionally, a warning is provided when a port is specified in both -rpcconnect and -rpcport.

  This PR is an alternate approach to PR #27820 (e.g. SplitHostPort is unmodified).

  Considered an alternative to 127.0.0.1 being specified in functional tests, but at first glance, this might need an update to test_framework/util.py (e.g.  rpc_url), which might be left to a future PR.

ACKs for top commit:
  S3RK:
    light code review ACK 24bc46c83b
  achow101:
    ACK 24bc46c83b
  cbergqvist:
    re ACK 24bc46c83b

Tree-SHA512: c83ab6a30a08dd1ac8b368a7dcc2b4f23170f0b61dd67ffcad7bcda05096d333bcb9821fba11018151f55b2929c0a333bfec15b8bb863d83f41fc1974c6efca5
2024-06-11 15:55:18 -04:00
Matthew Zipkin
391843b029
bitcoin-cli: use json-rpc 2.0 2024-06-07 09:26:55 -04:00
Cory Fields
d7707d9843 rpc: avoid copying into UniValue
These are simple (and hopefully obviously correct) copies that can be moves
instead.
2024-05-20 16:48:19 +00:00
Ryan Ofsky
4f74c59334 util: Move util/string.h functions to util namespace
There are no changes to behavior. Changes in this commit are all additions, and
are easiest to review using "git diff -U0 --word-diff-regex=." options.

Motivation for this change is to keep util functions with really generic names
like "Split" and "Join" out of the global namespace so it is easier to see
where these functions are defined, and so they don't interfere with function
overloading, especially since the util library is a dependency of the kernel
library and intended to be used with external code.
2024-05-16 10:16:08 -05:00
Ryan Ofsky
75118a608f
Merge bitcoin/bitcoin#27101: Support JSON-RPC 2.0 when requested by client
cbc6c440e3 doc: add comments and release-notes for JSON-RPC 2.0 (Matthew Zipkin)
e7ee80dcf2 rpc: JSON-RPC 2.0 should not respond to "notifications" (Matthew Zipkin)
bf1a1f1662 rpc: Avoid returning HTTP errors for JSON-RPC 2.0 requests (Matthew Zipkin)
466b90562f rpc: Add "jsonrpc" field and drop null "result"/"error" fields (Matthew Zipkin)
2ca1460ae3 rpc: identify JSON-RPC 2.0 requests (Matthew Zipkin)
a64a2b77e0 rpc: refactor single/batch requests (Matthew Zipkin)
df6e3756d6 rpc: Avoid copies in JSONRPCReplyObj() (Matthew Zipkin)
09416f9ec4 test: cover JSONRPC 2.0 requests, batches, and notifications (Matthew Zipkin)
4202c170da test: refactor interface_rpc.py (Matthew Zipkin)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/2960

  Bitcoin Core's JSONRPC server behaves with a special blend of 1.0, 1.1 and 2.0 behaviors. This introduces compliance issues with more strict clients. There are the major misbehaviors that I found:
  - returning non-200 HTTP codes for RPC errors like "Method not found" (this is not a server error or an HTTP error)
  - returning both `"error"` and `"result"` fields together in a response object.
  - different error-handling behavior for single and batched RPC requests (batches contain errors in the response but single requests will actually throw HTTP errors)

  https://github.com/bitcoin/bitcoin/pull/15495 added regression tests after a discussion in https://github.com/bitcoin/bitcoin/pull/15381 to kinda lock in our RPC behavior to preserve backwards compatibility.

  https://github.com/bitcoin/bitcoin/pull/12435 was an attempt to allow strict 2.0 compliance behind a flag, but was abandoned.

  The approach in this PR is not strict and preserves backwards compatibility in a familiar bitcoin-y way: all old behavior is preserved, but new rules are applied to clients that opt in. One of the rules in the [JSON RPC 2.0 spec](https://www.jsonrpc.org/specification#request_object) is that the kv pair `"jsonrpc": "2.0"` must be present in the request. Well, let's just use that to trigger strict 2.0 behavior! When that kv pair is included in a request object, the [response will adhere to strict JSON-RPC 2.0 rules](https://www.jsonrpc.org/specification#response_object), essentially:

  - always return HTTP 200 "OK" unless there really is a server error or malformed request
  - either return `"error"` OR `"result"` but never both
  - same behavior for single and batch requests

  If this is merged next steps can be:

  - Refactor bitcoin-cli to always use strict 2.0
  - Refactor the python test framework to always use strict 2.0 for everything
  - Begin deprecation process for 1.0/1.1 behavior (?)

  If we can one day remove the old 1.0/1.1 behavior we can clean up the rpc code quite a bit.

ACKs for top commit:
  cbergqvist:
    re ACK cbc6c440e3
  ryanofsky:
    Code review ACK cbc6c440e3. Just suggested changes since the last review: changing uncaught exception error code from PARSE_ERROR to MISC_ERROR, renaming a few things, and adding comments.
  tdb3:
    re ACK for cbc6c440e3

Tree-SHA512: 0b702ed32368b34b29ad570d090951a7aeb56e3b0f2baf745bd32fdc58ef68fee6b0b8fad901f1ca42573ed714b150303829cddad4a34ca7ad847350feeedb36
2024-05-16 10:18:04 -04:00