Giter Site home page Giter Site logo

Comments (4)

flaub avatar flaub commented on May 22, 2024 1

A replacement for MethodIDs are close to being complete. This will be an ImageID which is the root hash of a merkle tree where the entries are themselves hashes of a page of memory. When an ELF is produced, an ImageID may also be computed. The initial memory image that is supplied to the proof system will include this merkle tree. The root entry will reside in a well known location.

My proposal for this issue is to add a new ecall which can be used by the guest to return this hash. We need an ecall because guest code is not allowed to access system memory which is where the ImageID resides.

from risc0.

SchmErik avatar SchmErik commented on May 22, 2024

I think this can pose a chicken and egg problem but I'm not exactly sure... I'll write down my thoughts...

The MethodID of a given guest method can be thought of as a collection of ID's where each method ID represents a different po2 execution cycles. The ID is computed by looking at the parts of the trace that is static in particular it heavily relies on the values in the trace during the program load phase. After the program load phase, we pad the rest of the po2 execution cycles as if it were in the BODY. Meaning that for each po2 cycles, we will generate different Merkle roots.

The confusion comes in when we're thinking about loading the methodID to memory. How can we compute the methodID's if the program load phase is accounted for during the creation of the methodID? It seems like loading the memory with method ID's would have to be excluded from generating the method ID itself.

from risc0.

SchmErik avatar SchmErik commented on May 22, 2024

Oh from reading @intoverflow's proposed fix, we can write the set of method ID's after the load phase, meaning that the initialization of the read only memory region wouldn't be accounted for when generating the method ID.

from risc0.

SchmErik avatar SchmErik commented on May 22, 2024

Another point: given an execution trace and a set of method ID's, how do we know that the correct method ID's were loaded to a read only memory region? I guess we could add this as a step during verification?

from risc0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.