💬 rkrux commented on pull request "test: Validate UTXO snapshot with coin height > base height & amount > MAX_MONEY supply":
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565319719)
Suggest the below refactoring to avoid passing wrong_hash and error_message in the same variable while relying on is_custom_message to differentiate between the two.
```
diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py
index a70b511c91..d07f2db530 100755
--- a/test/functional/feature_assumeutxo.py
+++ b/test/functional/feature_assumeutxo.py
@@ -100,25 +100,24 @@ class AssumeutxoTest(BitcoinTestFramework):
self.log.info(" - snapshot fil
...
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565319719)
Suggest the below refactoring to avoid passing wrong_hash and error_message in the same variable while relying on is_custom_message to differentiate between the two.
```
diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py
index a70b511c91..d07f2db530 100755
--- a/test/functional/feature_assumeutxo.py
+++ b/test/functional/feature_assumeutxo.py
@@ -100,25 +100,24 @@ class AssumeutxoTest(BitcoinTestFramework):
self.log.info(" - snapshot fil
...
📝 dergoegge opened a pull request: "rpc, bugfix: Enforce maximum value for setmocktime"
(https://github.com/bitcoin/bitcoin/pull/29869)
The maximum value for our mocktime must be representable in nanoseconds, otherwise we end up with negative values returned from `NodeClock::now()`.
Found through fuzzing:
```
$ echo "c2V0bW9ja3RpbWVcZTptYf9w/3NldG3///////////////9p////ZP///ymL//////89////Nv9L////////LXkBAABpAA==" | base64 --decode > rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
$ FUZZ=rpc ./src/test/fuzz/fuzz rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
fuzz_libfuzzer: util/time.cpp:28: static NodeClock::time
...
(https://github.com/bitcoin/bitcoin/pull/29869)
The maximum value for our mocktime must be representable in nanoseconds, otherwise we end up with negative values returned from `NodeClock::now()`.
Found through fuzzing:
```
$ echo "c2V0bW9ja3RpbWVcZTptYf9w/3NldG3///////////////9p////ZP///ymL//////89////Nv9L////////LXkBAABpAA==" | base64 --decode > rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
$ FUZZ=rpc ./src/test/fuzz/fuzz rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
fuzz_libfuzzer: util/time.cpp:28: static NodeClock::time
...
📝 maflcko opened a pull request: "rpc: Reword SighashFromStr error message"
(https://github.com/bitcoin/bitcoin/pull/29870)
Put quotes around the parameter. In theory, `std::quoted` should be used, but that seems overkill.
This should avoid error messages such as `A valid sighash parameter is not a valid sighash parameter. (code -8)`.
Also, it should fix fuzz false positives when searching for internal bugs in the `rpc` fuzz target. For example, `ZGVzY3JpcHRvcnByb2Nlc3Nwc2J0XP9ce1tdXOVJbnRlcm5hbCBidWcgZGV0ZWN0ZWQAXQ0AHfcAXQ1p7TJv`.
(https://github.com/bitcoin/bitcoin/pull/29870)
Put quotes around the parameter. In theory, `std::quoted` should be used, but that seems overkill.
This should avoid error messages such as `A valid sighash parameter is not a valid sighash parameter. (code -8)`.
Also, it should fix fuzz false positives when searching for internal bugs in the `rpc` fuzz target. For example, `ZGVzY3JpcHRvcnByb2Nlc3Nwc2J0XP9ce1tdXOVJbnRlcm5hbCBidWcgZGV0ZWN0ZWQAXQ0AHfcAXQ1p7TJv`.
👍 maflcko approved a pull request: "rpc, bugfix: Enforce maximum value for setmocktime"
(https://github.com/bitcoin/bitcoin/pull/29869#pullrequestreview-2000309755)
Could combine the two error messages into one, as both are related to out-of-range?
(https://github.com/bitcoin/bitcoin/pull/29869#pullrequestreview-2000309755)
Could combine the two error messages into one, as both are related to out-of-range?
💬 maflcko commented on pull request "rpc, bugfix: Enforce maximum value for setmocktime":
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565359185)
```suggestion
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime must be in the range [0, %s], not %s.", max_time, time));
```
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565359185)
```suggestion
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime must be in the range [0, %s], not %s.", max_time, time));
```
💬 dergoegge commented on pull request "rpc, bugfix: Enforce maximum value for setmocktime":
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565362888)
Done.
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565362888)
Done.
👍 maflcko approved a pull request: "rpc, bugfix: Enforce maximum value for setmocktime"
(https://github.com/bitcoin/bitcoin/pull/29869#pullrequestreview-2000318650)
Thanks, lgtm
(https://github.com/bitcoin/bitcoin/pull/29869#pullrequestreview-2000318650)
Thanks, lgtm
💬 maflcko commented on pull request "rpc, bugfix: Enforce maximum value for setmocktime":
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565364205)
nit: could be better to remove this and use `util/time.h` instead?
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565364205)
nit: could be better to remove this and use `util/time.h` instead?
💬 dergoegge commented on pull request "rpc, bugfix: Enforce maximum value for setmocktime":
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565366501)
Done
(https://github.com/bitcoin/bitcoin/pull/29869#discussion_r1565366501)
Done
💬 maflcko commented on pull request "index: block filters sync, reduce disk read operations by caching last header":
(https://github.com/bitcoin/bitcoin/pull/28955#issuecomment-2056140745)
Follow-up in https://github.com/bitcoin/bitcoin/pull/29867#issuecomment-2054064278
(https://github.com/bitcoin/bitcoin/pull/28955#issuecomment-2056140745)
Follow-up in https://github.com/bitcoin/bitcoin/pull/29867#issuecomment-2054064278
💬 ajtowns commented on pull request "add `-limitdummyscriptdatasize` option":
(https://github.com/bitcoin/bitcoin/pull/29520#issuecomment-2056153503)
> Implementing tests are way above want I can do, so it's up for grab. [[ref](https://github.com/bitcoin/bitcoin/pull/29520#discussion_r1543749260)]
I don't think it makes a lot of sense to add features without basic functional tests demonstrating they work as intended. Perhaps someone reading this is up for creating some?
(https://github.com/bitcoin/bitcoin/pull/29520#issuecomment-2056153503)
> Implementing tests are way above want I can do, so it's up for grab. [[ref](https://github.com/bitcoin/bitcoin/pull/29520#discussion_r1543749260)]
I don't think it makes a lot of sense to add features without basic functional tests demonstrating they work as intended. Perhaps someone reading this is up for creating some?
💬 maflcko commented on pull request "rpc, bugfix: Enforce maximum value for setmocktime":
(https://github.com/bitcoin/bitcoin/pull/29869#issuecomment-2056157190)
lgtm ACK 61df72ee4dee3c5d739a3c851c86fdb4e4c640e5
(https://github.com/bitcoin/bitcoin/pull/29869#issuecomment-2056157190)
lgtm ACK 61df72ee4dee3c5d739a3c851c86fdb4e4c640e5
🤔 fjahr reviewed a pull request: "test: Validate UTXO snapshot with coin height > base height & amount > MAX_MONEY supply"
(https://github.com/bitcoin/bitcoin/pull/29617#pullrequestreview-2000312610)
Concept ACK
I think it would be helpful for reviewers if you could add information in the commit message how you arrived at the content values `b"\x84\x58"` and `b"\xCA\xD2\x8F\x5A"`.
(https://github.com/bitcoin/bitcoin/pull/29617#pullrequestreview-2000312610)
Concept ACK
I think it would be helpful for reviewers if you could add information in the commit message how you arrived at the content values `b"\x84\x58"` and `b"\xCA\xD2\x8F\x5A"`.
💬 fjahr commented on pull request "test: Validate UTXO snapshot with coin height > base height & amount > MAX_MONEY supply":
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565361998)
Unnecessary blank space removal
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565361998)
Unnecessary blank space removal
💬 fjahr commented on pull request "test: Validate UTXO snapshot with coin height > base height & amount > MAX_MONEY supply":
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565360894)
I think using one field for multiple things makes this more confusing than necessary. Please keep the hash field for the hash and where you have the boolean you can use that field for a custom message. Then you can check if the custom message is set instead of an explicit boolean.
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565360894)
I think using one field for multiple things makes this more confusing than necessary. Please keep the hash field for the hash and where you have the boolean you can use that field for a custom message. Then you can check if the custom message is set instead of an explicit boolean.
💬 fjahr commented on pull request "test: Validate UTXO snapshot with coin height > base height & amount > MAX_MONEY supply":
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565369875)
I don't think we put a space here anywhere else?
(https://github.com/bitcoin/bitcoin/pull/29617#discussion_r1565369875)
I don't think we put a space here anywhere else?
💬 maflcko commented on pull request "rpc: Reword SighashFromStr error message":
(https://github.com/bitcoin/bitcoin/pull/29870#issuecomment-2056227580)
cc @dergoegge
(https://github.com/bitcoin/bitcoin/pull/29870#issuecomment-2056227580)
cc @dergoegge
💬 fanquake commented on pull request "[27.x] More backports and finalize":
(https://github.com/bitcoin/bitcoin/pull/29780#issuecomment-2056258824)
@vostrnad @stickies-v thanks, combined suggestions.
(https://github.com/bitcoin/bitcoin/pull/29780#issuecomment-2056258824)
@vostrnad @stickies-v thanks, combined suggestions.
💬 dergoegge commented on pull request "rpc, bugfix: Enforce maximum value for setmocktime":
(https://github.com/bitcoin/bitcoin/pull/29869#issuecomment-2056268268)
Fixed `rpc_uptime` functional test
(https://github.com/bitcoin/bitcoin/pull/29869#issuecomment-2056268268)
Fixed `rpc_uptime` functional test
⚠️ maflcko opened an issue: "Intermittent issue in feature_proxy.py AssertionError: not(bytearray(b'node.noumenon') == b'fc00:1:2:3:4:5:6:7')"
(https://github.com/bitcoin/bitcoin/issues/29871)
https://drahtbot.space/temp_scratch/feature_proxy_179.tar.zstd
```
test 2024-04-13T16:24:13.025000Z TestFramework (DEBUG): Test: outgoing CJDNS connection through node 4 for address [fc00:1:2:3:4:5:6:7]:8888
node4 2024-04-13T16:24:13.089818Z [http] [httpserver.cpp:306] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:53136
node0 2024-04-13T16:24:13.090252Z [net] [net.cpp:2124] [SocketHandlerConnected] [net] socket recv error for peer=5: Connection reset by peer (
...
(https://github.com/bitcoin/bitcoin/issues/29871)
https://drahtbot.space/temp_scratch/feature_proxy_179.tar.zstd
```
test 2024-04-13T16:24:13.025000Z TestFramework (DEBUG): Test: outgoing CJDNS connection through node 4 for address [fc00:1:2:3:4:5:6:7]:8888
node4 2024-04-13T16:24:13.089818Z [http] [httpserver.cpp:306] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:53136
node0 2024-04-13T16:24:13.090252Z [net] [net.cpp:2124] [SocketHandlerConnected] [net] socket recv error for peer=5: Connection reset by peer (
...