5

Right now there is no instruction in the Ethereum VM to access resources stored on Swarm. Is there a plan to add such a feature?

1 Answer 1

8

Such a feature (interpreted literally as access to content) is impossible for the same reason as random number generation, generic web access or system time: the VM has to be fully deterministic black box, executing exactly the same way in all nodes processing transactions.

However, indirect 'access' will be possible in a similar way to btc relay: Indirect here means that a transaction can assert a certain content on swarm which you can challenge.

All we need to believe is that it is possible to prove that a byte sequence with offset o and length l is indeed part of a document at time t under a url u (say for instance mydomain/path/to/my/content)

the steps for this:

  1. you can prove that at block b corresponding to time t ENS registry shows hash h as the resolution of mydomain.
  2. you can prove that h is the root hash of a manifest (cascade of manifests) in which path/to/my/content points to hash h0.
  3. you can prove that h0 is the root hash of a document which contains chunk c (or series of chunks c0,.. cn) spanning over the challenged substring.
  4. you can prove that the challenged substring is (or is not) at the relevant offset
  5. you can 'prove' that at the relevant time t chunk c had an unchallanged receipt (valid proof of custody).

swarm will use proof friendly manifest format and a solidity friendly 32-byte segment-based binary merkle tree as the base hash for the swarm hash. This means that such proofs are logarithmic in the size of the document-collection under the manifest plus the size of the document under the url (disregarding the historical state proof complication in 1).

step 5 is a slightly different flavour of 'proof' than the rest since it asserts the actual availability of the information in question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.