-
Notifications
You must be signed in to change notification settings - Fork 59
feat: Generate flamegraph with metrics from Prometheus server #1602
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
Draft
manh9203
wants to merge
9
commits into
main
Choose a base branch
from
feat/metrics-export-prometheus
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This PR adds a new verifier contract generation that wraps the original `snark-verifier` output (via inheritance). The goal of this wrapper `OpenVmHalo2Verifier` is to expose a more friendly interface to users that cleanly separates out the guest program public values. `OpenVmHalo2Verifier` exposes the following interface: ```solidity interface IOpenVmHalo2Verifier { function verify(bytes calldata publicValues, bytes calldata proofData, bytes32 appExeCommit, bytes32 appVmCommit) external view; } ``` - `publicValues`: The bytes revealed in the OpenVM guest program packed together. - `proofData`: Defined as `abi.encodePacked(KZG accumulators, publicValuesSuffix)` - `appExeCommit`: The commitment to the OpenVM application executable whose execution is being verified. - `appVmCommit`: The commitment to the VM configuration (aka `leaf_exe_commit`) Once received, the proof is constructed into the format expected by `snark-verifier`. The expected format is `abi.encodePacked(proofData[0:0x180], appExeCommit, appVmExeCommit, publicValuesPayload, proofData[0x180:])` where `publicValuesPayload` is a memory payload with each byte in `publicValues` separated into its own `bytes32` word. Since `OpenVmHalo2Verifier` inherits the `snark-verifier` output, the proof is forwarded via self-call. ## Verifier Generation The smart contract is written as a template that does not compile in isolation. During generation, the OpenVM SDK will fill out the maximum amount of public values and the OpenVM version with which the generation happened. Given an output folder, the relevant contracts are written into the following folder structure: ``` halo2/ ├── interfaces/ │ └── IOpenVmHalo2Verifier.sol ├── OpenVmHalo2Verifier.sol ├── Halo2Verifier.sol ``` `cargo openvm setup` will now generate this output directly into the `~/.openvm/` dir. Closes INT-3710
This reverts commit d80b269.
8a65ed8
to
5f2e75d
Compare
This comment has been minimized.
This comment has been minimized.
This reverts commit 0c9fff0.
Commit: 8db0db2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a Python script to generate flamegraph from metrics scraped by Prometheus server