This adds a thin wrapper around `NonEmptyWitness::Frontier` that uses
the Frontier's statically known depth to be able to compute a
`MerklePath` with the same statically known depth.
The choice to use an initial checkpoint as an anchor for removals in
`unmark` operations produced an awkward situation where it was necessary
to choose a checkpoint identifier just to construct an empty tree. This
removes that decision in favor of eagerly removing data if there is no
checkpoint to tie the removal to.
The primary implementations of `ShardStore` will be constructing
owned values from an underlying persistence layer, and it is not
possible to return a reference to an owned value.
These types were previously part of the `zcash_primitives` crate and are
being included here to provide a migration path for when these types are
removed from `zcash_primitives`.
The structure of the `incrementalmerkletree` and `bridgetree` types has
not historically been stable, and as such it is not appropriate to
automatically derive serialization for these types.
that caused `Position::root_level` to return the wrong value, as a result
of assuming that `usize` is 64 bits.
fixes#56
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This removes the `mark` function from the `tree` interface, in favor
of always appending nodes as marked, as that's what's needed in
practice, rather than the ability to mutably mark the latest position at
arbitrary states of the tree.
This removal does mean that a few patterns of interleaved mark and
checkpoint operations are no longer being tested in the shared test
suite; however, such interleaving of operations is not something that
we should need to support anyway.
This change exposed an inconsistency in how `BridgeTree` and
`CompleteTree` were tracking `Mark` operations, which has now also been
fixed.
The behavior of the "unmark" operation has been simplified, such that it
now ensures that a marked node will be made eligible for garbage
collection when the checkpoint for the tree state in which the mark was
forgotten rolls off the back of the checkpoint queue.
The transitive dependency we have on `unarray` is forcing this update.
Also, update CI actions to eliminate dependencies on the unmaintained
`actions-rs` Rust CI tools.