Skip to content

docs: Data model for append-only Merkle trees#25

Merged
AlCutter merged 1 commit intotransparency-dev:mainfrom
pav-kv:document_merkle_data_model
Sep 23, 2022
Merged

docs: Data model for append-only Merkle trees#25
AlCutter merged 1 commit intotransparency-dev:mainfrom
pav-kv:document_merkle_data_model

Conversation

@pav-kv
Copy link
Copy Markdown
Contributor

@pav-kv pav-kv commented May 9, 2022

This change adds some terminology to the docs.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 9, 2022

Codecov Report

Merging #25 (9bf44c8) into main (616662a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #25   +/-   ##
=======================================
  Coverage   88.93%   88.93%           
=======================================
  Files           7        7           
  Lines         497      497           
=======================================
  Hits          442      442           
  Misses         50       50           
  Partials        5        5           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 616662a...9bf44c8. Read the comment docs.

@pav-kv
Copy link
Copy Markdown
Contributor Author

pav-kv commented May 9, 2022

@pav-kv pav-kv force-pushed the document_merkle_data_model branch 3 times, most recently from 3c5046d to 9bf44c8 Compare May 9, 2022 21:50
@pav-kv pav-kv marked this pull request as ready for review September 22, 2022 01:42
@pav-kv pav-kv requested a review from a team as a code owner September 22, 2022 01:42
@pav-kv pav-kv requested a review from mhutchinson September 22, 2022 01:42
@pav-kv
Copy link
Copy Markdown
Contributor Author

pav-kv commented Sep 22, 2022

Hi team. I am clearing my github backlog. Please merge this PR, or let me know how I can improve it.

Copy link
Copy Markdown
Collaborator

@AlCutter AlCutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks dude, few minor bits inline.

The data structure evolves dynamically. Initially, the log is empty, and all the
nodes of the tree have no data. When new entries are appended to the log, some
nodes that recursively depend on these entries, are updated. While the nodes can
be updated, they are in **ephemeral** state. Eventually, when the log grows past
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A gentle suggestion for rephrasing the last sentence in here, I don't feel super strongly about it though, and it's more wordy than yours, so feel free to take to leave as you think best.

Nodes on the right-hand side of the tree which do not yet cover a perfect subtree (i.e. those nodes with fewer than 2level entries beneath them) are termed ephemeral.

Ephemeral nodes will continue to be updated as new entries are added to the log until the node's subtree becomes perfect, at which point that node (and all those below it) will never be modified again.


### Tree state

To represent the state of the entire log, often a single ephemeral node is used
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about rearranging slightly to something like:

To represent the state of the entire log the single node which covers all leaves in the log is used. For example, in a tree with 21 ... node 5.0.

@pav-kv pav-kv force-pushed the document_merkle_data_model branch from 9bf44c8 to f860f71 Compare September 22, 2022 19:27
@AlCutter AlCutter merged commit 8e42628 into transparency-dev:main Sep 23, 2022
@pav-kv
Copy link
Copy Markdown
Contributor Author

pav-kv commented Sep 23, 2022

I did not address all rewording comments, was going to do it later. But anyway, this doc needs further work, so can be addressed in follow-ups.

@pav-kv pav-kv deleted the document_merkle_data_model branch September 23, 2022 13:07
@AlCutter
Copy link
Copy Markdown
Collaborator

I did not address all rewording comments, was going to do it later. But anyway, this doc needs further work, so can be addressed in follow-ups.

I noticed, but interpreted it as declining the suggestions - follow up(s) are, of course, more than welcome, though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants