chaintope / tapyrus-core

Tapyrus Core
MIT License
46 stars 17 forks source link

Add UTXO snapshot creation #290

Open azuchi opened 10 months ago

azuchi commented 10 months ago

Introducing the dumptxoutset RPC added to Bitcoin Core.

https://github.com/bitcoin/bitcoin/pull/16899

Naviabheeman commented 7 months ago

In bitcoin the snapshot metadata contains base_blockhash and coins_count. In Tapyrus it would be necessary to store networkid and whether it is prod or dev mode.

So these are the meta data stored:

azuchi commented 7 months ago

mode - prod/dev

This would be unnecessary. Even in Bitcoin, snapshots do not include data that distinguishes between mainnet and testnet.

snapshot_time

Since base_blockhash is present, this is also unnecessary.

Naviabheeman commented 4 months ago

In PR #29612 from bitcoin-core ( Optimize serialization and enhance metadata of dumptxoutset output) utxo snapshot metadata is enhanced to include

  1. version
  2. network magic bytes
  3. block height

In Tapyrus version is added. Network magic bytes depend on network id. So we use network mode instead. Block height can be deduced from block hash. This is not added.