8.4 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Rust's notion of Semantic Versioning.
Unreleased
[0.6.1] - 2025-01-30
Changed
- Update to
incrementalmerkletree 0.8.1
,incrementalmerkletree-testing 0.3.0
. shardtree::BatchInsertionResult.max_insert_position
now has typePosition
instead ofOption<Position>
(all APIs returnOption<BatchInsertionResult>
and useNone
at that level to represent "no leaves inserted").shardtree::LocatedTree::from_parts
now returnsOption<Self>
(returningNone
if the providedAddress
andTree
are inconsistent).
[0.6.0] - 2025-01-28
YANKED due to dependency incompatibilities, please use shardtree 0.6.1
instead.
[0.5.0] - 2024-10-04
This release includes a significant refactoring and rework of several methods
of the shardtree::ShardTree
type and the shardtree::store::ShardStore
trait. Please read the notes for this release carefully as the semantics of
important methods have changed. These changes may require changes to clients of
this crate; in particular, the existence of a checkpoint is required for all
witnessing and rewinding operations.
Added
shardtree::store::ShardStore::for_each_checkpoint
shardtree::ShardTree::truncate_to_checkpoint_depth
. This replaces theShardTree::truncate_to_depth
method, with modified semantics such that the providedcheckpoint_depth
argument is now treated strictly as a zero-based index into the checkpoints applied to the tree, in reverse order of checkpoint identifier. It is no longer possible to truncate the tree if no checkpoints have been created.shardtree::ShardTree::truncate_to_checkpoint
replacesShardTree::truncate_removing_checkpoint
. Instead of removing the checkpoint, this replacement method removes all state from the tree related to leaves having positions greater than the checkpointed position, but unliketruncate_removing_checkpoint
it leaves the checkpoint itself in place.shardtree::store::ShardStore::truncate_shards
replacesShardStore::truncate
. Instead of taking anAddress
and requiring that implementations impose additional runtime restriction on the level of that address, the replacement method directly takes a shard index.ShardStore::truncate_truncate_checkpoints_retaining
replacesShardStore::truncate_checkpoints
. Instead of removing the checkpoint having the specified identifier, the associated checkpoint should be retained but any additional metadata stored with the checkpoint, such as information about marks removed after the creation of the checkpoint, should be deleted.
Changed
- MSRV is now 1.64
shardtree::ShardTree
:ShardTree::max_leaf_position
now takes itscheckpoint_depth
argument asOption<usize>
instead ofusize
. The semantics of this method are now changed such that if a checkpoint depth is provided, it is now treated strictly as a zero-based index into the checkpoints of the tree in reverse order of checkpoint identifier, and an error is returned if no checkpoint exists at the given index. ANone
value passed for this argument causes it to return the maximum position among all leaves added to the tree.ShardTree::root_at_checkpoint_id
androot_at_checkpoint_id_caching
now each return the computed root as an optional value, returningOk(None)
if the checkpoint corresponding to the requested identifier does not exist.ShardTree::root_at_checkpoint_depth
androot_at_checkpoint_depth_caching
now take theircheckpoint_depth
argument asOption<usize>
instead ofusize
. The semantics of these methods are now changed such that if a checkpoint depth is provided, it is now treated strictly as a zero-based index into the checkpoints of the tree in reverse order of checkpoint identifier, and an error is returned if no checkpoint exists at the given index. ANone
value passed for this argument causes it to return the root computed over all of the leaves in the tree. These methods now each return the computed root as an optional value, returningOk(None)
if no checkpoint exist at the requested checkpoint depth.ShardTree::witness_at_checkpoint_id
andwitness_at_checkpoint_id_caching
now each return the computed witness as an optional value, returningOk(None)
if the checkpoint corresponding to the requested identifier does not exist.ShardTree::witness_at_checkpoint_depth
andwitness_at_checkpoint_depth_caching
now each return the computed witness as an optional value, returningOk(None)
if no checkpoint was available at the given checkpoint depth. The semantics of this method are now changed such that if a checkpoint depth is provided, it is now treated strictly as a zero-based index into the checkpoints of the tree in reverse order of checkpoint identifier. IT IS NO LONGER POSSIBLE TO COMPUTE A WITNESS WITHOUT A CHECKPOINT BEING PRESENT IN THE TREE.
shardtree::store::ShardStore
:- The semantics of
ShardStore::get_checkpoint_at_depth
HAVE CHANGED WITHOUT CHANGES TO THE METHOD SIGNATURE. Thecheckpoint_depth
argument to this method is now treated strictly as a zero-based index into the checkpoints of the tree in reverse order of checkpoint identifier. Previously, this method always returnedNone
forcheckpoint_depth == 0
, andcheckpoint_depth
was otherwise treated as a 1-based index instead of a 0-based index.
- The semantics of
Removed
shardtree::ShardTree::truncate_to_depth
has been replaced byShardTree::truncate_to_checkpoint_depth
shardtree::ShardTree::truncate_removing_checkpoint
has been replaced byShardTree::truncate_to_checkpoint
shardtree::store::ShardStore::truncate
has been replaced byShardStore::truncate_shards
shardtree::store::ShardStore::truncate_checkpoints
has been replaced byShardStore::truncate_checkpoints_retaining
[0.4.0] - 2024-08-12
This is a bugfix release that fixes a couple of subtle problems related to
pruning in the presence of inserted Frontier
nodes. See the Removed
and
Fixed
sections below for additional details.
Added
shardtree::tree::Tree::{is_leaf, map, try_map, empty_pruned}
shardtree::tree::LocatedTree::{map, try_map}
shardtree::prunable::PrunableTree::{has_computable_root, is_full}
shardtree::prunable::LocatedPrunableTree::{max_position}
Changed
- Updated to use
incrementalmerkletree
v0.6.
Removed
shardtree::tree::LocatedTree::max_position
did not behave correctly regarding annotated parent nodes. UseLocatedPrunableTree::max_position
instead.shardtree::tree::Tree::is_complete
was somewhat misleadingly named, asNil
nodes that were inserted as a consequence of insertion after pruning could be interpreted as rendering the tree incomplete. UsePrunableTree::has_computable_root
instead to determine whether it is possible to compute the root of a tree.
Fixed
- Fixes an error that could occur if an inserted
Frontier
node was interpreted as a node that had actually had its value observed as though it had been inserted using the ordinary tree insertion methods. - Fixes an error in an internal method that could result in subtree root
annotation data being discarded when pruning a
Parent
node havingNil
nodes for both its left and right children.
[0.3.2] - 2024-12-09
- Replaces
unwrap
calls withexpect
calls & documents panics.
[0.3.1] - 2024-04-03
Fixed
- Fixes a missing transitive dependency when using the
test-dependencies
feature flag.
[0.3.0] - 2024-03-25
Added
ShardTree::{store, store_mut}
ShardTree::insert_frontier
Changed
shardtree::error::InsertionError
has new variantMarkedRetentionInvalid
[0.2.0] - 2023-11-07
Added
ShardTree::{root_at_checkpoint_id, root_at_checkpoint_id_caching}
ShardTree::{witness_at_checkpoint_id, witness_at_checkpoint_id_caching}
Changed
ShardTree::root_at_checkpoint
andShardTree::root_at_checkpoint_caching
have been renamed toroot_at_checkpoint_depth
androot_at_checkpoint_depth_caching
, respectively.ShardTree::witness
andShardTree::witness_caching
have been renamed towitness_at_checkpoint_depth
andwitness_at_checkpoint_depth_caching
, respectively.
[0.1.0] - 2023-09-08
Initial release!