mutable files: expose version info to HTTP clients #413
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#413
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
in #328, we overhauled the internal API for mutable files, to make them safe to use for structured data that requires test-and-set semantics. But this is not currently exposed to the webapi: clients using HTTP can only blindly overwrite mutable files, making them unsuitable for carrying more structured data that must be manipulated outside the tahoe node.
I'm not convinced that passing a servermap outside (and back into!) the tahoe node over HTTP is a good idea. Maybe passing a handle to one might be safe.
If you like this ticket, you might also like #906.
Zooko and chatted a bit about this tonight. It might be sufficient to pass a single version identifier. Mutable files have a sequence-number / roothash pair which points to a specific version of the file's contents. This does not contain as much information as the full servermap, but it might be enough.
The webapi for this might look like:
Both mutable files and directories could have a control like this.
I don't think that the sequence number alone is sufficient for test-and-set semantics, since there might be different shares with the same sequence number. By 'roothash', do you mean a hash that depends on the contents of the (encrypted and encoded) current version, or one that only depends on which file this is? If the former then a (sequence_number, roothash) pair would be sufficient.
#993 will probably add an internal API to get the sequence number. Should this get the (sequence_number, roothash) pair instead?
"roothash" means the root of the Merkle Tree over the (encrypted) shares of one specific version of the file, so it is sufficient to uniquely identify one version. Yes, everything that talks about "versions" of mutable files should specify the version as a
(sequence_number, roothash)
tuple.Let's split the more ambitious second and third bullets of comment:66411 into a separate ticket and just make this about exposing the sequence number and roothash in
t=json
andt=info
-- otherwise it's too much to implement in one go.Replying to daira:
Filed as #2040.
mutable files: expose version info to HTTP clients?to mutable files: expose version info to HTTP clientsOkay, so we should represent the version info in some way that can be put in an HTTP query arg without encoding. How about a decimal sequence number, a '.' (which is unreserved in URIs), and a zbase32 hash?