Kris Nuttycombe
02341ece26
Ensure that `BridgeTree` state is checkpointed when constructing from a frontier.
2023-03-27 09:54:21 -06:00
Kris Nuttycombe
978da59c67
Merge branch 'bridgetree_checkpoint_id' into add_librustzcash_types
2023-03-23 16:18:32 -06:00
Kris Nuttycombe
650edd0fc7
Make `bridgetree` polymorphic in checkpoint identifier type.
2023-03-23 16:02:40 -06:00
Kris Nuttycombe
30a1b7b62b
Fix clippy complaints.
2023-03-21 12:15:22 -06:00
Kris Nuttycombe
71557cc0e3
Expose operations on `legacy-api` types required for serialization & testing.
2023-03-21 12:15:22 -06:00
Kris Nuttycombe
7cb2bdcc8f
Add legacy `CommitmentTree` and `IncrementalWitness` types.
...
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`.
2023-03-21 12:15:22 -06:00
Kris Nuttycombe
4e3c6a6378
Move frontier types from `bridgetree` to `incrementalmerkletree`
...
These types are reusable outside of the context of the `bridgetree`
crate.
2023-03-21 12:15:22 -06:00
Kris Nuttycombe
ff8095b7ed
Remove `serde` serialization & deserialization
...
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.
2023-03-21 12:15:22 -06:00
Kris Nuttycombe
3077e94301
Merge branch 'fix_premature_tracking'
2023-03-21 12:14:54 -06:00
Kris Nuttycombe
22c2c019cc
Do not eagerly track marked nodes in the current bridge.
...
This fixes a minor compatibility issue with respect to possible
deserialization of the `incrementalmerkletree-0.3.0` `MerkleBridge`
type. It is not necessary to track a marked leaf in the current
bridge *unless* the marked position is the bridge's starting position
and the prior bridge ended at a checkpoint.
2023-03-21 11:59:36 -06:00
Kris Nuttycombe
9a0e39af3a
Merge pull request #52 from nuttycom/witness_at_depth
...
Compute witnesses as of checkpoint depth rather than as of a root hash.
2023-03-07 12:11:07 -07:00
Kris Nuttycombe
1db85f347e
Merge remote-tracking branch 'upstream/master' into witness_at_depth
2023-03-03 17:06:36 -07:00
Kris Nuttycombe
0697df7d95
Fix documentation errors.
2023-03-03 17:02:03 -07:00
Greg Pfeil
42dfd970b5
Merge pull request #60 from zcash/release-0.3.1
...
Merge hotfix branch for v0.3.1 back to `master`.
2023-02-28 16:03:23 -07:00
Kris Nuttycombe
d467a6163d
Merge remote-tracking branch 'upstream/master' into release-0.3.1
2023-02-28 14:14:35 -07:00
Kris Nuttycombe
d91890d440
Release incrementalmerkletree v0.3.1
2023-02-28 14:08:25 -07:00
Kris Nuttycombe
06af5ac324
Merge pull request #57 from daira/max-altitude-bug
...
[0.3.1] Fix a bug on 32-bit platforms that caused `Position::max_altitude` to return the wrong value
2023-02-23 15:17:01 -07:00
Kris Nuttycombe
f127aab803
Merge pull request #58 from daira/root-level-bug
...
Fix a bug on 32-bit platforms that caused `Position::root_level` to return the wrong value
2023-02-23 14:54:48 -07:00
Kris Nuttycombe
34551a00a7
Pin proptest dependency to 1.0.0 to avoid unstable `unarray` dep.
2023-02-23 14:52:29 -07:00
Daira Hopwood
a44c2c7dbf
Merge branch 'max-altitude-bug'. This fixes a bug on 32-bit platforms
...
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>
2023-02-23 21:32:18 +00:00
Daira Hopwood
86f0903c46
Fix a bug on 32-bit platforms that caused `Position::max_altitude` 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>
2023-02-23 21:15:57 +00:00
Kris Nuttycombe
6867240e5a
Remove the `current_leaf` method from `Tree`
...
The notion of `current` doesn't make a lot of sense in the context of
out-of-order insertion.
2023-02-16 15:01:53 -07:00
Kris Nuttycombe
0e2329cebc
Fix a missed Authpath -> Witness rename.
2023-02-16 15:01:53 -07:00
Kris Nuttycombe
14bb9c6b1b
Modify test infrastructure to allow shardtree testing.
...
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.
2023-02-16 15:01:53 -07:00
Kris Nuttycombe
07a88c34ac
Adds a `Retention` enum to the `incrementalmerkletree` crate.
...
This will be necessary in order to make the testing infrastructure
reusable for shardtree.
2023-02-16 15:01:53 -07:00
Kris Nuttycombe
aa1d59f47a
`witness` now witnesses at a checkpoint, rather than a root.
...
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.
2023-02-16 15:01:53 -07:00
Kris Nuttycombe
92121642b0
Merge pull request #54 from nuttycom/improve_addrs
...
Add `Address` methods to facilitate tree traversal.
2023-02-16 15:01:29 -07:00
Kris Nuttycombe
2e9043ef82
Add `Address` methods to facilitate tree traversal.
2023-02-16 14:32:54 -07:00
str4d
3c19b5320f
Merge pull request #55 from nuttycom/update_msrv_1.60
...
Update MSRV to 1.60
2023-02-16 18:22:49 +00:00
Kris Nuttycombe
39fe209e21
Apply suggestions from code review
...
Co-authored-by: str4d <thestr4d@gmail.com>
2023-02-16 11:02:47 -07:00
Kris Nuttycombe
dff6be7221
Update MSRV to 1.60
...
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.
2023-02-16 10:51:41 -07:00
str4d
da9ab5a71d
Merge pull request #49 from nuttycom/workspace_refactor
...
Move common utilities to the incrementalmerkletree crate & turn into a workspace.
2023-01-06 09:22:30 +00:00
Kris Nuttycombe
8998f839ce
Change `append` to take ownership of the value being appended.
...
It is now up to the caller to clone the value if necessary.
2023-01-04 14:08:11 -07:00
Kris Nuttycombe
0dde92c699
Move `testing::lazy_root` to `testing::complete_tree::root` & make crate-private
...
The former name didnt make sense anyway, because there's nothing lazy
about the result.
2022-12-21 14:48:53 -07:00
Kris Nuttycombe
50779d2bd5
Consolidate bridgetree tests.
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
4e2883c707
Move CombinedTree to incrementalmerkletree::testing
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
3f88ac3af2
Move complete_tree testing module to incrementalmerkletree
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
a8c5ce1c98
Move `check_operations` to `incrementalmerkletree::testing`
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
02a33c5c32
Refactor check_operations to generalize usage.
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
6b4bcda423
Move shared example tests to incrementalmerkletree::testing
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
6b6d108de6
Move randomized test generators to incrementalmerkletree
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
eb3413837e
Move `Tree` and `Frontier` traits to `incementalmerkletree::testing`
2022-12-21 12:53:17 -07:00
Kris Nuttycombe
c5c6c65799
Move position & hashable types to incrementalmerkletree root.
2022-12-21 12:52:57 -07:00
Kris Nuttycombe
b2a68215a0
Move the `bridgetree` crate to a workspace.
2022-12-21 11:59:43 -07:00
Kris Nuttycombe
8f6056c73e
Merge pull request #51 from nuttycom/master
...
Release bridgetree v0.2.0.
2022-12-20 17:30:23 -07:00
Kris Nuttycombe
61a34e5ec5
Clarify the witnees->mark renaming in the `Tree` interface.
2022-12-20 17:05:01 -07:00
Kris Nuttycombe
e78fb14a43
Update changelogs for bridgetree v0.2.0.
2022-12-20 16:53:14 -07:00
Kris Nuttycombe
ae75af55b3
Release bridgetree v0.2.0.
2022-12-19 17:03:16 -07:00
Kris Nuttycombe
49eca24a11
Merge pull request #46 from zingolabs/doc_update
...
Doc update
2022-08-16 12:05:29 -06:00
zancas
0eb0cc527d
typo
2022-08-08 17:36:24 -06:00