Skip to content

Use Varint serialization#299

Open
kcalvinalvin wants to merge 3 commits intomit-dci:masterfrom
kcalvinalvin:varint
Open

Use Varint serialization#299
kcalvinalvin wants to merge 3 commits intomit-dci:masterfrom
kcalvinalvin:varint

Conversation

@kcalvinalvin
Copy link
Copy Markdown
Member

Things done:

  1. Commit accumulator: Use varints for serialization imports the wire package and uses the varint serialization functions for batchproof.
  2. Commit accumulator/undo: Add serialization for undoblocks adds undoblock serialization/deserialization (uses varint) and exports UndoBlockto expose the serialization functions.
  3. Commit go.mod, go.sum: Switch to the btcd++ branch in utcd now imports utcd instead of btcd. However, it only imports the btcd++ branch as that branch doesn't have any utreexo specific packages, therefore not creating any dependency cycles.

This PR doesn't produce backwards compatible proofs as the serialization is different.

Change batchproof serialization to use varints, saving space for disk
and bandwidth for network.
UndoBlocks need to be saved and re-accessed whenever there is a reorg
with the Bitcoin blockchain. Serialization and Deserialization is
added so that these blocks can be saved and fetched from disk.

UndoBlocks are also now exported so that callers will be able to access
the new Serialize() and Deserialize() methods.
utcd has many optimizations that btcd doesn't have. Switching to utcd
speeds things up drastically for the binaries in cmd/.

We won't be pointing to the branch utreexo in utcd as breaking changes
to the accumulator package will result in utcd failing to build. This
makes changes annoying to deal with.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant