ryanofsky
commented at 3:10 pm on December 9, 2016:
member
Change CCoinsViewCache::Cursor() method to return a cursor yielding the latest CCoins entries, instead of just previous entries prior to the last cache flush.
The CCoinsViewCache::Cursor method is not currently used. This change just enables new features that rely on scanning the UXTO set to work correctly (for example #9152, which adds a sweepprivkeys RPC, and #9137, which improves handling of imported keys for nodes with pruning enabled.)
sipa
commented at 0:38 am on December 10, 2016:
member
Concept ACK
fanquake added the label
UTXO Db and Indexes
on Dec 14, 2016
laanwj added this to the milestone 0.15.0
on Feb 6, 2017
ryanofsky force-pushed
on Jun 2, 2017
laanwj
commented at 2:10 pm on June 6, 2017:
member
The CCoinsViewCache::Cursor method is not currently used
GetUTXOStats uses it.
Currently it makes use of the fact that it iterates over the current database instead of the in-memory data.
Leveldb can do an iteration in the background, as it makes a snapshot.
This change means that it can no longer run in the background, and needs the appropriate lock on pCoinsTip to prevent concurrent changes.
My hope is that at some point we can switch to a rolling UTXO hash (see my MuHash PR, and mailinglist thread), so gettxoutsetinfo does not need to interate over the set anymore but compute everything using continuously updated stats.
It’s probably better to not merge this until we can rid of the necessity to iterate over the entire set in gettxoutsetinfo. And when we do, maybe this PR isn’t needed anymore?
ryanofsky
commented at 5:30 pm on June 7, 2017:
member
Probably this PR isn’t needed unless #9152 or #9137 or something similar will be added. But I do think the fact that CCCoinsViewCache::Cursor() returns a cursor that doesn’t actually iterate over the latest data in the view is confusing and could lead to bugs. Opened #10550 for a more direct solution to that problem.
Make CCoinsViewCache::Cursor() return latest data
Change CCoinsViewCache::Cursor() method to return a cursor yielding the latest
CCoins entries, instead of just previous entries prior to the last cache flush.
The CCoinsViewCache::Cursor method is not currently used. This change just
enables new features that rely on scanning the UXTO set to work correctly (for
example https://github.com/bitcoin/bitcoin/pull/9152, which adds a
sweepprivkeys RPC, and https://github.com/bitcoin/bitcoin/pull/9137, which
improves handling of imported keys for nodes with pruning enabled.)
095c2e7e78
ryanofsky force-pushed
on Jun 12, 2017
sipa
commented at 6:40 pm on June 12, 2017:
member
I think #10550 is sufficient for now, and we won’t need this until there is an actual use for iterating the UTXO set in a non-well-defined order?
ryanofsky
commented at 7:00 pm on June 12, 2017:
member
All right, I’m not really working on #9137 anyway, will close.
ryanofsky closed this
on Jun 12, 2017
ryanofsky
commented at 11:20 am on December 15, 2017:
member
jonasschnelli
commented at 6:28 am on January 17, 2018:
contributor
This is definitively useful (could lead to removing the state flush in #12196).
@ryanofsky: Would be great if you’d like to reopen this (need probably rebase).
MarcoFalke
commented at 1:15 pm on April 28, 2020:
member
Should this be marked “Up for grabs”? cc @ryanofsky
MarcoFalke removed this from the milestone 0.15.0
on Apr 28, 2020
ryanofsky
commented at 2:39 pm on April 28, 2020:
member
Should this be marked “Up for grabs”? cc @ryanofsky
I don’t know if the PR is up for grabs, more like uses of the PR are up for grabs. My motivation for this PR was let to wallet scan utxo set instead of blocks, and be able to get wallet balance if not full transaction history with a pruned node. Sipa, laanwj, and jonas above and luke in #9152 had other potential uses. The PR itself is simple and probably very easy to rebase. Just doesn’t make sense without a use-case
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-21 21:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me