Integrates maintaining the UTXO Commitment in the CCoinView classes and LevelDB.
Exposes the maintained commitment in gettxoutsetinfo as "commitment" and exposes a calculated on-the-fly commitment as "commitment_calculated"
Depends on D1074
tomtomtom7 |
Restricted Owners Package | (Owns No Changed Paths) |
Restricted Project |
Integrates maintaining the UTXO Commitment in the CCoinView classes and LevelDB.
Exposes the maintained commitment in gettxoutsetinfo as "commitment" and exposes a calculated on-the-fly commitment as "commitment_calculated"
Depends on D1074
Two RPC tests included
Lint OK |
No Unit Test Coverage |
Buildable 2032 | |
Build 2212: Bitcoin ABC Buildbot (legacy) | |
Build 2211: arc lint + arc unit |
Still WIP, But much better version.
This holds back maintaining the UTXO commitment during IBD,
and picks it up after.
It also adds a field to the gettxoutsetinfo rpc
src/coins.cpp | ||
---|---|---|
328 | If it's ever the case that parent != nullptr but cacheUtxoCommitDelta == nullptr, there might be a memory leak. Also the caller of this method should not have to perform a delete. I think it would be better to work with a unique_ptr in this case. |
src/coins.cpp | ||
---|---|---|
328 | Probably best to log an error for the specific case that you described. |
src/validation.cpp | ||
---|---|---|
2661 | mainting -> maintaining | |
test/functional/utxocommit.py | ||
7 | remove the empty comment line | |
30 | Is this a comment? seems weird to have a string floating in the middle of the test like this | |
68 | Appending the "0x" should be unnecessary. You can use int(self.nodes[0].getbestblockhash(), 16) for tip instead. | |
108 | This comment is describing what (which I can get from the code) instead of why (which is not obvious at first glance) |
Trying to clear off the review queue for a bit since this is quite old. Please rebase this on master when you want a review again.