💬 TheCharlatan commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849072214)
Thanks, taken.
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849072214)
Thanks, taken.
💬 TheCharlatan commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849046061)
I did not think that much about order here, but I do think having this section on the context is a good idea. The key is that the user is not required to instantiate the context for using some parts of the library (and I think this is important enough to not just make it a footnote). The user-instantiated context is only really required when interacting with the "stateful" endpoints. Besides, it may be relevant to know what the library is instantiating internally in case there is some sort of co
...
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849046061)
I did not think that much about order here, but I do think having this section on the context is a good idea. The key is that the user is not required to instantiate the context for using some parts of the library (and I think this is important enough to not just make it a footnote). The user-instantiated context is only really required when interacting with the "stateful" endpoints. Besides, it may be relevant to know what the library is instantiating internally in case there is some sort of co
...
💬 TheCharlatan commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849072061)
Improved this a bit and good point with the more precise language.
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849072061)
Improved this a bit and good point with the more precise language.
💬 TheCharlatan commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849053726)
I think this is good the way it is now. The options get instantiated empty and may be populated by the user. The actual object only gets configured once by the options during its instantion. It can't be changed later on, so there is no concern that users could set something at the wrong time. Having to set options as arguments in their creation function is not a clear win in my eyes either. There are use-cases, for example using the kernel only as a data reader, where the notifications are usele
...
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849053726)
I think this is good the way it is now. The options get instantiated empty and may be populated by the user. The actual object only gets configured once by the options during its instantion. It can't be changed later on, so there is no concern that users could set something at the wrong time. Having to set options as arguments in their creation function is not a clear win in my eyes either. There are use-cases, for example using the kernel only as a data reader, where the notifications are usele
...
💬 TheCharlatan commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849037936)
Similarly to how the context is passed to the other chainman related functions, it is there to guarantee that it is still around when destroying the chainman. The reason for this is that there may be error notification callbacks issued during destruction.
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849037936)
Similarly to how the context is passed to the other chainman related functions, it is there to guarantee that it is still around when destroying the chainman. The reason for this is that there may be error notification callbacks issued during destruction.
💬 TheCharlatan commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849036598)
Thanks, I think it is good to get these little things right.
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849036598)
Thanks, I think it is good to get these little things right.
💬 TheCharlatan commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849082933)
See my [comment](https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849046061).
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849082933)
See my [comment](https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849046061).
💬 TheCharlatan commented on pull request "Drop script_pub_key arg from createNewBlock":
(https://github.com/bitcoin/bitcoin/pull/31318#issuecomment-2486803884)
Re https://github.com/bitcoin/bitcoin/pull/31318#issuecomment-2485792072
Thank you for spelling this out @Sjors.
Concept ACK
(https://github.com/bitcoin/bitcoin/pull/31318#issuecomment-2486803884)
Re https://github.com/bitcoin/bitcoin/pull/31318#issuecomment-2485792072
Thank you for spelling this out @Sjors.
Concept ACK
💬 adamandrews1 commented on issue "Feature request: Backup of datadir state":
(https://github.com/bitcoin/bitcoin/issues/31324#issuecomment-2486838594)
If this goes forward, I think the backup folder path should be configurable and should have a default path outside the datadir.
Default would be disabled.
I don't see the need to keep two backup files. The backup operation should be atomic and replace the old backup file. If it fails, the old backup file should remain undisturbed.
I think API should be in terms of block height.
`-autobackup=100` would attempt to re-write the backup on new block discovery if the new block has height > 100 fro
...
(https://github.com/bitcoin/bitcoin/issues/31324#issuecomment-2486838594)
If this goes forward, I think the backup folder path should be configurable and should have a default path outside the datadir.
Default would be disabled.
I don't see the need to keep two backup files. The backup operation should be atomic and replace the old backup file. If it fails, the old backup file should remain undisturbed.
I think API should be in terms of block height.
`-autobackup=100` would attempt to re-write the backup on new block discovery if the new block has height > 100 fro
...
👍 theStack approved a pull request: "descriptor: Move filling of keys from `DescriptorImpl::MakeScripts` to `PubkeyProvider::GetPubKey`"
(https://github.com/bitcoin/bitcoin/pull/31243#pullrequestreview-2446762914)
re-ACK 186bc75985a0afa96eba3c5bfea09e22fe3ec2c8 🗒️
(https://github.com/bitcoin/bitcoin/pull/31243#pullrequestreview-2446762914)
re-ACK 186bc75985a0afa96eba3c5bfea09e22fe3ec2c8 🗒️
🤔 jonatack reviewed a pull request: "Fuzz: extend CConnman tests"
(https://github.com/bitcoin/bitcoin/pull/28584#pullrequestreview-2446770519)
utACK c97d49628a78aac9a65f2bd1ddc733b0b425090b
(https://github.com/bitcoin/bitcoin/pull/28584#pullrequestreview-2446770519)
utACK c97d49628a78aac9a65f2bd1ddc733b0b425090b
💬 stickies-v commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849132153)
Sorry, I forgot to include the diff which updates the macro (and 1 instance to show it compiles):
<details>
<summary>git diff on 6c9121f790</summary>
```diff
diff --git a/src/kernel/bitcoinkernel.h b/src/kernel/bitcoinkernel.h
index 9e6bf127db..67248349e2 100644
--- a/src/kernel/bitcoinkernel.h
+++ b/src/kernel/bitcoinkernel.h
@@ -31,9 +31,9 @@
#define BITCOINKERNEL_WARN_UNUSED_RESULT
#endif
#if !defined(BITCOINKERNEL_BUILD) && defined(__GNUC__) && BITCOINKERNEL_GNUC_PREREQ(3,
...
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r1849132153)
Sorry, I forgot to include the diff which updates the macro (and 1 instance to show it compiles):
<details>
<summary>git diff on 6c9121f790</summary>
```diff
diff --git a/src/kernel/bitcoinkernel.h b/src/kernel/bitcoinkernel.h
index 9e6bf127db..67248349e2 100644
--- a/src/kernel/bitcoinkernel.h
+++ b/src/kernel/bitcoinkernel.h
@@ -31,9 +31,9 @@
#define BITCOINKERNEL_WARN_UNUSED_RESULT
#endif
#if !defined(BITCOINKERNEL_BUILD) && defined(__GNUC__) && BITCOINKERNEL_GNUC_PREREQ(3,
...
⚠️ pbies opened an issue: "Maximum dbcache too small"
(https://github.com/bitcoin/bitcoin/issues/31326)
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current behaviour
28.0 gives 'out of space' and hangs when dbcache is set to 16384 and full chainstate -reindex is run.
### Expected behaviour
Should -reindex complete the reindexing.
### Steps to reproduce
Have whole blockchain on disk, txindex=1, dbcache=16384 and reindex whole chainstate with command line -reindex option.
### Relevant log output
2024-11-18T17:15:31Z Cache size (16396074160) exceeds
...
(https://github.com/bitcoin/bitcoin/issues/31326)
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current behaviour
28.0 gives 'out of space' and hangs when dbcache is set to 16384 and full chainstate -reindex is run.
### Expected behaviour
Should -reindex complete the reindexing.
### Steps to reproduce
Have whole blockchain on disk, txindex=1, dbcache=16384 and reindex whole chainstate with command line -reindex option.
### Relevant log output
2024-11-18T17:15:31Z Cache size (16396074160) exceeds
...
💬 pbies commented on issue "Maximum dbcache too small":
(https://github.com/bitcoin/bitcoin/issues/31326#issuecomment-2486887198)
Seems like the issue is also here: https://github.com/bitcoin/bitcoin/issues/27599
(https://github.com/bitcoin/bitcoin/issues/31326#issuecomment-2486887198)
Seems like the issue is also here: https://github.com/bitcoin/bitcoin/issues/27599
📝 GabrieleBocchi opened a pull request: "doc: Correct PR Review Club frequency from weekly to monthly"
(https://github.com/bitcoin/bitcoin/pull/31327)
The PR Review Club is mentioned as weekly in the CONTRIBUTING.md file, but it is held monthly as per the official [Bitcoin Core PR Review Club website](https://bitcoincore.reviews/). This PR updates the documentation to reflect the correct frequency.
(https://github.com/bitcoin/bitcoin/pull/31327)
The PR Review Club is mentioned as weekly in the CONTRIBUTING.md file, but it is held monthly as per the official [Bitcoin Core PR Review Club website](https://bitcoincore.reviews/). This PR updates the documentation to reflect the correct frequency.
💬 hodlinator commented on pull request "test: Revert to random path element":
(https://github.com/bitcoin/bitcoin/pull/31317#discussion_r1849149324)
Having `g_rng_temp_path_init` be called as soon as this compilation unit is included in a binary isn't ideal but still acceptable (`BasicTestingSetup` may not be used in a given run).
Good call on removing the defunct comment before `SeedRandomForTest()` as well.
(https://github.com/bitcoin/bitcoin/pull/31317#discussion_r1849149324)
Having `g_rng_temp_path_init` be called as soon as this compilation unit is included in a binary isn't ideal but still acceptable (`BasicTestingSetup` may not be used in a given run).
Good call on removing the defunct comment before `SeedRandomForTest()` as well.
👍 hodlinator approved a pull request: "test: Revert to random path element"
(https://github.com/bitcoin/bitcoin/pull/31317#pullrequestreview-2446803872)
ACK faaaf59f71ede057b2c1d369ef8db973c2f2dbc2
Tested cherrypicking 8e5f8a4f775b93d30b86d28405886eea232cf875 on top and re-running test from https://github.com/bitcoin/bitcoin/pull/31317/files#r1848404959, confirming that the second commit does in fact make paths random.
(https://github.com/bitcoin/bitcoin/pull/31317#pullrequestreview-2446803872)
ACK faaaf59f71ede057b2c1d369ef8db973c2f2dbc2
Tested cherrypicking 8e5f8a4f775b93d30b86d28405886eea232cf875 on top and re-running test from https://github.com/bitcoin/bitcoin/pull/31317/files#r1848404959, confirming that the second commit does in fact make paths random.
💬 achow101 commented on issue "Maximum dbcache too small":
(https://github.com/bitcoin/bitcoin/issues/31326#issuecomment-2486913781)
The "hanging" is caused by the cache flushing. For a 16GB cache, that can take quite a while, depending on your hardware. The only solution is to be patient and wait for it to finish flushing. If you turn on additional debug logging, you should see consistent log lines about it flushing entries to disk.
Increasing the cache will only make that "hanging" worse as the cache will be even bigger and so even more data to be flushed at once.
#28358 drops the dbcache limit, but that won't make th
...
(https://github.com/bitcoin/bitcoin/issues/31326#issuecomment-2486913781)
The "hanging" is caused by the cache flushing. For a 16GB cache, that can take quite a while, depending on your hardware. The only solution is to be patient and wait for it to finish flushing. If you turn on additional debug logging, you should see consistent log lines about it flushing entries to disk.
Increasing the cache will only make that "hanging" worse as the cache will be even bigger and so even more data to be flushed at once.
#28358 drops the dbcache limit, but that won't make th
...
🤔 hodlinator requested changes to a pull request: "policy: ephemeral dust followups"
(https://github.com/bitcoin/bitcoin/pull/31279#pullrequestreview-2445579323)
Reviewed 5679f398e2a3ab8315d39ee674ccb8ad6a8f73c7
Especially like the refactor of `CheckEphemeralSpends()` with less surprising return/out-values.
Good to see `LIMITED_WHILE(fuzzed_data_provider.remaining_bytes() > 0` in more places than I suggested.
Suggested changes aside from inline comments:
### 03ec3f6230f440b264abe3aa42a57fdd29bd3ba3 commit message
```diff
- Implement GetDust to replace HasDust, use where appropriate
+ Move+rename GetDustIndexes -> GetDust to replace HasDu
...
(https://github.com/bitcoin/bitcoin/pull/31279#pullrequestreview-2445579323)
Reviewed 5679f398e2a3ab8315d39ee674ccb8ad6a8f73c7
Especially like the refactor of `CheckEphemeralSpends()` with less surprising return/out-values.
Good to see `LIMITED_WHILE(fuzzed_data_provider.remaining_bytes() > 0` in more places than I suggested.
Suggested changes aside from inline comments:
### 03ec3f6230f440b264abe3aa42a57fdd29bd3ba3 commit message
```diff
- Implement GetDust to replace HasDust, use where appropriate
+ Move+rename GetDustIndexes -> GetDust to replace HasDu
...
💬 hodlinator commented on pull request "policy: ephemeral dust followups":
(https://github.com/bitcoin/bitcoin/pull/31279#discussion_r1848428300)
nit: Could prefix with `out_` to communicate that they are out-reference-parameters instead of locals.
```suggestion
out_child_txid = tx->GetHash();
out_child_state.Invalid(TxValidationResult::TX_MEMPOOL_POLICY, "missing-ephemeral-spends",
```
(https://github.com/bitcoin/bitcoin/pull/31279#discussion_r1848428300)
nit: Could prefix with `out_` to communicate that they are out-reference-parameters instead of locals.
```suggestion
out_child_txid = tx->GetHash();
out_child_state.Invalid(TxValidationResult::TX_MEMPOOL_POLICY, "missing-ephemeral-spends",
```