π¬ ryanofsky commented on pull request "kernel: Remove StartShutdown calls from validation code":
(https://github.com/bitcoin/bitcoin/pull/28048#discussion_r1260132300)
I don't actually want to make any new guarantees here. I'm just trying to make a simplification to the `ActivateBestChain` function and document the resulting behavior in release notes. Maybe the following release note would be better?
- The `-stopatheight` option now stops earlier and no longer tries to validate and connect all the downloaded blocks above the specified height on the most-work chain. This means the resulting chain is more likely to be exactly the specified height instead of l
...
(https://github.com/bitcoin/bitcoin/pull/28048#discussion_r1260132300)
I don't actually want to make any new guarantees here. I'm just trying to make a simplification to the `ActivateBestChain` function and document the resulting behavior in release notes. Maybe the following release note would be better?
- The `-stopatheight` option now stops earlier and no longer tries to validate and connect all the downloaded blocks above the specified height on the most-work chain. This means the resulting chain is more likely to be exactly the specified height instead of l
...
π¬ murchandamus commented on pull request "rpc: fix data optionality for RPC calls.":
(https://github.com/bitcoin/bitcoin/pull/27829#discussion_r1260141297)
How about something along these lines?
```suggestion
{"outputs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The transactionβs outputs specified as key-value pairs.\n"
"Payment outputs are specified in the form of \"address\":\"amount [BTC]\", e.g. \"bc1pβ¦xyz\":\"0.001\".\n"
"A single data output may be specified in the form of \"data\":\"hex\", e.g. \"data\":\"ff00ff00ff\".\n"
"Each key may only appear once. This means that each ad
...
(https://github.com/bitcoin/bitcoin/pull/27829#discussion_r1260141297)
How about something along these lines?
```suggestion
{"outputs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The transactionβs outputs specified as key-value pairs.\n"
"Payment outputs are specified in the form of \"address\":\"amount [BTC]\", e.g. \"bc1pβ¦xyz\":\"0.001\".\n"
"A single data output may be specified in the form of \"data\":\"hex\", e.g. \"data\":\"ff00ff00ff\".\n"
"Each key may only appear once. This means that each ad
...
π¬ murchandamus commented on pull request "rpc: fix data optionality for RPC calls.":
(https://github.com/bitcoin/bitcoin/pull/27829#discussion_r1260158337)
How about:
```suggestion
{"outputs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The outputs specified as key-value pairs.\n"
"Each key may only appear once, i.e. there can only be one 'data' output, and no address may be duplicated.\n"
"At least one output of either type must be specified.\n"
```
(https://github.com/bitcoin/bitcoin/pull/27829#discussion_r1260158337)
How about:
```suggestion
{"outputs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The outputs specified as key-value pairs.\n"
"Each key may only appear once, i.e. there can only be one 'data' output, and no address may be duplicated.\n"
"At least one output of either type must be specified.\n"
```
π¬ achow101 commented on pull request "Add support for RFC8439 variant of ChaCha20":
(https://github.com/bitcoin/bitcoin/pull/27985#issuecomment-1631361128)
ACK 0bf87476f55dceb106563156c7c8d6bfb8162e29
(https://github.com/bitcoin/bitcoin/pull/27985#issuecomment-1631361128)
ACK 0bf87476f55dceb106563156c7c8d6bfb8162e29
π¬ murchandamus commented on pull request "rpc: fix data optionality for RPC calls.":
(https://github.com/bitcoin/bitcoin/pull/27829#issuecomment-1631361402)
> @Sjors Not sure if you saw my response above, let me know what you think, we can close this out if there's no appetite for this small change.
I think you have correctly identified that this text could be improved and we should move forward with the PR.
(https://github.com/bitcoin/bitcoin/pull/27829#issuecomment-1631361402)
> @Sjors Not sure if you saw my response above, let me know what you think, we can close this out if there's no appetite for this small change.
I think you have correctly identified that this text could be improved and we should move forward with the PR.
π€ mzumsande reviewed a pull request: "Bugfix: net_processing: Restore "Already requested" error for FetchBlock"
(https://github.com/bitcoin/bitcoin/pull/28055#pullrequestreview-1525047228)
> The result of this PR would be that it would return an error IFF that particular block was requested by that specific peer last. If you request the block from another peer, the behavior would be unchanged. Is that acceptable?
I think that I would find that acceptable.
I guess one alternative would be to drop the "Already requested from this peer" error that is currently not triggerable, and just forget about the prior request unconditionally on a new request.
(https://github.com/bitcoin/bitcoin/pull/28055#pullrequestreview-1525047228)
> The result of this PR would be that it would return an error IFF that particular block was requested by that specific peer last. If you request the block from another peer, the behavior would be unchanged. Is that acceptable?
I think that I would find that acceptable.
I guess one alternative would be to drop the "Already requested from this peer" error that is currently not triggerable, and just forget about the prior request unconditionally on a new request.
π¬ achow101 commented on pull request "Support JSON-RPC 2.0 when requested by client":
(https://github.com/bitcoin/bitcoin/pull/27101#discussion_r1260253320)
In 94d02376c853aa4835de413d3f75b8b06bcb5193 "rpc: JSON-RPC 2.0 should not respond to "notifications""
This results in 500 and a response body of "Unhandled request". I think it should actually be a 200 with no response body.
```suggestion
if (jreq.IsNotification()) {
req->WriteReply(HTTP_OK);
return true;
}
```
(https://github.com/bitcoin/bitcoin/pull/27101#discussion_r1260253320)
In 94d02376c853aa4835de413d3f75b8b06bcb5193 "rpc: JSON-RPC 2.0 should not respond to "notifications""
This results in 500 and a response body of "Unhandled request". I think it should actually be a 200 with no response body.
```suggestion
if (jreq.IsNotification()) {
req->WriteReply(HTTP_OK);
return true;
}
```
π€ jamesob reviewed a pull request: "util: Add XorFile"
(https://github.com/bitcoin/bitcoin/pull/28060#pullrequestreview-1525080853)
Concept ACK
In general looks good, but I think you could really cut down on the amount of code here if you just made `XorFile` a subclass of `CAutoFile`, and made whatever small adjustments and modernizations necessary to `CAutoFile` to get that to work.
E.g. `XorFile::ignore()` seems like essentially the same code as `CAutoFile::ignore()`, just with some `std::` prefixes. Seems like code we don't want to maintain two copies of.
(https://github.com/bitcoin/bitcoin/pull/28060#pullrequestreview-1525080853)
Concept ACK
In general looks good, but I think you could really cut down on the amount of code here if you just made `XorFile` a subclass of `CAutoFile`, and made whatever small adjustments and modernizations necessary to `CAutoFile` to get that to work.
E.g. `XorFile::ignore()` seems like essentially the same code as `CAutoFile::ignore()`, just with some `std::` prefixes. Seems like code we don't want to maintain two copies of.
π¬ jamesob commented on pull request "util: Add XorFile":
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260227191)
fa2276355889ff7bcad95aa978863107c36a89f7
Minor: new function is called `detail_fread` but commit and commit message mention `detail_read`.
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260227191)
fa2276355889ff7bcad95aa978863107c36a89f7
Minor: new function is called `detail_fread` but commit and commit message mention `detail_read`.
π¬ jamesob commented on pull request "util: Add XorFile":
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260260590)
fa9325a14584be1c5aa6b4cdefbdaa69b27e402d
Might be interesting to see how statically allocating a buffer (say, as a member of `XorFile`) and reusing it might affect performance; may avoid some reallocations. Not sure how frequently this is actually called though. I expect this probably won't make a difference though, because I guess `XorFile::write()` will be called on the order of once per block.
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260260590)
fa9325a14584be1c5aa6b4cdefbdaa69b27e402d
Might be interesting to see how statically allocating a buffer (say, as a member of `XorFile`) and reusing it might affect performance; may avoid some reallocations. Not sure how frequently this is actually called though. I expect this probably won't make a difference though, because I guess `XorFile::write()` will be called on the order of once per block.
π¬ jamesob commented on pull request "util: Add XorFile":
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260249626)
fa9325a14584be1c5aa6b4cdefbdaa69b27e402d
Should these serialization methods have similar `if (!m_file)` guards as `AutoFile` does?
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260249626)
fa9325a14584be1c5aa6b4cdefbdaa69b27e402d
Should these serialization methods have similar `if (!m_file)` guards as `AutoFile` does?
π¬ jamesob commented on pull request "util: Add XorFile":
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260252291)
fa9325a14584be1c5aa6b4cdefbdaa69b27e402d
Why not throw a `std::ios_base::failure()` here? From what I can tell, we'd never expect to get back a negative error value.
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260252291)
fa9325a14584be1c5aa6b4cdefbdaa69b27e402d
Why not throw a `std::ios_base::failure()` here? From what I can tell, we'd never expect to get back a negative error value.
π¬ achow101 commented on pull request "test: refactor: deduplicate legacy ECDSA signing for tx inputs":
(https://github.com/bitcoin/bitcoin/pull/28025#issuecomment-1631522931)
ACK 5cf44275c8ca8c32d238f37f717d78e9823f44c2
(https://github.com/bitcoin/bitcoin/pull/28025#issuecomment-1631522931)
ACK 5cf44275c8ca8c32d238f37f717d78e9823f44c2
π achow101 merged a pull request: "test: refactor: deduplicate legacy ECDSA signing for tx inputs"
(https://github.com/bitcoin/bitcoin/pull/28025)
(https://github.com/bitcoin/bitcoin/pull/28025)
π¬ theuni commented on issue "Use semantic analysis in lint-logs.py":
(https://github.com/bitcoin/bitcoin/issues/27825#issuecomment-1631605962)
Sure. Now that I think about it, we could just keep|copy the test suite in Core rather than|in addition to the plugin repo.
(https://github.com/bitcoin/bitcoin/issues/27825#issuecomment-1631605962)
Sure. Now that I think about it, we could just keep|copy the test suite in Core rather than|in addition to the plugin repo.
π€ jonatack reviewed a pull request: "test: cover addrv2 anchors by adding TorV3 to CAddress in messages.py"
(https://github.com/bitcoin/bitcoin/pull/27452#pullrequestreview-1525275447)
ACK a5c9e059b7f463f668fa404dfc652791c481fd95
(https://github.com/bitcoin/bitcoin/pull/27452#pullrequestreview-1525275447)
ACK a5c9e059b7f463f668fa404dfc652791c481fd95
π¬ jonatack commented on pull request "test: cover addrv2 anchors by adding TorV3 to CAddress in messages.py":
(https://github.com/bitcoin/bitcoin/pull/27452#discussion_r1260371066)
`s/anochrs/anchors/`
```suggestion
# to a peer without HasAllDesirableServiceFlags, even if present in anchors.dat.
```
(https://github.com/bitcoin/bitcoin/pull/27452#discussion_r1260371066)
`s/anochrs/anchors/`
```suggestion
# to a peer without HasAllDesirableServiceFlags, even if present in anchors.dat.
```
π¬ megumin9 commented on issue "The destructor of CCheckQueueControl may throw a exception ":
(https://github.com/bitcoin/bitcoin/issues/28033#issuecomment-1631768241)
I am sorry to get back to you late. The destructor of CCheckQueueControl will call CCheckQueueControl::Wait, then will call CCheckQueue::Wait and CCheckQueue::Loop.In Loop, under some achievable conditions, condition_variable::wait will be called. Assuming 'res', posix::pthread_cond_wait(&cond,the_mutex), is not equal to 0, condition_variable::wait will throw an exception, condition error.
(https://github.com/bitcoin/bitcoin/issues/28033#issuecomment-1631768241)
I am sorry to get back to you late. The destructor of CCheckQueueControl will call CCheckQueueControl::Wait, then will call CCheckQueue::Wait and CCheckQueue::Loop.In Loop, under some achievable conditions, condition_variable::wait will be called. Assuming 'res', posix::pthread_cond_wait(&cond,the_mutex), is not equal to 0, condition_variable::wait will throw an exception, condition error.
π¬ MarcoFalke commented on issue "The destructor of CCheckQueueControl may throw a exception ":
(https://github.com/bitcoin/bitcoin/issues/28033#issuecomment-1631879990)
Would it be possible to just link to external documentation or be more precise?
Alternative you can post a patch that compiles. What you posted above is neither a patch, nor does it compile.
(https://github.com/bitcoin/bitcoin/issues/28033#issuecomment-1631879990)
Would it be possible to just link to external documentation or be more precise?
Alternative you can post a patch that compiles. What you posted above is neither a patch, nor does it compile.
π¬ S3RK commented on pull request "Bump unconfirmed ancestor transactions to target feerate":
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1260665410)
Yes, the discount value is a function of the effective fee rate, therefore it has to be taken into account in waste calculation. The problem is that GetSelectionWaste doesn't use SelectionResult.GetEffectiveValue() which already accounts for bump fee discoun
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1260665410)
Yes, the discount value is a function of the effective fee rate, therefore it has to be taken into account in waste calculation. The problem is that GetSelectionWaste doesn't use SelectionResult.GetEffectiveValue() which already accounts for bump fee discoun