-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redefine Revision and View #160
Conversation
Redefine `Revision` to only refer to previously commited (historical) point-in-time states/versions. Also clarify that the term View just refers to an interface used on revisions or proposals.
* `Revision` - A historical point-in-time state/version of the trie. This | ||
represents the entire trie, including all `Key`/`Value`s at that point | ||
in time, and all `Node`s. | ||
* `View` - This is the interface to read from a `Revision` or a `Proposal`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
Question, does the DB itself implement View
? Or do you always need to get the latest revision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DB object does not implement the View
interface. Why not? Because that View
would not be a constant point-in-time thing -- it would change as commits happen. You would be violating the new definition: a View
reading from a Revision
must be a historical point-in-time, not something that keeps changing as commits happen, which is what the DB object is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 What methods exist on a View
that don't exist on the Db itself?
Db is not defined but I suspect it is the collection of known revisions.
You can't have a view of that, only of a specific revision.
…On Thu, Jul 20, 2023, 12:59 Richard Pringle ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In README.md
<#160 (comment)>:
> @@ -58,9 +58,10 @@ upstream.
## Termimology
-* `Revision` - A point-in-time state/version of the trie. This represents the entire
- trie, including all `Key`/`Value`s at that point in time, and all `Node`s.
-* `View` - This is a synonym for a `Revision`.
+* `Revision` - A historical point-in-time state/version of the trie. This
+ represents the entire trie, including all `Key`/`Value`s at that point
+ in time, and all `Node`s.
+* `View` - This is the interface to read from a `Revision` or a `Proposal`.
🤔 What methods exist on a View that don't exist on the Db itself?
—
Reply to this email directly, view it on GitHub
<#160 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYLR3CDH3OMXXZY3DRDYSTXRGEZNANCNFSM6AAAAAA2QMWB5I>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Redefine
Revision
to only refer to previously commited (historical) point-in-time states/versions. Also clarify that the term View just refers to an interface used on revisions or proposals.