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

Provide an API to show "all tahoe object-sizes" in magic-folder #524

Closed
meejah opened this issue Jul 29, 2021 · 4 comments · Fixed by #528
Closed

Provide an API to show "all tahoe object-sizes" in magic-folder #524

meejah opened this issue Jul 29, 2021 · 4 comments · Fixed by #528
Assignees

Comments

@meejah
Copy link
Collaborator

meejah commented Jul 29, 2021

In order to get good pricing estimates from ZKAPauthorizer it needs to know how many and of what size every Tahoe capability magic-folders currently cares about.

This means returning, per magic-folder, a list of integers. For each Snapshot, that means: the size of the "content" capability, the size of the "metadata" capability and the size of the Snapshot capability itself.

@meejah meejah self-assigned this Jul 30, 2021
@meejah
Copy link
Collaborator Author

meejah commented Jul 30, 2021

I know we talked about estimating these, but with a couple updates to the database we can be exact since for all remote-snapshots we have the 3 capabilities (the Snapshot cap, metdata cap and content cap). We currently don't cache the latter two.

(Capabilities contain their exact size)

@tomprince
Copy link
Contributor

tomprince commented Jul 31, 2021

@crwood Would it be more useful to have the list of sizes of things we have already uploaded to the grid, Or the sizes we will have uploaded[1], once everything is done syncing (assuming no changes happen in the interim?

[1] Ignoring, I think intermediate snapshots; just the size of the reachable objects at that time.

(There is some more discussion in #524 (comment))

@crwood
Copy link
Member

crwood commented Aug 2, 2021

@tomprince I'm thinking it would be more useful to have the list of filesize for objects that have already uploaded to the grid (since this API will be used to determine the user's projected "monthly ZKAP cost" for all files currently stored in the grid).

@tomprince
Copy link
Contributor

@crwood If we are looking to get the projected monthly cost, it seems like including stuff that we are about to upload will give a better projection of that, than the current file sizes; at least on an ongoing basis. Unless the existing snapshots are renewed before we upload new ones (for which there is definitely a window), the user won't be charged for file already on-grid that we have newer snapshots for.

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 a pull request may close this issue.

3 participants