From ff4af672b1a172522335ef776078948d39fb8067 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Fri, 5 Aug 2022 14:17:45 -0400 Subject: [PATCH] Fill out a README and reference the whitepaper in docs --- README.md | 23 +++++++++++++++++++++++ src/lib.rs | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8540316 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ + + +# A generic implementation of a Merkle DAG + +This is an exploration of the paper [merkle-crdts](https://arxiv.org/pdf/2004.00107.pdf) as well, +if I'm honest, as an excuse to use [proptests](https://crates.io/crate/proptest). + +The proptest assertions are hidden behind the `proptest` feature since they can take longer to run than +the standard tests. To run them: `cargo test --features proptest` \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 9649ad6..4d08ea6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,6 +70,9 @@ where /// Add a new payload with a required set of dependency_ids. This method will construct a new node /// and add it to the DAG with the given payload item and dependency id set. It is idempotent for any /// given set of inputs. + /// + /// One result of not constructing/adding nodes in this way is that we ensure that we always satisfy + /// the implementation rule in the merkel-crdt's whitepaper. pub fn add_node<'a>( &'a mut self, item: N,