-
Notifications
You must be signed in to change notification settings - Fork 37.4k
tests: Expand HTTP coverage to assert libevent behavior #32408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32408. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
sock = conn.sock | ||
sock.sendall(http_request.encode("utf-8")) | ||
# Wait for response, but expect a timeout disconnection after 1 second | ||
start = time.time() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you move the start = time.time()
before sending the test passes correctly.
CI was failing locally on my laptop. After changing this it does work.
Note: it was just working on some executions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed in the libevent's test they don't actually check that server waited at all, just that the connection closed within a few seconds of the configured time out. So I went that route, but also added a tiny minimum check just to make sure the server isn't closing immediately. And this gives us better test reliability.
So the new test is: -rpcservertimeout=2
, we send a request, we time how long it takes to close, and that duration is expected to be between 1 and 4 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the timeout is set to 2 wouldn't make more sense to test between 2 and 4 seconds? Can it be less than 2 seconds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be, and that was why the 1 second timeout check kept failing. I tried a few implementations of the test and it's just impossible to reliably start the test timer in sync with the HTTP server. So sometimes it starts late and you end up with duration < expected
.
The point of the test is to ensure that the server disconnects idle clients, I think it does that even though the exact time is a little fudged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try to start the timer before connecting? Like this:
# Get the underlying socket from HTTP connection so we can send something unusual
conn = http.client.HTTPConnection(urlNode2.hostname, urlNode2.port)
+ start = time.time()
conn.connect()
sock = conn.sock
sock.sendall(http_request.encode("utf-8"))
# Wait for response, but expect a timeout disconnection after 1 second
- start = time.time()
res = sock.recv(1024)
stop = time.time()
# Server disconnected with EOF
It must make it such that the timer in the test is then always >= than the server timeout of 2 seconds, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should work but the reason I didn't leave like that is I don't feel like its effectively testing the right thing. We could start the timer at the top of the file and it would always pass, but it wouldn't necessarily catch any regressions. The server timeout should re-start every time it receives a packet from the client, and it's very hard to start the test timer at the right moment.
Another approach I tried was actually setting libevent debug logs and trying to track down messages like these:
event_add: event: 0x10a004210 (fd 20), EV_READ EV_TIMEOUT call 0x1053cf1bc
event_add: event 0x10a004210, timeout in 1 seconds 0 useconds, call 0x1053cf1bc
Interestingly, the original version of this test always passes after switching to Sockman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All that being said, if you want me to use the patch you wrote that's fine by me too ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this discussion as a blocker.
I just want to get to the bottom of it. Checked the source code of http.client.HTTPConnection()
- it does not open any connections, just sets some internal member variables of the HTTPConnection
class. So, starting the timer before or after http.client.HTTPConnection()
shouldn't make a difference.
conn.connect()
is what makes the connection. And the timer should be started before it. Why would not the followng test the right thing?
- start timer in the test (A)
- connect, server timer starts here (B)
- send
- try to recv, connection will be closed by the server due to server timeout (C)
- stop the timer (D)
Time between B and C will (must!) always be less than the time between A and D. If it is not, then I would like to know why. Maybe we are doing something completely wrong.
My worry is that CI machines are sometimes veeery slow and any "reasonable" time we set turns out to be surprise and results in intermittent test failures. Now, if doing the above can result in the time between A and D being less than 2 sec (= server timeout, B to C) and we don't know why is that and we set to check only for >1 sec instead, then, because we do not know the cause, how can we be sure that the test timer (A to D) will not be sometimes e.g. 0.99 sec causing the test to fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server timer should start after receiving the last packet from the client, because its an idle timer not a session timer. So its more correct to have:
send, server timer starts immediately after (B)
I tried to to nail this in ce9847e but that also failed.
And then, if we start the timer too early, we will always get a duration > 1 no matter what the server actually does... maybe its the initial TCP connection attempt that takes 1 second and then the server doesn't connect, or responds immediately, etc.
There also could be something with libevent itself making this act funny? I haven't had any intermittency with the original test in #32061 -- so maybe as part of that PR we can tighten up the test ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it could be that libevent behaves in an unexpected way. In #32061 we could tighten up the test to:
- connect
- start timer in the test (A)
- send, server timer starts after last packet received from the client (B)
- try to recv, connection will be closed by the server due to server timeout (C)
- stop the timer in the test (D)
abe9420
to
840dd5b
Compare
# until the (very) slow first request has been handled: | ||
res = sock.recv(1024) | ||
assert not res | ||
except TimeoutError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this but shouldn't this be socket.timeout
? As we're using sock.recv
and not getresponse()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch! I found this:
exception socket.timeout
A deprecated alias of TimeoutError.
Changed in version 3.10: This class was made an alias of TimeoutError.
Since Python 3.10 is minimum version required in dependencies.md (and the test passes!) I think it's ok to leave as-is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 840dd5b
Maybe the three commits could be squashed?
Done! thanks for reviewing |
Concept ACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# This allows for some jitter in the test between client and server. | ||
duration = stop - start | ||
assert duration <= 4, f"Server disconnected too slow: {duration} > 4" | ||
assert duration >= 1, f"Server disconnected too fast: {duration} < 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be 2, I guess since the timeout is set to 2. E.g. disconnecting after 1.5 seconds is unexpected and should be treated as an error.
diff --git i/test/functional/interface_http.py w/test/functional/interface_http.py
index 4f10b55afd..9c345c30b9 100755
--- i/test/functional/interface_http.py
+++ w/test/functional/interface_http.py
@@ -185,13 +185,14 @@ class HTTPBasicsTest (BitcoinTestFramework):
# so low on this one node, its connection will quickly timeout and get dropped by
# the server. Negating this setting will force the AuthServiceProxy
# for this node to create a fresh new HTTP connection for every command
# called for the remainder of this test.
self.nodes[2].reuse_http_connections = False
- self.restart_node(2, extra_args=["-rpcservertimeout=2"])
+ rpcservertimeout = 2
+ self.restart_node(2, extra_args=[f"-rpcservertimeout={rpcservertimeout}"])
# This is the amount of time the server will wait for a client to
# send a complete request. Test it by sending an incomplete but
# so-far otherwise well-formed HTTP request, and never finishing it.
# Copied from http_incomplete_test_() in regress_http.c in libevent.
# A complete request would have an additional "\r\n" at the end.
@@ -199,24 +200,24 @@ class HTTPBasicsTest (BitcoinTestFramework):
# Get the underlying socket from HTTP connection so we can send something unusual
conn = http.client.HTTPConnection(urlNode2.hostname, urlNode2.port)
conn.connect()
sock = conn.sock
sock.sendall(http_request.encode("utf-8"))
- # Wait for response, but expect a timeout disconnection after 1 second
+ # Wait for response, but expect a timeout disconnection after `rpcservertimeout` seconds
start = time.time()
res = sock.recv(1024)
stop = time.time()
# Server disconnected with EOF
assert res == b""
# Server disconnected within an acceptable range of time:
# not immediately, and not too far over the configured duration.
# This allows for some jitter in the test between client and server.
duration = stop - start
assert duration <= 4, f"Server disconnected too slow: {duration} > 4"
- assert duration >= 1, f"Server disconnected too fast: {duration} < 1"
+ assert duration >= rpcservertimeout, f"Server disconnected too fast: {duration} < {rpcservertimeout}"
# The connection is definitely closed.
try:
conn.request('GET', '/')
conn.getresponse()
# macos/linux windows
except (ConnectionResetError, ConnectionAbortedError):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this is the test becomes flakey because the timer may not start in sync with the server, so it may record less time than the server actually waited: #32408 (comment)
note also that libevent doesn't even try to test the lower bound: #32408 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continued the discussion in #32408 (comment)
test/functional/interface_http.py
Outdated
conn = http.client.HTTPConnection(urlNode2.hostname, urlNode2.port) | ||
conn.connect() | ||
sock = conn.sock | ||
sock.settimeout(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat comment #32061 (comment) here:
1 second timeout to send or receive seems more than enough for local testing on a dev machine. However, CI virtual machines sometimes are surprisingly slow. To avoid unnecessary test failures maybe it would be better to have this be 5 or 10 seconds for the sendall()
calls and then set to 1 for the recv()
call which we expect to timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'll change the value here to 5 -- meaning the sock.recv()
on L139 will always take that much time. That will, however, protect us against false positives on a slow CI, if the server regressed and actually responded to the requests out of order, but took more than 1 second to do so.
After we generate a block, the sock.recv()
on L150 should execute very quickly, but will allow up to 5 seconds for a slow CI to respond to the two RPC requests. That applies to the sendall()
as well.
test/functional/interface_http.py
Outdated
# The server should not respond to the fast, second request | ||
# until the (very) slow first request has been handled: | ||
res = sock.recv(1024) | ||
assert not res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat comment #32061 (comment) here:
Shouldn't this be assert False
? Here the expectation is that the recv()
will throw an exception due to timeout.
https://docs.python.org/3/library/socket.html#socket.socket.recv
A returned empty bytes object indicates that the client has disconnected.
An "empty bytes object" will not trigger the assert assert not res
but if that happens (= disconnect) then the test should fail.
suggestion:
- assert not res
+ assert False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, done
test/functional/interface_http.py
Outdated
conn.getresponse() | ||
# macos/linux windows | ||
except (ConnectionResetError, ConnectionAbortedError): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat comment #32061 (comment) here:
This will also pass if no exception is thrown. Either add assert False
after line 214 or have a boolean variable to false before the try
and set it to true inside except
and assert that it is true afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep thanks
test/functional/interface_http.py
Outdated
body_chunked = [ | ||
b'{"method": "submitblock", "params": ["', | ||
b'0A' * 1000000, | ||
b'0B' * 1000000, | ||
b'0C' * 1000000, | ||
b'0D' * 1000000, | ||
b'"]}' | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat comment #32061 (comment) here:
Is the intention here to send 8MB of data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, 4MB! Great catch thanks, fixed.
test/functional/interface_http.py
Outdated
headers=headers_chunked, | ||
encode_chunked=True) | ||
out1 = conn.getresponse().read() | ||
assert out1 == b'{"result":"high-hash","error":null}\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat comment #32061 (comment) here:
Here and elsewhere in the added tests, assert_equal()
produces a better error message:
assert
(value of out1
is not printed):
assert out1 == b'{"result":"high-hash","error":null}\n'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
vs
assert_equal()
:
AssertionError: not(b'{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}\n' == b'{"result":"high-hash","error":null}\n')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome yes, thanks, done
Covers: - http pipelining - rpcservertimeout Testing this requires adding an option to TestNode to force the test framework to establish a new HTTP connection for every RPC. Otherwise, attempting to reuse a persistent connection would cause framework RPCs during startup and shutdown to fail. - "chunked" Transfer-Encoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebase to f16c8c6 to address comments, not touching the rpcservertimeout
test just yet, discussion still ongoing
test/functional/interface_http.py
Outdated
conn = http.client.HTTPConnection(urlNode2.hostname, urlNode2.port) | ||
conn.connect() | ||
sock = conn.sock | ||
sock.settimeout(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'll change the value here to 5 -- meaning the sock.recv()
on L139 will always take that much time. That will, however, protect us against false positives on a slow CI, if the server regressed and actually responded to the requests out of order, but took more than 1 second to do so.
After we generate a block, the sock.recv()
on L150 should execute very quickly, but will allow up to 5 seconds for a slow CI to respond to the two RPC requests. That applies to the sendall()
as well.
test/functional/interface_http.py
Outdated
# The server should not respond to the fast, second request | ||
# until the (very) slow first request has been handled: | ||
res = sock.recv(1024) | ||
assert not res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, done
test/functional/interface_http.py
Outdated
body_chunked = [ | ||
b'{"method": "submitblock", "params": ["', | ||
b'0A' * 1000000, | ||
b'0B' * 1000000, | ||
b'0C' * 1000000, | ||
b'0D' * 1000000, | ||
b'"]}' | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, 4MB! Great catch thanks, fixed.
test/functional/interface_http.py
Outdated
headers=headers_chunked, | ||
encode_chunked=True) | ||
out1 = conn.getresponse().read() | ||
assert out1 == b'{"result":"high-hash","error":null}\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome yes, thanks, done
test/functional/interface_http.py
Outdated
conn.getresponse() | ||
# macos/linux windows | ||
except (ConnectionResetError, ConnectionAbortedError): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK f16c8c6
Maybe the check for the timeout can be improved, ongoing discussion at #32408 (comment) (non-blocker IMO)
Friendly ping @fjahr and @polespinasa for reviewing some HTTP tests ? <3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK f16c8c6
Looks good to me, I would consider my comments non-blocking and could potentially be addressed in a follow-up.
b'3' * 1000000, | ||
b'"]}' | ||
] | ||
conn = http.client.HTTPConnection(urlNode2.hostname, urlNode2.port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Could use a helper function to get rid of some duplication here (and even beyond the changes here across the whole test file).
def _get_http_connection(self, url_node):
conn = http.client.HTTPConnection(url_node.hostname, url_node.port)
conn.connect()
sock = conn.sock
return conn, sock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call thanks. I will do this if I retouch this PR, otherwise will add to #32061 on rebase
while res.count(b"result") != 2: | ||
res += sock.recv(1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I haven't looked at the actual data but this seems a bit fragile, if the second "result" is at the very end of res, the test would continue here but then fail below. Not sure how real that threat is but it could also be easily mitigated by doing one more recv
I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's possible, the two RPCs are getblockcount
and waitforblockheight
, those two responses together including their HTTP overhead only total about 500 bytes so I don't think recv(1024)
would truncate anything. If the server is extremely slow the client may even have to call recv()
twice in the while loop, reading only about 250 bytes each time.
ACK f16c8c6 |
…9e030d56343 d9e030d56343 kernel: Fix bitcoin-chainstate for windows cc4ac564cc38 kernel: Add Purpose section to header documentation bfdf605296ce kernel: Add pure kernel bitcoin-chainstate 35099f39b7ea kernel: Add functions to get the block hash from a block fae94070a72e kernel: Add block index utility functions to C header d5d377859785 kernel: Add function to read block undo data from disk to C header 43f6039b7b48 kernel: Add functions to read block from disk to C header 54cdfcdc68e6 kernel: Add function for copying block data to C header 18cab45358c3 kernel: Add functions for the block validation state to C header 033e86a06cbc kernel: Add validation interface to C header 9398f9ea4e14 kernel: Add interrupt function to C header 86340a490541 kernel: Add import blocks function to C header f11dc01bba94 kernel: Add chainstate load options for in-memory dbs in C header be9fc18dd54f kernel: Add options for reindexing in C header 7947a9b500fc kernel: Add block validation to C header d5ace1f8ea96 kernel: Add chainstate loading when instantiating a ChainstateManager 47ff652cf08f kernel: Add chainstate manager option for setting worker threads 106898e0c25f kernel: Add chainstate manager object to C header 3eadf1ccbe1c kernel: Add notifications context option to C header 98b1454a987a kernel: Add chain params context option to C header ca8d6ee344b7 kernel: Add kernel library context object 96f5ebe97748 kernel: Add logging to kernel library C header 906a19748152 kernel: Introduce initial kernel C header API 4b8ac9eacd1b Merge bitcoin/bitcoin#32680: ci: Rewrite test-each-commit as py script 157bbd0a07c0 Merge bitcoin/bitcoin#32425: config: allow setting -proxy per network ebec7bf3895c Merge bitcoin/bitcoin#32572: doc: Remove stale sections in dev notes 011a8c5f0168 Merge bitcoin/bitcoin#32696: doc: make `-DWITH_ZMQ=ON` explicit on `build-unix.md` fe39050a66c7 Merge bitcoin/bitcoin#32678: guix: warn and abort when SOURCE_DATE_EPOCH is set 692fe280c232 Merge bitcoin/bitcoin#32713: doc: fuzz: fix AFL++ link c1d4253d316e Merge bitcoin/bitcoin#32711: doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md 89526deddf87 doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md a39b7071cfb4 doc: fuzz: fix AFL++ link dff208bd5a14 Merge bitcoin/bitcoin#32708: rpc, doc: update `listdescriptors` RCP help d978a43d054d Merge bitcoin/bitcoin#32408: tests: Expand HTTP coverage to assert libevent behavior f3bbc746647d Merge bitcoin/bitcoin#32406: policy: uncap datacarrier by default b44514b87633 rpc, doc: update `listdescriptors` RCP help 32d4e92b9ac8 doc: make `-DWITH_ZMQ=ON` explicit on `build-unix.md` e2174378aa8a Merge bitcoin/bitcoin#32539: init: Configure reachable networks before we start the RPC server 2053c4368472 Merge bitcoin/bitcoin#32675: test: wallet: cover wallet passphrase with a null char fa9cfdf3be75 ci: [doc] fix url redirect fac60b9c4839 ci: Rewrite test-each-commit as py script ae024137bda9 Merge bitcoin/bitcoin#32496: depends: drop `ltcg` for Windows Qt 6a2ff6790929 Merge bitcoin/bitcoin#32679: doc: update tor docs to use bitcoind binary from path fd4399cb9c69 Merge bitcoin/bitcoin#32602: fuzz: Add target for coins database f94167512dc9 Merge bitcoin/bitcoin#32676: test: apply microsecond precision to test framework logging 0dcb45290cf8 Merge bitcoin/bitcoin#32607: rpc: Note in fundrawtransaction doc, fee rate is for package 4ce53495e5e1 doc: update tor docs to use bitcoind binary from path a5e98dc3ae63 Merge bitcoin/bitcoin#32651: cmake: Replace deprecated `qt6_add_translation` with `qt6_add_lrelease` 9653ebc05360 depends: remove support for Windows Qt LTO builds 7cfbb8575e1f test: wallet: cover wallet passphrase with a null char 5c4a0f8009ce guix: warn and abort when SOURCE_DATE_EPOCH is set 4af72d8b0892 Merge bitcoin/bitcoin#32647: build: add -Wthread-safety-pointer a980918f51d7 Merge bitcoin/bitcoin#32568: depends: use "mkdir -p" when installing xproto ed179e0a6528 test: apply microsecond precision to test framework logging e872a566f251 Merge bitcoin/bitcoin#32644: doc: miscellaneous changes e50312eab0b5 doc: fix typos c797e50ddae9 ci: update codespell to 2.4.1 21ee656337b0 doc: Remove obselete link in notificator.cpp ee4406c04af0 doc: update URLs 2d819fa4dff9 Merge bitcoin/bitcoin#29032: signet: omit commitment for some trivial challenges f999c3775c12 Merge bitcoin/bitcoin#32449: wallet: init, don't error out when loading legacy wallets f98e1aaf34e3 rpc: Note in fundrawtransaction doc, fee rate is for package 1c6602399be6 Merge bitcoin/bitcoin#32662: doc: Remove build instruction for running `clang-tidy` 4b1b36acb48f doc: Remove build instruction for running `clang-tidy` 9e105107bf52 Merge bitcoin/bitcoin#32656: depends: don't install & then delete sqlite pkgconf 72a5aa9b791e depends: don't install & then delete sqlite pkgconf 18cf727429e9 cmake: Replace deprecated `qt6_add_translation` with `qt6_add_lrelease` 83bfe1485c37 build: add -Wthread-safety-pointer e639ae05315e Update leveldb subtree to latest upstream 240a4fb95d5b Squashed 'src/leveldb/' changes from 113db4962b..aba469ad6a a189d636184b add release note for datacarriersize default change a141e1bf501b Add more OP_RETURN mempool acceptance functional tests 0b4048c73385 datacarrier: deprecate startup arguments for future removal 63091b79e70b test: remove unnecessary -datacarriersize args from tests 9f36962b07ef policy: uncap datacarrier by default 4b1d48a6866b Merge bitcoin/bitcoin#32598: walletdb: Log additional exception error messages for corrupted wallets b933813386ef Merge bitcoin/bitcoin#32619: wallet, rpc, gui: List legacy wallets with a message about migration 053bda5d9fb3 Merge bitcoin/bitcoin#32460: fs: remove `_POSIX_C_SOURCE` defining 9393aeeca4b1 Merge bitcoin/bitcoin#32641: Update libmultiprocess subtree to fix clang-tidy errors 5471e29d0570 Merge bitcoin/bitcoin#32304: test: test MAX_SCRIPT_SIZE for block validity 9f6565488fc1 Merge commit '154af1eea1170f5626aa1c5f19cc77d1434bcc9d' into HEAD 154af1eea117 Squashed 'src/ipc/libmultiprocess/' changes from 35944ffd23fa..27c7e8e5a581 c540ede1cbca Merge bitcoin/bitcoin#32633: windows: Use predefined `RC_INVOKED` macro instead of custom one cfc42ae5b7ef fuzz: add a target for the coins database 55f1c2ac8beb windows: Use predefined `RC_INVOKED` macro instead of custom one 14c16e81598a Merge bitcoin/bitcoin#32582: log: Additional compact block logging aad5938c49f9 Merge bitcoin/bitcoin#32516: test: add MAX_DISCONNECTED_TX_POOL_BYTES, chainlimits coverage 1062df81eec7 Merge bitcoin/bitcoin#32634: build: Add resource file and manifest to `bitcoin.exe` 83df64d7491b log: Stats when fulfilling GETBLOCKTXN 370c59261269 Merge bitcoin/bitcoin#32630: test: fix sync function in rpc_psbt.py dbb2d4c3d547 windows: Add application manifest to `bitcoin.exe` df82c2dc17e3 windows: Add resource file for `bitcoin.exe` 3733ed2dae3d log: Size of missing tx'es when reconstructing compact block 4df4df45d7bc test: fix sync function in rpc_psbt.py 84aa484d45e2 test: fix transaction_graph_test reorg test eaf44f376784 test: check chainlimits respects on reorg 47894367b583 functional test: add MAX_DISCONNECTED_TX_POOL_BYTES coverage f3a444c45fb4 gui: Disallow loading legacy wallets 09955172f38a wallet, rpc: Give warning in listwalletdir for legacy wallets ad9a13fc424e walletdb: Log additional exception error messages for corrupted wallets 46e14630f7fe fuzz: move the coins_view target's body into a standalone function 56d878c4650c fuzz: avoid underflow in coins_view target 36bcee05dc71 log: Log start of compact block initialization. 24e5fd3bedce fs: remove _POSIX_C_SOURCE defining f16c8c67bf13 tests: Expand HTTP coverage to assert libevent behavior fac00d4ed361 doc: Move CI-must-pass requirement into readme section fab79c1a250d doc: Clarify and move "hygienic commit" note fac8b0519799 doc: Clarify strprintf size specifier note faaf34ad7253 doc: Remove section about RPC alias via function pointer 2222d61e1ce5 doc: Remove section about RPC arg names in table fa00b8c02c9d doc: Remove section about include guards fad6cd739b63 doc: Remove dev note section on includes fa6623d85af1 doc: Remove file name section 7777fb8bc749 doc: Remove shebang section faf65f05312b doc: Remove .gitignore section faf2094f2511 doc: Remove note about removed ParsePrechecks fa69c5b170f5 doc: Remove -disablewallet from dev notes df9ebbf659d5 depends: use "mkdir -p" when installing xproto 6ee32aaaca4a test: signet tool genpsbt and solvepsbt commands 0a99d99fe4cb signet: miner skips PSBT step for OP_TRUE cdfb70e5a6a9 signet: split decode_psbt miner helper 86e1111239cd test: verify node skips loading legacy wallets during startup 12ff4be9c724 test: ensure -rpcallowip is compatible with RFC4193 c02bd3c1875a config: Explain RFC4193 and CJDNS interaction in help and init error f728b6b11100 init: Configure reachable networks before we start the RPC server 9f94de5bb54f wallet: init, don't error out when loading legacy wallets e98c51fcce9a doc: update tor.md to mention the new -proxy=addr:port=tor ca5781e23a8f config: allow setting -proxy per network b1ea542ae651 test: test MAX_SCRIPT_SIZE for block validity REVERT: 9f83f8b46c84 kernel: build monolithic static lib REVERT: 1417e0b3b1b0 kernel: Fix bitcoin-chainstate for windows REVERT: 4f07590a8bd6 kernel: Add Purpose section to header documentation REVERT: 58c01a82c163 kernel: Add pure kernel bitcoin-chainstate REVERT: 0416a292f545 kernel: Add functions to get the block hash from a block REVERT: 8d25dfd1b2a2 kernel: Add block index utility functions to C header REVERT: eacf99dd3c28 kernel: Add function to read block undo data from disk to C header REVERT: 3c012048c2f1 kernel: Add functions to read block from disk to C header REVERT: 85f5264462e0 kernel: Add function for copying block data to C header REVERT: f136ca589153 kernel: Add functions for the block validation state to C header REVERT: 9d7e19ee522d kernel: Add validation interface to C header REVERT: 51555301a882 kernel: Add interrupt function to C header REVERT: 61c4ac9c8e1f kernel: Add import blocks function to C header REVERT: 4153ab77084e kernel: Add chainstate load options for in-memory dbs in C header REVERT: cb128288a0d9 kernel: Add options for reindexing in C header REVERT: 7ead2a92be50 kernel: Add block validation to C header REVERT: 9262ce715448 kernel: Add chainstate loading when instantiating a ChainstateManager REVERT: 594b060da476 kernel: Add chainstate manager option for setting worker threads REVERT: 7384b7325d5f kernel: Add chainstate manager object to C header REVERT: 7920e23c22b8 kernel: Add notifications context option to C header REVERT: c0a86769e784 kernel: Add chain params context option to C header REVERT: 3769d12882f9 kernel: Add kernel library context object REVERT: f7b435493bd7 kernel: Add logging to kernel library C header REVERT: 62d0122c7ed0 kernel: Introduce initial kernel C header API git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: d9e030d56343bb452d86169f77ddfb64f7160235
These commits are cherry-picked from #32061 and part of a project to remove libevent.
This PR only adds functional tests to
interface_http
to cover some HTTP server behaviors we inherit from libevent, in order to maintain those behaviors when we replace libevent with our own HTTP server.-rpcservertimeout
config option which sets the amount of time the server will keep an idle client connection aliveContent-Length
header RFC 7230 4.1