Switch UTXOIdentifier back to being (tx_hash, output_index) #451
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts UTXOIdentifier to being (tx_hash, output_index), enabling bootstrap from snapshot.
Work In Progress!
Description
Reverts UTXOIdentifier - and hence storage key in UTXOState - to being tx hash based, removing memory optimisation through UTXORegistry in TxUnpacker (which has been removed).
This also means the REST queries need to look up TX hashes to get block hashes and tx indexes within the block - there is a new GetBlockHashesAndIndexOfTransactionHashes query to do this, but it needs implementing. I'm not sure if ChainStore has the indexes to do this.
Related Issue(s)
Fixes #448
How was this tested?
Not yet tested - multiple test builds broken at the moment
Checklist
Impact / Side effects
The memory use of AddressState will explode with this change - requires either spilling to disk and/or using CompactUTxOIdentifier internally and then a restituted GetUTXOHashes to look up as before.
Reviewer notes / Areas to focus