Commit Graph

160 Commits

Author SHA1 Message Date
Kris Nuttycombe a1dec495de Release of `bridgetree` v0.2.1
The `bridgetree-v0.2.0` tag was created with respect to an invalid
repository state, which did not actually contain the `bridgetree`
sources after they were factored out from the `incrementalmerkletree`
crate.
2023-06-05 17:14:09 -06: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
zancas 99f21fc543
Make general statement about merkle trees more conservative 2022-08-08 17:34:11 -06:00
Kris Nuttycombe ab23aafe5a
Merge pull request #44 from nuttycom/improve_naming
Rework the API for move to the `bridgetree` crate.
2022-08-04 16:50:34 -06:00
Kris Nuttycombe a98875d196 Improve `BridgeTree` and `MerkleBridge` documentation.
Co-authored-by: ebfull <ewillbefull@gmail.com>
2022-08-04 13:00:58 -06:00
Kris Nuttycombe 95d95f46db Export position & hashing types from the top-level module. 2022-08-04 13:00:58 -06:00
Kris Nuttycombe ad2c751633 Improve reporting for errors that can be generated in witness creation. 2022-08-04 13:00:58 -06:00
Kris Nuttycombe 7556c04472 Update bridgetree root module documentation. 2022-08-04 13:00:58 -06:00
Kris Nuttycombe 1581ce6864 Update README 2022-08-04 13:00:58 -06:00
Kris Nuttycombe 4d35824257 Minimize scope of allowed deprecations in testing.rs 2022-08-04 13:00:58 -06:00
Kris Nuttycombe 693961be3f Remove codecov task (never worked) 2022-08-04 13:00:58 -06:00
Kris Nuttycombe 5e04301a4b Move documentation to top-level methods + minor cleanup. 2022-08-04 13:00:58 -06:00
Kris Nuttycombe adf9ba26e4 Move the BridgeTree type to the root module. 2022-08-04 13:00:58 -06:00
Kris Nuttycombe 6e97389d1b Move `Frontier` and `Tree` traits to testing module.
These traits are only used for comparison testing between
the CompleteTree and BridgeTree types; they don't represent
useful independent abstractions.
2022-08-04 13:00:58 -06:00
Kris Nuttycombe 55731de321 Move Hashable trait to hashing module 2022-08-04 13:00:58 -06:00
Kris Nuttycombe 2a19b40fc1 Move position types to position module. 2022-08-04 13:00:56 -06:00
Kris Nuttycombe d631b8278a Move common test code into the testing module. 2022-08-04 13:00:05 -06:00
Kris Nuttycombe e19446f8fd Make test utilities available under a test-dependencies feature. 2022-08-04 13:00:05 -06:00
Kris Nuttycombe 7331a8f458 Rename fragments -> ommers 2022-08-04 13:00:05 -06:00
Kris Nuttycombe 6b6548f02e Rename authentication_path -> witness 2022-08-04 13:00:05 -06:00
Kris Nuttycombe ee93cb8598 Rename witness->mark 2022-08-04 13:00:04 -06:00
Kris Nuttycombe 7bd1907451
Merge pull request #43 from nuttycom/fix_frontiers
Remove the `bridgetree::Leaf` type & make ommer levels start at 0
2022-07-22 16:14:02 -06:00
Kris Nuttycombe 40e31f340c
Merge pull request #42 from nuttycom/sharing_tree
Alter MerkleBridge to avoid storing duplicate ommers.
2022-07-22 12:46:07 -06:00
Kris Nuttycombe 3b08071125 Remove the `bridgetree::Leaf` type & make ommer levels start at 0
This is a major refactoring that gets rid of a significant wart
in the design of the `bridgetree::Frontier` type that has existed
since the the project's inception.

The `Leaf` type incorrectly treated the siblings of leaves at
odd positions as special, whereas they should have been simply
treated as ordinary entries in the frontier's ommers list. Correcting
this allows for the code to be significantly simplified in a number
of places.
2022-07-21 18:32:58 -06:00
Kris Nuttycombe 4973b6682f Alter MerkleBridge to avoid storing duplicate ommers.
Prior to this change, each position being tracked would
require an entry in the `auth_fragments` map for each
bridge in a BridgeTree. However, very frequently, these
entries would duplicate storage of nodes higher up in the
tree, wherever a single node in the was an ancestor of
a leaf being tracked.

This commit restructures the tracking of auth data to
avoid this duplication of data, as well as the redundant
work that was required to produce each copy of the duplicated
nodes.
2022-07-21 18:27:09 -06:00
Kris Nuttycombe f081cfc81e Factor out bridge-level auth path construction. 2022-07-14 14:22:59 -06:00
ebfull 070a7588ae
Merge pull request #39 from zcash/release-0.3.0
Release 0.3.0
2022-05-10 09:39:36 -06:00
Sean Bowe c7e3ae7283
Release 0.3.0 2022-05-10 09:05:22 -06:00
Kris Nuttycombe f23e3d8950
Merge pull request #38 from nuttycom/authpath_anchor_depth
Add as_of_root argument to Tree::authentication_path
2022-04-22 10:55:26 -06:00
Kris Nuttycombe 9d94e9d6e8
Apply suggestions from code review
Co-authored-by: ebfull <ewillbefull@gmail.com>
2022-04-22 09:57:23 -06:00
Kris Nuttycombe 06728b9499 Add an as_of_root argument to Tree::authentication_path
This requires a user of this API to specify a root of the tree
that identifies the state of the tree at which the user wishes
to construct an authentication path. This must be equal to either
the current root of the tree, or to the root of the tree at a
previous checkpoint.
2022-04-20 14:13:12 -06:00
Kris Nuttycombe fef054d43a Move-only: group witness/remove_witness code together. 2022-04-15 10:00:03 -06:00
Kris Nuttycombe acbf32d077
Merge pull request #37 from zcash/release-0.3.0-beta.2
Release 0.3.0-beta.2
2022-04-06 11:47:04 -06:00
Jack Grigg 14386d14b1 incrementalmerkletree 0.3.0-beta.2 2022-04-06 17:45:17 +00:00
Kris Nuttycombe f55dafd596
Merge pull request #34 from nuttycom/add_changelog
Add changelog
2022-04-06 11:36:44 -06:00
Kris Nuttycombe 27723b395a Fix a few more changelog style consistency issues. 2022-04-06 11:35:06 -06:00
Kris Nuttycombe 7feaddd8e2 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-04-06 11:18:01 -06:00
ebfull 5d5439261f
Merge pull request #35 from nuttycom/rewind_retain_order
Fix an off-by-one error in BridgeTree garbage collection.
2022-04-05 16:31:22 -06:00
Kris Nuttycombe a4aa2bf204 Fix an off-by-one error in BridgeTree garbage collection. 2022-04-05 16:16:41 -06:00
Kris Nuttycombe 10e531d088 Restore forgotten witnesses before pruning to bridges length in rewind. 2022-04-05 16:15:41 -06:00
Kris Nuttycombe f9c12e37aa Add witnessed_positions and garbage_collect methods to the `Tree` trait.
* `witnessed_positions` returns the set of positions that have been
  witnessed in the tree.
* `garbage_collect` makes the garbage collection operation of
  `bridgetree::BridgeTree` publicly accessible. It is always safe to
  implement this method as a no-op.
2022-04-05 16:15:41 -06:00
Kris Nuttycombe 647ff944ad
Merge pull request #36 from nuttycom/bridgetree_from_frontier
Allow construction of incrementalmerkletree starting from a frontier.
2022-04-05 16:13:24 -06:00
Kris Nuttycombe ea258b1e8f Add CHANGELOG.md, documenting all changes since v0.2.0 2022-03-31 14:24:21 -06:00
Kris Nuttycombe f19cf9c381 Add `BridgeTree::from_frontier`
Add a constructor to allow a BridgeTree to be built starting at an
existing frontier.
2022-03-31 11:38:28 -06:00