utreexo
utreexo copied to clipboard
Match Bitcoin Core utxo serialization
We should change the way we serialize utxos to match Bitcoin Core:
https://github.com/bitcoin/bitcoin/blob/398dd678338971d2189934713c83c184742f293f/src/coins.h#L60-L65
vs ours:
https://github.com/mit-dci/utreexo/blob/2faac6f654ebea7f581f6bd21689e4d271c6a71c/btcacc/leaf.go#L75-L82
This has several benfits:
- its easier to make the utcd node and Bitcoin Core bridge i am working on compatible.
- saves bandwidth because of the compression that core uses
Sounds good but that does require varint encoding and unfortunately we can't import from utcd/btcd because that results in import cycles.
Two ways of going about this:
1: Move package btcacc/ into utcd/btcd 2: Copy over varint code from utcd/btcd
Requesting input from @adiabat