Open
Conversation
extract core name/revision logic to a generic, then create a pail vase version for using UCN with pail
adds some tests (thanks claude) and also fixes linting issues
edf41c1 to
70d70e2
Compare
a5f9bdc to
644c60b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals
Provide an out of box way to use Pail with UCAN authorized merkle clocks by expanding the UCN package to support not only raw values but actual pail data structures (and a generics package for future UCN based implementations)
Implementation
We also extract core name/revision logic to a generic
Then we provide a backward compatible implementation of the original package using that generic (a bit messy but didn't want to mess with a breaking change for now)
Then we build a Pail based version of UCN mixing Pail + UCN logic>
The core technique here utilizes the basic logic from Pail's CRDT package, but paired down to it's key contribution -- the "root" method that extracts the current CID from the merkle clock head.
Like the root package, Revisions are not mean to be values until they're realized via Value.from
Like all pail methods you get a diff of blocks -- additions and removals -- whose persistence is left as a separate concern.
For discussion
Still needs tests and some export adjustments, but I like the basic seperate of concerns -- though there remains some weird cross package imports (at this point, I think pail's clock stuff should probably live inside of.... w3clock)