-
Notifications
You must be signed in to change notification settings - Fork 619
morty/permissionless batches recovery #1639
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
Open
yiweichi
wants to merge
129
commits into
jt/permissionless-batches-recovery
Choose a base branch
from
morty/permissionless-batches-recovery
base: jt/permissionless-batches-recovery
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.
Open
Changes from all commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
af38122
chore: auto version bump [bot]
jonastheis 2cc9f65
chore: auto version bump [bot]
georgehao eacdc78
fix(bridge-history): overwrite l2geth dependency by replace (#1617)
colinlyguo 7ec6d47
feat: openvm euclid v2
colinlyguo 893bf18
update Cargo.lock
colinlyguo b3c1df7
revert a change
colinlyguo 110083c
update rust version in CI
colinlyguo fcbaa67
update dependencies
colinlyguo 2d40f0f
fix: chunk task deserialisation from prove request input (#1620)
roynalnaruto c743efd
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 1ea9aca
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 88da493
update prover client
colinlyguo b8c7ec2
fix: compilation
roynalnaruto f288179
dbg: add dbg logs for prover vks
roynalnaruto 64368f9
dbg: proof types from req
roynalnaruto be88ef6
dbg: more println
roynalnaruto fe6451b
revert dbg commits
roynalnaruto bcc6b0f
add PrevMsgQueueHash in chunk task detail
colinlyguo 5cf8cda
add logs
colinlyguo 8db4e5c
update scroll-proving-sdk
colinlyguo a6ed321
update scroll-zkvm-prover v0.1.1-rc.2
kunxian-xia 7486236
update scroll-proving-sdk
colinlyguo b984341
euclid & euclidv2 compatible logic
colinlyguo 8cf087c
update scroll-proving-sdk
colinlyguo 9996af6
Revert "revert dbg commits"
colinlyguo 0e82c63
add back dbg logs
colinlyguo 2846ecf
fix a compilatin error
colinlyguo ad2e94e
support euclidV2 in proof handling
colinlyguo 0fc28cb
fix(coordinator): euclid v2 prover compatibility (#1625)
yiweichi ef9e25f
feat: add euclidv2 verifier
omerfirmak e3b17a0
add PostMsgQueueHash in chunk info
colinlyguo 86e6555
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 87e1235
fix
colinlyguo 5f8bb53
update scroll-proving-sdk version (#1626)
yiweichi 7d5b77a
Revert "feat: add euclidv2 verifier"
colinlyguo 12a262a
align new types
colinlyguo 5869bfd
load low version open vm circuit
colinlyguo 7d4ff80
update type error
colinlyguo 9f480e5
fix
colinlyguo 459941d
use hexutil.Big
colinlyguo b4546af
remove load vks
colinlyguo 3a3db5f
add logs
colinlyguo cb87c7a
another type fix
colinlyguo 4822d38
fix
colinlyguo 8befb84
fix
colinlyguo 2d620dd
fix
colinlyguo bab0e4f
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 135073c
Reapply "feat: add euclidv2 verifier"
colinlyguo 77d6322
fix
colinlyguo cf41048
Update rc3 (#1629)
yiweichi 11afeb1
update verifier
colinlyguo 07d1621
update scroll-proving-sdk commit (#1630)
yiweichi 60877d3
fix: reduce segment len in prover config (#1631)
roynalnaruto 9b5c42e
tweak logs
colinlyguo ae212a9
fix logs
colinlyguo 09790c4
fix: clap deprecated warnings
yiweichi 0bb5314
fix: byte48 type required in prover (#1627)
noel2004 901693a
remove a log
colinlyguo 3454c6c
update scroll-proving-sdk commit
yiweichi c6f0299
feat: euclid v2 GPU prover (#1623)
kunxian-xia 4b21c79
update scroll-proving-sdk commit
yiweichi 3ee2d2b
tweaks
colinlyguo e333288
merge message.LegacyChunkTaskDetail and message.EuclidV2ChunkTaskDetail
colinlyguo 2fb27ce
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo b3e4667
remove FIXME
colinlyguo ed05728
add back fixme
colinlyguo d0cb8b9
apply changes for sanity checks
colinlyguo 77dceae
fix
colinlyguo b73acca
update scroll-proving-sdk commit
yiweichi 1bec964
Adapt to rc11 (unified phase) (#1637)
noel2004 8994767
upgrade stark-gpu crate
kunxian-xia b59db73
hardcode openvm vks
colinlyguo 5cfb8b6
change string to var
colinlyguo 01d0e48
add more details in the log
colinlyguo 78a458d
update logs
colinlyguo 83c0a08
fix
colinlyguo 42bfcb8
add euclid v1 and v2 to hard fork map
colinlyguo d82e109
update scroll-proving-sdk dep
colinlyguo 2a8330c
fix
colinlyguo 4c2a755
fix
colinlyguo 2b318ec
add zero padding in BlobBytes
colinlyguo 886af07
fix challenge digest
colinlyguo 9033471
tmp comment out a Don't dispatch logic
colinlyguo 9bb768e
fix
colinlyguo 0023934
fix: permissionless batch signal import
yiweichi c484925
add back BlobBytes
colinlyguo 917b143
Remove mask
colinlyguo 8f4fc9a
uncomment some logic
colinlyguo 1572680
update challenge digest and zkvm prover dep
colinlyguo d113865
upgrade stark-gpu crate
Velaciela de9a397
feat: add config to enable submit with/without proof
yiweichi 0df9ede
temporarily mask challenge digest
colinlyguo 4c4cff0
temporarily mask KzgProof
colinlyguo e04eaa9
Add log when GetBlobByVersionedHashAndBlockTime
yiweichi 80af426
unmask cross-check fields and update scroll-proving-sdk deps
colinlyguo c65622b
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 38af170
chore: auto version bump [bot]
colinlyguo 87fc179
Merge branch 'feat/openvm-euclid-v2' into morty/permissionless-batche…
yiweichi 445b6bf
update docker compose
yiweichi db65d8d
update docker compose
yiweichi f045984
update da-codec deps
colinlyguo c3c733c
update docker compose
yiweichi a808f4b
update docker compose
yiweichi 8b52ad5
fix: compose depends
yiweichi ec4b1bf
add coordinator_run.sh
yiweichi 6356c79
chmod exec coordinator_run.sh
yiweichi bc05b87
update run.sh
yiweichi 52c9eab
fix: prover_run.sh
yiweichi 20a4c38
fix: prover db path
yiweichi eb04383
fix: prover network mode
yiweichi 83ba892
fix: prover health listener port
yiweichi dced0c6
bump minor version
colinlyguo 8b7f280
Merge branch 'feat/openvm-euclid-v2' into morty/permissionless-batche…
yiweichi 9d43e97
fix: geth dependency
yiweichi 8d76b47
fix: coordinator ci
yiweichi e7597b3
hardcode stateroot for testing
yiweichi 69a71ec
hardcode stateroot for testing
yiweichi e3bab24
fix: get state root for permission less chunk
yiweichi e011f6a
update geth version
yiweichi 0d95f6a
update geth version
yiweichi a5e911e
fix: typo
yiweichi 4046579
docs: update readme
yiweichi ecc3926
fix: makefile
yiweichi 17214d4
fix: coordinator_run.sh
yiweichi e3a1e5d
fix: makefile
yiweichi 50d5e65
fix: makefile
yiweichi 3be65c1
fix: makefile
yiweichi 912726d
fix: ci
yiweichi e1fa955
Merge branch 'jt/permissionless-batches-recovery' into morty/permissi…
yiweichi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
conf/ | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.PHONY: batch-production-submission launch_local_prover launch_cloud_prover psql check_proving_status | ||
|
||
export SCROLL_ZKVM_VERSION=0.2.0 | ||
PG_URL=postgres://postgres@localhost:5432/scroll | ||
|
||
batch_production_submission: | ||
docker compose --profile batch-production-submission up | ||
|
||
local_prover: | ||
docker compose --profile local-prover up | ||
|
||
cloud_prover: | ||
docker compose --profile cloud-prover up | ||
|
||
psql: | ||
psql 'postgres://postgres@localhost:5432/scroll' | ||
|
||
check_proving_status: | ||
@echo "Checking proving status..." | ||
@result=$$(psql "${PG_URL}" -t -c "SELECT proving_status = 4 AS is_status_success FROM batch ORDER BY index LIMIT 1;" | tr -d '[:space:]'); \ | ||
if [ "$$result" = "t" ]; then \ | ||
echo "✅ Prove succeeded! You're ready to submit permissionless batch and proof!"; \ | ||
else \ | ||
echo "Proof is not ready..."; \ | ||
fi |
This file contains 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 file contains 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
127 changes: 127 additions & 0 deletions
127
permissionless-batches/conf/coordinator/coordinator_run.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
#!/usr/bin/bash | ||
|
||
apt update | ||
apt install -y wget libdigest-sha-perl | ||
|
||
# release version | ||
if [ -z "${SCROLL_ZKVM_VERSION}" ]; then | ||
echo "SCROLL_ZKVM_VERSION not set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${HTTP_PORT}" ]; then | ||
echo "HTTP_PORT not set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${METRICS_PORT}" ]; then | ||
echo "METRICS_PORT not set" | ||
exit 1 | ||
fi | ||
|
||
case $CHAIN_ID in | ||
"5343532222") # staging network | ||
echo "staging network not supported" | ||
exit 1 | ||
;; | ||
"534353") # alpha network | ||
echo "alpha network not supported" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
BASE_DOWNLOAD_DIR="/verifier" | ||
# Ensure the base directory exists | ||
mkdir -p "$BASE_DOWNLOAD_DIR" | ||
|
||
# Set subdirectories | ||
ASSETS_DIR="$BASE_DOWNLOAD_DIR/assets" | ||
OPENVM_DIR="$BASE_DOWNLOAD_DIR/openvm" | ||
|
||
# Create necessary directories | ||
mkdir -p "$ASSETS_DIR" | ||
mkdir -p "$OPENVM_DIR/verifier" | ||
|
||
# Define URLs for asset files | ||
ASSETS_CHECKSUM_URL="https://circuit-release.s3.us-west-2.amazonaws.com/release-v0.13.1/sha256sum" | ||
ASSETS_CHECKSUM_FILE="$ASSETS_DIR/sha256sum" | ||
|
||
ASSETS_URLS=( | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/release-v0.13.1/vk_batch.vkey" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/release-v0.13.1/vk_bundle.vkey" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/release-v0.13.1/vk_chunk.vkey" | ||
) | ||
|
||
# Define URLs for OpenVM files (No checksum verification) | ||
OPENVM_URLS=( | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/verifier.bin" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/root-verifier-vm-config" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/root-verifier-committed-exe" | ||
) | ||
|
||
# Function to download and verify files (skips existing valid files) | ||
download_and_verify() { | ||
local url="$1" | ||
local dest_dir="$2" | ||
local checksum_file="$3" | ||
|
||
local filename=$(basename "$url") | ||
local filepath="$dest_dir/$filename" | ||
|
||
if [[ -f "$filepath" ]]; then | ||
echo "Checking existing file: $filename..." | ||
if grep "$filename" "$checksum_file" | sed "s|$filename|$filepath|" | sha256sum --check --status; then | ||
echo "File is already present and valid ✅ - Skipping download." | ||
return | ||
else | ||
echo "File exists but checksum mismatch ❌ - Re-downloading." | ||
rm -f "$filepath" | ||
fi | ||
fi | ||
|
||
echo "Downloading $filename..." | ||
curl -o "$filepath" -L "$url" | ||
|
||
if [[ ! -f "$filepath" ]]; then | ||
echo "Download failed for $filename ❌" | ||
exit 1 | ||
fi | ||
|
||
echo "Verifying checksum for $filename..." | ||
grep "$filename" "$checksum_file" | sed "s|$filename|$filepath|" | sha256sum --check --status || exit 1 | ||
echo "Checksum verification passed for $filename ✅" | ||
} | ||
|
||
# Download and verify asset files | ||
curl -o "$ASSETS_CHECKSUM_FILE" -L "$ASSETS_CHECKSUM_URL" | ||
for url in "${ASSETS_URLS[@]}"; do | ||
download_and_verify "$url" "$ASSETS_DIR" "$ASSETS_CHECKSUM_FILE" | ||
done | ||
|
||
# Download OpenVM files (No checksum verification, but skips if file exists) | ||
for url in "${OPENVM_URLS[@]}"; do | ||
dest_subdir="$OPENVM_DIR/$(basename $(dirname "$url"))" | ||
mkdir -p "$dest_subdir" | ||
|
||
filepath="$dest_subdir/$(basename "$url")" | ||
echo "Downloading $filepath..." | ||
curl -o "$filepath" -L "$url" | ||
done | ||
|
||
mkdir -p "$HOME/.openvm" | ||
ln -s "$OPENVM_DIR/params" "$HOME/.openvm/params" | ||
|
||
echo "All files downloaded successfully! 🎉" | ||
|
||
mkdir -p /usr/local/bin | ||
wget https://github.com/ethereum/solidity/releases/download/v0.8.19/solc-static-linux -O /usr/local/bin/solc | ||
chmod +x /usr/local/bin/solc | ||
|
||
# Start coordinator | ||
echo "Starting coordinator api" | ||
|
||
RUST_BACKTRACE=1 exec coordinator_api --config /coordinator/config.json \ | ||
--genesis /coordinator/genesis.json \ | ||
--http --http.addr "0.0.0.0" --http.port ${HTTP_PORT} \ | ||
--metrics --metrics.addr "0.0.0.0" --metrics.port ${METRICS_PORT} \ | ||
--log.debug |
Empty file.
Empty file.
Empty file.
Empty file.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
permissionless-batches/conf/proving-service/cloud-prover/config.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"prover_name_prefix": "prover", | ||
"keys_dir": "keys", | ||
"coordinator": { | ||
"base_url": "http://coordinator:8390", | ||
"retry_count": 10, | ||
"retry_wait_time_sec": 10, | ||
"connection_timeout_sec": 30 | ||
}, | ||
"l2geth": { | ||
"endpoint": "<L2 RPC with generated blocks reachable from Docker network>" | ||
}, | ||
"prover": { | ||
"circuit_type": 2, | ||
"supported_proof_types": [ | ||
1, | ||
2, | ||
3 | ||
], | ||
"circuit_version": "v0.13.1" | ||
}, | ||
"db_path": "db" | ||
} |
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
permissionless-batches/conf/proving-service/local-prover/config.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"sdk_config": { | ||
"prover_name_prefix": "local_prover", | ||
"keys_dir": "/keys", | ||
"db_path": "/db", | ||
"coordinator": { | ||
"base_url": "http://172.17.0.1:8556", | ||
"retry_count": 10, | ||
"retry_wait_time_sec": 10, | ||
"connection_timeout_sec": 30 | ||
}, | ||
"l2geth": { | ||
"endpoint": "<L2 RPC with generated blocks reachable from Docker network>" | ||
}, | ||
"prover": { | ||
"circuit_type": 2, | ||
"supported_proof_types": [1,2,3], | ||
"circuit_version": "v0.13.1" | ||
}, | ||
"health_listener_addr": "0.0.0.0:89" | ||
}, | ||
"circuits": { | ||
"euclidV2": { | ||
"hard_fork_name": "euclidV2", | ||
"workspace_path": "/openvm" | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
permissionless-batches/conf/proving-service/local-prover/prover_run.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/bash | ||
|
||
apt update | ||
apt install -y wget curl | ||
|
||
# release version | ||
if [ -z "${SCROLL_ZKVM_VERSION}" ]; then | ||
echo "SCROLL_ZKVM_VERSION not set" | ||
exit 1 | ||
fi | ||
|
||
BASE_DOWNLOAD_DIR="/openvm" | ||
# Ensure the base directory exists | ||
mkdir -p "$BASE_DOWNLOAD_DIR" | ||
|
||
# Define URLs for OpenVM files (No checksum verification) | ||
OPENVM_URLS=( | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/chunk/app.vmexe" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/chunk/openvm.toml" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/batch/app.vmexe" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/batch/openvm.toml" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app.vmexe" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app_euclidv1.vmexe" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/openvm.toml" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/verifier.bin" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/verifier.sol" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/digest_1.hex" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/digest_2.hex" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/digest_1_euclidv1.hex" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/digest_2_euclidv1.hex" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/params/kzg_bn254_22.srs" | ||
"https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/params/kzg_bn254_24.srs" | ||
) | ||
|
||
# Download OpenVM files (No checksum verification, but skips if file exists) | ||
for url in "${OPENVM_URLS[@]}"; do | ||
dest_subdir="$BASE_DOWNLOAD_DIR/$(basename $(dirname "$url"))" | ||
mkdir -p "$dest_subdir" | ||
|
||
filepath="$dest_subdir/$(basename "$url")" | ||
echo "Downloading $filepath..." | ||
curl -o "$filepath" -L "$url" | ||
done | ||
|
||
mkdir -p "$HOME/.openvm" | ||
ln -s "/openvm/params" "$HOME/.openvm/params" | ||
|
||
mkdir -p /usr/local/bin | ||
wget https://github.com/ethereum/solidity/releases/download/v0.8.19/solc-static-linux -O /usr/local/bin/solc | ||
chmod +x /usr/local/bin/solc | ||
|
||
mkdir -p /openvm/cache | ||
|
||
RUST_MIN_STACK=16777216 RUST_BACKTRACE=1 exec /prover/prover --config /prover/conf/config.json | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not related to this PR, but do we have some docs for the next step? e.g., withdraw the funds in L1. If any, it's nice to have it placed here.