mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-25 22:39:13 +02:00
Merge bitcoin/bitcoin#29612: rpc: Optimize serialization and enhance metadata of dumptxoutset output
542e13b293rpc: Enhance metadata of the dumptxoutset output (Fabian Jahr)4d8e5edbaaassumeutxo: Add documentation on dumptxoutset serialization format (Fabian Jahr)c14ed7f384assumeutxo: Add test for changed coin size value (Fabian Jahr)de95953d87rpc: Optimize serialization disk space of dumptxoutset (Fabian Jahr) Pull request description: The second attempt at implementing the `dumptxoutset` space optimization as suggested in #25675. Closes #25675. This builds on the work done in #26045, addresses open feedback, adds some further improvements (most importantly usage of compact size), documentation, and an additional test. The [original snapshot at height 830,000](https://github.com/bitcoin/bitcoin/pull/29551) came in at 10.82 GB. With this change, the same snapshot is 8.94 GB, a reduction of 17.4%. This also enhances the metadata of the output file and adds the following data to allow for better error handling and make future upgrades easier: - A newly introduced utxo set magic - A version number - The network magic - The block height ACKs for top commit: achow101: ACK542e13b293TheCharlatan: Re-ACK542e13b293theStack: ACK542e13b293Tree-SHA512: 0825d30e5c3c364062db3c6cbca4e3c680e6e6d3e259fa70c0c2b2a7020f24a47406a623582040988d5c7745b08649c31110df4c10656aa25f3f27eb35843d99
This commit is contained in:
@@ -226,10 +226,13 @@ struct SnapshotTestSetup : TestChain100Setup {
|
||||
// A UTXO is missing but count is correct
|
||||
metadata.m_coins_count -= 1;
|
||||
|
||||
COutPoint outpoint;
|
||||
Txid txid;
|
||||
auto_infile >> txid;
|
||||
// coins size
|
||||
(void)ReadCompactSize(auto_infile);
|
||||
// vout index
|
||||
(void)ReadCompactSize(auto_infile);
|
||||
Coin coin;
|
||||
|
||||
auto_infile >> outpoint;
|
||||
auto_infile >> coin;
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user