Matthew Zipkin
1911db8c6d
string: add LineReader
...
This is a helper struct to parse HTTP messages from data in buffers
from sockets. HTTP messages begin with headers which are
CRLF-terminated lines (\n or \r\n) followed by an arbitrary amount of
body data. Whitespace is trimmed from the field lines but not the body.
https://httpwg.org/specs/rfc9110.html#rfc.section.5
2026-01-22 12:10:33 -05:00
Matthew Zipkin
ee62405cce
time: implement and test RFC1123 timestamp string
...
HTTP 1.1 responses require a timestamp header with a format
specified (currently) by:
https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.7
This specific format is defined in RFC1123:
https://www.rfc-editor.org/rfc/rfc1123#page-55
The libevent implementation can be referenced in evutil_time.c
evutil_date_rfc1123()
2026-01-22 11:33:23 -05:00
Matthew Zipkin
eea38787b9
string: add AsciiCaseInsensitive{KeyEqual, Hash} for unordered map
...
https://httpwg.org/specs/rfc9110.html#rfc.section.5.1
Field names in HTTP headers are case-insensitive. These
structs will be used in the headers map to search by key.
In libevent field names are also converted to lowercase for comparison:
evhttp_find_header()
evutil_ascii_strcasecmp()
EVUTIL_TOLOWER_()
2026-01-22 11:32:27 -05:00
Matthew Zipkin
b6f0593f43
doc: add release note about testmempoolaccept debug-message
2024-12-10 11:00:43 -05:00
Matthew Zipkin
f9cac63523
test: cover testmempoolaccept debug-message in RBF test
2024-12-10 11:00:25 -05:00
Matthew Zipkin
f9650e18ea
rbf: remove unecessary newline at end of error string
2024-12-04 14:37:48 -05:00
Matthew Zipkin
221c789e91
rpc: include verbose reject-details field in testmempoolaccept response
2024-12-04 14:37:37 -05:00
Matthew Zipkin
1f6ab1215b
minor: remove unnecessary semicolons from RPC content type examples
2024-06-07 10:47:24 -04:00
Matthew Zipkin
b225295298
test: use json-rpc 2.0 in all functional tests by default
2024-06-07 09:26:55 -04:00
Matthew Zipkin
391843b029
bitcoin-cli: use json-rpc 2.0
2024-06-07 09:26:55 -04:00
Matthew Zipkin
d39bdf3397
test: remove unused variable in interface_rpc.py
2024-06-07 09:26:55 -04:00
Matthew Zipkin
0ead71df8c
doc: update and link for JSON-RPC 2.0
2024-06-07 09:26:50 -04:00
Matthew Zipkin
cbc6c440e3
doc: add comments and release-notes for JSON-RPC 2.0
2024-05-14 11:28:48 -04:00
Matthew Zipkin
e7ee80dcf2
rpc: JSON-RPC 2.0 should not respond to "notifications"
...
For JSON-RPC 2.0 requests we need to distinguish between
a missing "id" field and "id":null. This is accomplished
by making the JSONRPCRequest id property a
std::optional<UniValue> with a default value of
UniValue::VNULL.
A side-effect of this change for non-2.0 requests is that request which do not
specify an "id" field will no longer return "id": null in the response.
2024-05-14 11:28:43 -04:00
Matthew Zipkin
bf1a1f1662
rpc: Avoid returning HTTP errors for JSON-RPC 2.0 requests
...
Avoid returning HTTP status errors for non-batch JSON-RPC 2.0 requests if the
RPC method failed but the HTTP request was otherwise valid. Batch requests
already did not return HTTP errors previously.
2024-05-14 11:15:54 -04:00
Matthew Zipkin
466b90562f
rpc: Add "jsonrpc" field and drop null "result"/"error" fields
...
Only for JSON-RPC 2.0 requests.
2024-05-14 10:39:43 -04:00
Matthew Zipkin
2ca1460ae3
rpc: identify JSON-RPC 2.0 requests
2024-05-14 10:32:43 -04:00
Matthew Zipkin
fd6a7d3a13
test: use sleepy wait-for-log in reindex readonly
...
Also rename the busy wait-for-log method to prevent recurrence
2024-04-30 14:14:50 -04:00
Matthew Zipkin
84900ac34f
doc: add release-notes-27064.md
2024-04-30 11:03:46 -04:00
Matthew Zipkin
855dd8d592
system: use %LOCALAPPDATA% as default datadir on windows
2024-04-30 11:03:04 -04:00
Matthew Zipkin
21d0e6c7b7
doc: release notes for PR 27679
2024-04-16 14:14:42 -04:00
Matthew Zipkin
791dea204e
test: cover unix sockets in zmq interface
2024-04-16 14:14:42 -04:00
Matthew Zipkin
c87b0a0ff4
zmq: accept unix domain socket address for notifier
2024-04-16 14:14:37 -04:00
Matthew Zipkin
fb4cc5f423
netbase: clean up Proxy logging
2024-04-16 10:24:02 -04:00
Matthew Zipkin
c70e4fc9a3
netbase: remove unnecessary log message
...
see https://github.com/bitcoin/bitcoin/pull/27375#issuecomment-1994498888
2024-03-13 14:09:50 -04:00
Matthew Zipkin
dfcef536d0
blockstorage: do not flush block to disk if it is already there
...
test: ensure we can reindex from read-only block files now
2024-03-12 10:09:53 -04:00
Matthew Zipkin
a64a2b77e0
rpc: refactor single/batch requests
...
Simplify the request handling flow so that errors and results only
come from JSONRPCExec()
2024-03-07 19:13:27 -05:00
Matthew Zipkin
df6e3756d6
rpc: Avoid copies in JSONRPCReplyObj()
...
Change parameters from const references to values, so they can be moved into
the reply instead of copied. Also update callers to move instead of copy.
2024-03-07 19:13:15 -05:00
Matthew Zipkin
09416f9ec4
test: cover JSONRPC 2.0 requests, batches, and notifications
2024-03-07 19:13:10 -05:00
Matthew Zipkin
4202c170da
test: refactor interface_rpc.py
...
Refactors the helper functions in the test to provide more
fine-grained control over RPC requests and responses than
the usual AuthProxy methods.
No change in test behavior, the same RPC requests are made.
2024-03-07 16:35:37 -05:00
Matthew Zipkin
567cec9a05
doc: add release notes and help text for unix sockets
2024-03-01 14:47:29 -05:00
Matthew Zipkin
bfe5192891
test: cover UNIX sockets in feature_proxy.py
2024-03-01 14:47:29 -05:00
Matthew Zipkin
c65c0d0163
init: allow UNIX socket path for -proxy and -onion
2024-03-01 14:47:29 -05:00
Matthew Zipkin
c3bd43142e
gui: accomodate unix socket Proxy in updateDefaultProxyNets()
...
This will require a follow-up to add unix socket options to the GUI
2024-03-01 14:47:29 -05:00
Matthew Zipkin
a88bf9dedd
i2p: construct Session with Proxy instead of CService
2024-03-01 14:47:29 -05:00
Matthew Zipkin
d9318a37ec
net: split ConnectToSocket() from ConnectDirectly() for unix sockets
2024-03-01 14:47:28 -05:00
Matthew Zipkin
ac2ecf3182
proxy: rename randomize_credentials to m_randomize_credentials
2024-03-01 14:47:28 -05:00
Matthew Zipkin
a89c3f59dc
netbase: extend Proxy class to wrap UNIX socket as well as TCP
2024-03-01 14:47:28 -05:00
Matthew Zipkin
3a7d6548ef
net: move CreateSock() calls from ConnectNode() to netbase methods
2024-03-01 14:47:28 -05:00
Matthew Zipkin
74f568cb6f
netbase: allow CreateSock() to create UNIX sockets if supported
2024-03-01 14:47:24 -05:00
Matthew Zipkin
bae86c8d31
netbase: refactor CreateSock() to accept sa_family_t
...
Also implement CService::GetSAFamily() to provide sa_family_t
2024-03-01 13:13:07 -05:00
Matthew Zipkin and laanwj
adb3a3e51d
configure: test for unix domain sockets
...
Copied from https://github.com/bitcoin/bitcoin/pull/9979
Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com >
2024-03-01 13:11:26 -05:00
Matthew Zipkin
5a0688a20d
test: enable reindex readonly test on *BSD and macOS as root
2023-10-23 10:58:54 -04:00
Matthew Zipkin and Andrew Chow
de8f9123af
test: cover read-only blockstore
...
Co-authored-by: Andrew Chow <github@achow101.com >
2023-09-14 12:02:01 -04:00
Matthew Zipkin
2e249b9227
doc: add release note for PR #28414
2023-09-06 11:56:19 -04:00
Matthew Zipkin
5c2185b3b6
ci: enable chattr +i capability inside containers
2023-09-06 10:40:09 -04:00
Matthew Zipkin
e573f24202
unit test: add coverage for BlockManager
2023-09-06 10:39:54 -04:00
Matthew Zipkin
e3d484b603
wallet rpc: return final tx hex from walletprocesspsbt if complete
2023-09-05 09:14:32 -04:00
Matthew Zipkin
ba8ab4fc54
test: cover addrv2 support in anchors.dat with a TorV3 address
2023-07-19 13:24:44 -04:00
Matthew Zipkin
b4bee4bbf4
test: add keep_alive option to socks5 proxy in test_framework
...
The Socks5 server we use in the test framework would disconnect
by default immediately after the handshake and sometimes would
not register as a connected peer by bitcoind.
2023-07-10 10:07:45 -04:00
Matthew Zipkin
5aaf988ccc
test: cover TorV3 address in p2p_addrv2_relay
2023-07-10 10:07:45 -04:00
Matthew Zipkin
8f14fc8622
test: cover fastprune with excessive block size
2023-04-19 11:25:07 -04:00
Matthew Zipkin
2f84ad7b9e
docs: add ramdisk guide for running tests on OSX
2023-02-22 13:04:23 -05:00
Matthew Zipkin
14b4921a91
wallet: reuse change dest when recreating TX with avoidpartialspends
2023-02-15 10:14:30 -05:00
Matthew Zipkin
77192c9598
cli: include local ("unreachable") peers in -netinfo table
2023-02-02 13:14:48 -05:00
Matthew Zipkin
4294e70690
rawtransaction: fix argument in combinerawtransaction help message
2020-09-04 17:21:18 -04:00
Matthew Zipkin
b1f584dbc1
fix build if spaces in src dir path
2017-03-24 18:22:34 -07:00
Matthew Zipkin
557c9a68fb
RPC: getblockchaininfo: BIP9 stats
...
add RPC tests for BIP9 counting stats
2017-03-24 16:57:05 -07:00
Matthew Zipkin
7eef1d0dad
Clarify description of blockindex
...
see issues:
https://github.com/bitcoin-dot-org/bitcoin.org/issues/1237
https://github.com/bitcoin/bitcoin/issues/7532
2016-02-18 12:42:59 -08:00