Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Varint serialization #299

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

kcalvinalvin
Copy link
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