Comments (4)
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.
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.
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.
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)
- Qns about waldo example HOT 1
- Guest builds fail due to `cc` crate 1.0.80 HOT 4
- Sending code or docker container to verifier HOT 1
- clean up /docs
- Compile error on rust-starter template HOT 2
- Bincode Deserialization Error HOT 3
- template: use workspaces for risc0 dependencies HOT 1
- zkVM: make r0vm more modular (step 1) HOT 1
- zkVM: make r0vm more modular (step 2) HOT 1
- zkVM: make r0vm more modular (step 3) HOT 1
- zkVM: create a separate r0vm-like program for recursive proving HOT 1
- Clarify expectations for build/run times HOT 2
- Refactor Forge tests in the Governance example to take less time to run
- update factors tutorial to match 0.17 HOT 1
- Create installation page HOT 5
- Convert `InnerReceipt` conversion helpers to `Result` return type
- Bonsai prover: inform users of unsupported ExecEnv features
- proof of fault: add predicates HOT 1
- zkVM: Unify template and example structure
- zkVM: Fix example compatibility w/ 0.17 and revisit CI tests HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from risc0.