test stuffs

This commit is contained in:
Ho
2025-11-19 16:56:44 +09:00
parent 40f2a0ee9b
commit 3685b24d0c
10 changed files with 150 additions and 9 deletions

View File

@@ -37,7 +37,12 @@ coordinator_tool:
localsetup: coordinator_api ## Local setup: build coordinator_api, copy config, and setup releases
mkdir -p build/bin/conf
@echo "Copying configuration files..."
cp -fL $(CURDIR)/conf/config.json $(CURDIR)/build/bin/conf/config.template.json
@if [ -f "$(PWD)/conf/config.template.json" ]; then \
SRC="$(PWD)/conf/config.template.json"; \
else \
SRC="$(CURDIR)/conf/config.json"; \
fi; \
cp -fL "$$SRC" "$(CURDIR)/build/bin/conf/config.template.json"
@echo "Setting up releases..."
cd $(CURDIR)/build && bash setup_releases.sh

View File

@@ -6,6 +6,9 @@ if [ -z "${SCROLL_ZKVM_VERSION}" ]; then
exit 1
fi
# default fork name from env or "galileo"
SCROLL_FORK_NAME="${SCROLL_FORK_NAME:-galileo}"
# set ASSET_DIR by reading from config.json
CONFIG_FILE="bin/conf/config.template.json"
if [ ! -f "$CONFIG_FILE" ]; then
@@ -28,7 +31,13 @@ for ((i=0; i<$VERIFIER_COUNT; i++)); do
# extract assets_path for current verifier
ASSETS_PATH=$(jq -r ".prover_manager.verifier.verifiers[$i].assets_path" "$CONFIG_FILE")
FORK_NAME=$(jq -r ".prover_manager.verifier.verifiers[$i].fork_name" "$CONFIG_FILE")
# skip if this verifier's fork doesn't match the target fork
if [ "$FORK_NAME" != "$SCROLL_FORK_NAME" ]; then
echo "Expect $SCROLL_FORK_NAME, skip current fork ($FORK_NAME)"
continue
fi
if [ "$ASSETS_PATH" = "null" ]; then
echo "Warning: Could not find assets_path for verifier $i, skipping..."
continue

View File

@@ -11,7 +11,7 @@
"verifiers": [
{
"features": "legacy_witness:openvm_13",
"assets_path": "assets",
"assets_path": "assets_feynman",
"fork_name": "feynman"
},
{

View File

@@ -9,7 +9,7 @@ ifndef END_BLOCK
$(error END_BLOCK is not set. Define it in .make.env or pass END_BLOCK=<end_block>)
endif
all: setup_db test_tool prepare_db import_data
all: setup_db test_tool import_data
clean:
docker compose down
@@ -42,9 +42,12 @@ setup_db: clean
fi; \
done
${GOOSE_CMD} up
GOOSE_MIGRATION_DIR=conf ${GOOSE_CMD} up-to 100
prepare_db:
reset_db:
GOOSE_MIGRATION_DIR=conf ${GOOSE_CMD} down
${GOOSE_CMD} down-to 0
${GOOSE_CMD} up
GOOSE_MIGRATION_DIR=conf ${GOOSE_CMD} up-to 100
test_tool:
@@ -64,8 +67,8 @@ import_data_galileo: build/bin/e2e_tool check_vars
import_data: build/bin/e2e_tool check_vars
build/bin/e2e_tool --config conf/config.json --codec ${CODEC_VERSION} ${BEGIN_BLOCK} ${END_BLOCK}
reimport_data: prepare_db import_data
reimport_data: reset_db import_data
coordinator_setup:
$(MAKE) -C ../../coordinator localsetup
SCROLL_FORK_NAME=${SCROLL_FORK_NAME} $(MAKE) -C ../../coordinator localsetup
cp -f conf/genesis.json ../../coordinator/build/bin/conf

View File

@@ -1,3 +1,4 @@
BEGIN_BLOCK?=35
END_BLOCK?=49
CODEC_VERSION?=8
CODEC_VERSION?=8
SCROLL_FORK_NAME=feynman

View File

@@ -0,0 +1,40 @@
{
"prover_manager": {
"provers_per_session": 1,
"session_attempts": 5,
"external_prover_threshold": 32,
"bundle_collection_time_sec": 180,
"batch_collection_time_sec": 180,
"chunk_collection_time_sec": 180,
"verifier": {
"min_prover_version": "v4.4.45",
"verifiers": [
{
"assets_path": "assets",
"fork_name": "feynman"
}
]
}
},
"db": {
"driver_name": "postgres",
"dsn": "postgres://dev:dev@localhost/scroll?sslmode=disable",
"maxOpenNum": 200,
"maxIdleNum": 20
},
"l2": {
"validium_mode": true,
"chain_id": 5343513301,
"l2geth": {
"endpoint": "http://cloak-xen-sequencer.sepolia.scroll.tech:8545/"
}
},
"auth": {
"secret": "prover secret key",
"challenge_expire_duration_sec": 3600,
"login_expire_duration_sec": 3600
},
"sequencer": {
"decryption_key": "ad25ba5de9f03fd9e3c81a1ad731c5c7e94ae2641f75ed7d3275312053b40f75"
}
}

View File

@@ -1,3 +1,4 @@
BEGIN_BLOCK?=10973711
END_BLOCK?=10973721
CODEC_VERSION?=8
CODEC_VERSION?=8
SCROLL_FORK_NAME=feynman

View File

@@ -0,0 +1,41 @@
{
"prover_manager": {
"provers_per_session": 1,
"session_attempts": 5,
"external_prover_threshold": 32,
"bundle_collection_time_sec": 180,
"batch_collection_time_sec": 180,
"chunk_collection_time_sec": 180,
"verifier": {
"min_prover_version": "v4.4.33",
"verifiers": [
{
"features": "legacy_witness:openvm_13",
"assets_path": "assets_feynman",
"fork_name": "feynman"
}
]
}
},
"db": {
"driver_name": "postgres",
"dsn": "postgres://dev:dev@localhost/scroll?sslmode=disable",
"maxOpenNum": 200,
"maxIdleNum": 20
},
"l2": {
"validium_mode": false,
"chain_id": 534351,
"l2geth": {
"endpoint": "<serach a public rpc endpoint like alchemy>"
}
},
"auth": {
"secret": "prover secret key",
"challenge_expire_duration_sec": 3600,
"login_expire_duration_sec": 3600
},
"sequencer": {
"decryption_key": "not need"
}
}

View File

@@ -1,3 +1,4 @@
BEGIN_BLOCK?=20278022
END_BLOCK?=20278025
CODEC_VERSION?=9
SCROLL_FORK_NAME=galileo

View File

@@ -0,0 +1,40 @@
{
"prover_manager": {
"provers_per_session": 1,
"session_attempts": 5,
"external_prover_threshold": 32,
"bundle_collection_time_sec": 180,
"batch_collection_time_sec": 180,
"chunk_collection_time_sec": 180,
"verifier": {
"min_prover_version": "v4.4.33",
"verifiers": [
{
"assets_path": "assets",
"fork_name": "galileo"
}
]
}
},
"db": {
"driver_name": "postgres",
"dsn": "postgres://dev:dev@localhost/scroll?sslmode=disable",
"maxOpenNum": 200,
"maxIdleNum": 20
},
"l2": {
"validium_mode": false,
"chain_id": 534351,
"l2geth": {
"endpoint": "<serach a public rpc endpoint like alchemy>"
}
},
"auth": {
"secret": "prover secret key",
"challenge_expire_duration_sec": 3600,
"login_expire_duration_sec": 3600
},
"sequencer": {
"decryption_key": "not need"
}
}