Skip to content
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

feat: make AccessKey the key entrypoint for public apis #285

Merged
merged 4 commits into from
Jun 26, 2023

Conversation

appcypher
Copy link
Member

This PR brings the multiple ways of generating key materials for accessing nodes in a filesystem under a single type. The AccessKey now becomes the only way of accessing the nodes in a file system. It is important to note that the Snapshot aspect of AccessKey is not at all functional right now.

This PR implements the following features

  • AccessKey implementation
  • Wasm binding for AccessKey

Test plan (required)

  • Testing

    scripts/rs-wnfs test

Closing issues

Fixes #249

@appcypher appcypher requested a review from a team as a code owner June 20, 2023 18:15
@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #285 (8e976db) into main (085242d) will increase coverage by 0.99%.
The diff coverage is 51.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
+ Coverage   60.47%   61.47%   +0.99%     
==========================================
  Files          40       40              
  Lines        2763     2707      -56     
  Branches      690      679      -11     
==========================================
- Hits         1671     1664       -7     
+ Misses        622      571      -51     
- Partials      470      472       +2     
Impacted Files Coverage Δ
wnfs/examples/private.rs 0.00% <0.00%> (ø)
wnfs/examples/tiered_blockstores.rs 0.00% <0.00%> (ø)
wnfs/src/root_tree.rs 67.69% <ø> (ø)
wnfs/src/private/link.rs 49.33% <22.22%> (+0.68%) ⬆️
wnfs/src/private/forest.rs 64.10% <50.00%> (-4.08%) ⬇️
wnfs/src/private/share.rs 72.09% <50.00%> (+8.12%) ⬆️
wnfs/src/private/keys/access.rs 53.33% <53.33%> (ø)
wnfs/src/private/node/node.rs 65.78% <65.51%> (-0.88%) ⬇️
wnfs/src/private/keys/privateref.rs 55.26% <66.66%> (ø)
wnfs/src/private/directory.rs 69.59% <80.00%> (+1.74%) ⬆️
... and 3 more

... and 2 files with indirect coverage changes

@matheus23
Copy link
Member

Same with this PR, I'd prefer this to be marked as "feat" instead of "fix".
(Also I don't think the "(api)" means anything to release-please. IIUC, you can say e.g. "feat(wnfs-common)" or "feat(wnfs-wasm)" to indicate that it's only a change in a certain crate)

@appcypher appcypher changed the title fix(api): make AccessKey the key entrypoint for public apis feat(api): make AccessKey the key entrypoint for public apis Jun 22, 2023
@appcypher appcypher changed the title feat(api): make AccessKey the key entrypoint for public apis feat: make AccessKey the key entrypoint for public apis Jun 22, 2023
@matheus23
Copy link
Member

This needs conflicts resolved. Then I'd give it a look, we can merge and finally release :)

Copy link
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

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

I like these!

We learned that some things are useful on its own (SharePayload), rename them and sprinkle them along the API more.
We learned that you shouldn't create seeded keys and directories themselves, but instead seed an asymmetric keypair. Thus making a bunch of RevisionRef stuff obsolete.
We'll continue to learn more about exactly how we should best structure stuff.
I'm pretty confident we're continually improving :)

I'd love to have this merged, so I can do a final rebase of #247 and finally have a review & merge on that too.

wnfs/examples/tiered_blockstores.rs Outdated Show resolved Hide resolved
wnfs/src/private/file.rs Show resolved Hide resolved
wnfs/src/private/forest.rs Show resolved Hide resolved
wnfs/src/private/forest.rs Outdated Show resolved Hide resolved
wnfs/src/private/share.rs Outdated Show resolved Hide resolved
appcypher and others added 2 commits June 26, 2023 14:48
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
Signed-off-by: Stephen Akinyemi <appcypher@outlook.com>
@appcypher appcypher merged commit b749e74 into main Jun 26, 2023
10 checks passed
@appcypher appcypher deleted the appcypher/access-key branch June 26, 2023 15:39
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.

Unique canonical "entrypoint" API for private WNFS
2 participants