π¬ Xekyo commented on pull request "Bump unconfirmed ancestor transactions to target feerate":
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251192852)
Thanks for catching this. Fixed.
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251192852)
Thanks for catching this. Fixed.
π¬ Xekyo commented on pull request "Bump unconfirmed ancestor transactions to target feerate":
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251203025)
Moved all comments about what the tests do to the implementations of the tests
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251203025)
Moved all comments about what the tests do to the implementations of the tests
π¬ Xekyo commented on pull request "Bump unconfirmed ancestor transactions to target feerate":
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251204807)
Yeah, youβre right. Removed duplicate check.
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251204807)
Yeah, youβre right. Removed duplicate check.
π¬ Xekyo commented on pull request "Bump unconfirmed ancestor transactions to target feerate":
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251230645)
Oops, I only fixed the rename in the next commit. Fixing.
(https://github.com/bitcoin/bitcoin/pull/26152#discussion_r1251230645)
Oops, I only fixed the rename in the next commit. Fixing.
π€ mzumsande reviewed a pull request: "Rework validation logic for assumeutxo"
(https://github.com/bitcoin/bitcoin/pull/27746#pullrequestreview-1511762976)
Code Review ACK 03dfe04075668aa3b99a5d6d68adfcecffca0593
I reviewed the code again (didn't look that deep into the test changes), and did some manual testing.
> Not sure what's up with the arm failure, but tests pass for me locally.
Pretty sure it's unrelated, same thing just happened on master: https://github.com/bitcoin/bitcoin/runs/14733904119 (some discussion in #27988)
(https://github.com/bitcoin/bitcoin/pull/27746#pullrequestreview-1511762976)
Code Review ACK 03dfe04075668aa3b99a5d6d68adfcecffca0593
I reviewed the code again (didn't look that deep into the test changes), and did some manual testing.
> Not sure what's up with the arm failure, but tests pass for me locally.
Pretty sure it's unrelated, same thing just happened on master: https://github.com/bitcoin/bitcoin/runs/14733904119 (some discussion in #27988)
π¬ mzumsande commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1251271660)
Now `ChainstateManager` has `ActiveSnapshotBase()` and `GetSnapshotBaseBlock()` which, as far as I understand it, do the same thing except for the caching.
Would it have been possible to add the caching to the existing `GetSnapshotBaseBlock()` instead?
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1251271660)
Now `ChainstateManager` has `ActiveSnapshotBase()` and `GetSnapshotBaseBlock()` which, as far as I understand it, do the same thing except for the caching.
Would it have been possible to add the caching to the existing `GetSnapshotBaseBlock()` instead?
π¬ ajtowns commented on pull request "Allow configuring target block time for a signet":
(https://github.com/bitcoin/bitcoin/pull/27446#issuecomment-1619186257)
> @ajtowns I dont think we're gonna agree on this so whatever.
I don't understand why you're ignoring an approach that seems to do a better job of getting what you want (instant channels, without even having to wait a minute), and can work on mainnet (so won't end up developing a UX that's only conceivably good for demos and doesn't work with real money), and is already supported by CLN, LND and LDK. If you don't want to explain, or even just figure "if it's dumb but it works that's good eno
...
(https://github.com/bitcoin/bitcoin/pull/27446#issuecomment-1619186257)
> @ajtowns I dont think we're gonna agree on this so whatever.
I don't understand why you're ignoring an approach that seems to do a better job of getting what you want (instant channels, without even having to wait a minute), and can work on mainnet (so won't end up developing a UX that's only conceivably good for demos and doesn't work with real money), and is already supported by CLN, LND and LDK. If you don't want to explain, or even just figure "if it's dumb but it works that's good eno
...
π ryanofsky approved a pull request: "Rework validation logic for assumeutxo"
(https://github.com/bitcoin/bitcoin/pull/27746#pullrequestreview-1505486978)
Partial code review ACK 03dfe04075668aa3b99a5d6d68adfcecffca0593. I've looked in detail at almost all of this except for tests. It seems like a big improvement and I haven't found any real issues at all. Am planning to review more soon.
(https://github.com/bitcoin/bitcoin/pull/27746#pullrequestreview-1505486978)
Partial code review ACK 03dfe04075668aa3b99a5d6d68adfcecffca0593. I've looked in detail at almost all of this except for tests. It seems like a big improvement and I haven't found any real issues at all. Am planning to review more soon.
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246753697)
In commit "Move block-arrival information / preciousblock counters to ChainstateManager" (0dbc5805ca4371b7621bee0b7a553dac1a481614)
IIUC removing this line is not a change in behavior because the `nBlockSequenceId` variable was never used again after the `UnloadBlockIndex` call, outside of tests. Now there is new `ResetBlockSequenceCounters` function that tests can use to reset it separately. EDIT: Another review comment https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1243705025 als
...
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246753697)
In commit "Move block-arrival information / preciousblock counters to ChainstateManager" (0dbc5805ca4371b7621bee0b7a553dac1a481614)
IIUC removing this line is not a change in behavior because the `nBlockSequenceId` variable was never used again after the `UnloadBlockIndex` call, outside of tests. Now there is new `ResetBlockSequenceCounters` function that tests can use to reset it separately. EDIT: Another review comment https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1243705025 als
...
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246740699)
In commit "Move block-arrival information / preciousblock counters to ChainstateManager" (0dbc5805ca4371b7621bee0b7a553dac1a481614)
It would be nice to have a documentation comment for this function saying what it is for, especially since it is only called in a test. If the counter values are basically arbitrary and only used for ordering, I'm not sure why if they actually ever need to be reset, or if that's just a nice thing to do?
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246740699)
In commit "Move block-arrival information / preciousblock counters to ChainstateManager" (0dbc5805ca4371b7621bee0b7a553dac1a481614)
It would be nice to have a documentation comment for this function saying what it is for, especially since it is only called in a test. If the counter values are basically arbitrary and only used for ordering, I'm not sure why if they actually ever need to be reset, or if that's just a nice thing to do?
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246815739)
In commit "test: Clear block index flags when testing snapshots" (e8168cd56c490609f59e1dc89add58b1be18b516)
This seems like a good change that makes test setup more realistic, but the could the commit message be updated to say what is motivating this change? Is it just for realism, or will a future change, or a certain kind of test depend on it?
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246815739)
In commit "test: Clear block index flags when testing snapshots" (e8168cd56c490609f59e1dc89add58b1be18b516)
This seems like a good change that makes test setup more realistic, but the could the commit message be updated to say what is motivating this change? Is it just for realism, or will a future change, or a certain kind of test depend on it?
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246833752)
In commit "Move block-arrival information / preciousblock counters to ChainstateManager" (0dbc5805ca4371b7621bee0b7a553dac1a481614)
The test seems to pass without this line, at least in this commit.
If this is needed for a future change, would be good to say that in commit message. Or if this is just done for completeness would be good to say that in a code comment.
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246833752)
In commit "Move block-arrival information / preciousblock counters to ChainstateManager" (0dbc5805ca4371b7621bee0b7a553dac1a481614)
The test seems to pass without this line, at least in this commit.
If this is needed for a future change, would be good to say that in commit message. Or if this is just done for completeness would be good to say that in a code comment.
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246822305)
In commit "test: Clear block index flags when testing snapshots" (e8168cd56c490609f59e1dc89add58b1be18b516)
Adding `BLOCK_ASSUMED_VALID` here seems surprising since I would expect `ActivateSnapshot` below to be setting `BLOCK_ASSUMED_VALID`, and comment above doesn't mention this flag. I think it would be good to drop this line or add a comment explaining why it is necessary.
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246822305)
In commit "test: Clear block index flags when testing snapshots" (e8168cd56c490609f59e1dc89add58b1be18b516)
Adding `BLOCK_ASSUMED_VALID` here seems surprising since I would expect `ActivateSnapshot` below to be setting `BLOCK_ASSUMED_VALID`, and comment above doesn't mention this flag. I think it would be good to drop this line or add a comment explaining why it is necessary.
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246844224)
In commit "Move block-storage-related logic to ChainstateManager" (034f920d1755cff752d46b089ad37bdd703bf896)
Note: This change to the `CheckBlockIndex()` call is temporary and will revert back in later commit fb9c405506d6cfb6896e21b79789d7b6e638f6f2 "Move CheckBlockIndex() from Chainstate to ChainstateManager" when it becomes a `ChainstateManager` method.
There is not a change in behavior here in this commit, because in both places where
`Chainstate::AcceptBlock` was called previously (in
...
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246844224)
In commit "Move block-storage-related logic to ChainstateManager" (034f920d1755cff752d46b089ad37bdd703bf896)
Note: This change to the `CheckBlockIndex()` call is temporary and will revert back in later commit fb9c405506d6cfb6896e21b79789d7b6e638f6f2 "Move CheckBlockIndex() from Chainstate to ChainstateManager" when it becomes a `ChainstateManager` method.
There is not a change in behavior here in this commit, because in both places where
`Chainstate::AcceptBlock` was called previously (in
...
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246903052)
In commit "Fix initialization of setBlockIndexCandidates when working with multiple chainstates" (c2bc5cfd9977838af334844675d77090fe9c3c74)
Can add a comment here explaining the logic? I guess the `pindex == GetSnapshotBaseBlock()` case needs to be a special case because the snapshot block may not have transactions?
Maybe also would be more efficient to call `ActiveSnapshotBase` instead of `GetSnapshotBaseBlock` here. I think I would move the commit introducing the `ActiveSnapshotBase` met
...
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246903052)
In commit "Fix initialization of setBlockIndexCandidates when working with multiple chainstates" (c2bc5cfd9977838af334844675d77090fe9c3c74)
Can add a comment here explaining the logic? I guess the `pindex == GetSnapshotBaseBlock()` case needs to be a special case because the snapshot block may not have transactions?
Maybe also would be more efficient to call `ActiveSnapshotBase` instead of `GetSnapshotBaseBlock` here. I think I would move the commit introducing the `ActiveSnapshotBase` met
...
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246842096)
In commit "Move block-storage-related logic to ChainstateManager" (034f920d1755cff752d46b089ad37bdd703bf896)
Notes: It seems logical to call `GetAll` for all chainstates and let the `TryAddBlockIndexCandidate` and `FindMostWorkChain` functions figure out how to use the block and which chain to attach it to.
There is a change in behavior here if there are multiple chainstates, because previously this would only add blocks to `setBlockIndexCandidates` for the active chain, and now it will ad
...
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246842096)
In commit "Move block-storage-related logic to ChainstateManager" (034f920d1755cff752d46b089ad37bdd703bf896)
Notes: It seems logical to call `GetAll` for all chainstates and let the `TryAddBlockIndexCandidate` and `FindMostWorkChain` functions figure out how to use the block and which chain to attach it to.
There is a change in behavior here if there are multiple chainstates, because previously this would only add blocks to `setBlockIndexCandidates` for the active chain, and now it will ad
...
π¬ ryanofsky commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246868905)
In commit "Move block-storage-related logic to ChainstateManager" (034f920d1755cff752d46b089ad37bdd703bf896)
Do you think it would be good if the `IsInitialBlockDownload` method were moved to `ChainstateManager`. Is there any place it should be actually called on the background chainstate rather than the active chainstate? Could add a TODO comment if IsInitialBlockDownload method should move like other methods are moving.
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246868905)
In commit "Move block-storage-related logic to ChainstateManager" (034f920d1755cff752d46b089ad37bdd703bf896)
Do you think it would be good if the `IsInitialBlockDownload` method were moved to `ChainstateManager`. Is there any place it should be actually called on the background chainstate rather than the active chainstate? Could add a TODO comment if IsInitialBlockDownload method should move like other methods are moving.
π¬ benthecarman commented on pull request "Allow configuring target block time for a signet":
(https://github.com/bitcoin/bitcoin/pull/27446#issuecomment-1619190944)
The wallet that I am working on supports and uses 0-conf channels. That doesn't negate the fact that shorter block times are useful.
(https://github.com/bitcoin/bitcoin/pull/27446#issuecomment-1619190944)
The wallet that I am working on supports and uses 0-conf channels. That doesn't negate the fact that shorter block times are useful.
π¬ Xekyo commented on pull request "Bump unconfirmed ancestor transactions to target feerate":
(https://github.com/bitcoin/bitcoin/pull/26152#issuecomment-1619210922)
> Reading through recent comments, it seems somewhat expected that this version isn't yet fully working, let me know when you want me to run my tests again!
Sorry about that, I was a bit in a rush on Friday. Iβve fixed a number of issues, if this latest pushβs checks turn up green, it might be more fruitful to try now.
(https://github.com/bitcoin/bitcoin/pull/26152#issuecomment-1619210922)
> Reading through recent comments, it seems somewhat expected that this version isn't yet fully working, let me know when you want me to run my tests again!
Sorry about that, I was a bit in a rush on Friday. Iβve fixed a number of issues, if this latest pushβs checks turn up green, it might be more fruitful to try now.
π¬ mzumsande commented on pull request "test: Use same timeout for all index sync":
(https://github.com/bitcoin/bitcoin/pull/27988#issuecomment-1619218007)
> Yeah, should be caused by an upstream CI change. I guess there should be no risk in changing 120s to 300s, even potentially fixing the issue you see.
Saw it on master now too: https://github.com/bitcoin/bitcoin/runs/14733904119
I think the reason why this didn't fail before is that the `coinstatsindex_unclean_shutdown` used `GetTime` / `NodeClock` instead of `SteadyClock` before this PR. So since mocktime was used (which doesn't change after the 100 blocks are mined), the timeout was
...
(https://github.com/bitcoin/bitcoin/pull/27988#issuecomment-1619218007)
> Yeah, should be caused by an upstream CI change. I guess there should be no risk in changing 120s to 300s, even potentially fixing the issue you see.
Saw it on master now too: https://github.com/bitcoin/bitcoin/runs/14733904119
I think the reason why this didn't fail before is that the `coinstatsindex_unclean_shutdown` used `GetTime` / `NodeClock` instead of `SteadyClock` before this PR. So since mocktime was used (which doesn't change after the 100 blocks are mined), the timeout was
...