Skip to content

Commit

Permalink
Merge branch 'feat-deterministic-deployment' into feat-support-volati…
Browse files Browse the repository at this point in the history
…le-exchange-rate
  • Loading branch information
yiweichi authored Oct 14, 2024
2 parents 4bd7361 + f1454a1 commit e87ed8e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build and publish scroll-alpine image
# This workflow aims to build images from the feat-deterministic-deployment branch

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:

jobs:
build:
name: Clone, Build, Publish
Expand Down Expand Up @@ -41,7 +41,6 @@ jobs:
- name: Build deploy image
id: build_deploy_image
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: scrolltech/scroll-stack-contracts
uses: docker/build-push-action@v3
with:
Expand All @@ -50,13 +49,11 @@ jobs:
context: .
file: docker/Dockerfile.deploy
tags: |
${{ env.REPOSITORY }}:deploy-${{ github.ref_name }}
${{ env.REPOSITORY }}:latest
${{ env.REPOSITORY }}:deploy-${{ github.sha }}
- name: Build gen image
id: build_gen_image
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: scrolltech/scroll-stack-contracts
uses: docker/build-push-action@v3
with:
Expand All @@ -65,5 +62,4 @@ jobs:
context: .
file: docker/Dockerfile.gen-configs
tags: |
${{ env.REPOSITORY }}:gen-configs-${{ github.ref_name }}
${{ env.REPOSITORY }}:latest
${{ env.REPOSITORY }}:gen-configs-${{ github.sha }}
4 changes: 4 additions & 0 deletions docker/config-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ L2GETH_KEYSTORE = '{"address":"756ea06bdee36de11f22dcca45a31d8a178ef3c6","crypto
L2GETH_PASSWORD = "scroll2022"
L2GETH_NODEKEY = "2f59ff2fdee1c42a3d8c8980c313bc8d6c2557463f7bb92b0f0bc89a6d3cbf01"
L2_GETH_STATIC_PEERS = '["enode://848a7d59dd8f60dd1a51160e6bc15c194937855443de9be4b2abd83e11a5c4ac21d61d065448c5c520826fe83f1f29eb5a452daccca27b8113aa897074132507@l2-sequencer:30303"]'
L2GETH_CCC_NUMWORKERS = 5

[rollup]

Expand Down Expand Up @@ -103,6 +104,9 @@ L2_TX_FEE_VAULT = "0x5300000000000000000000000000000000000005"

[coordinator]

CHUNK_COLLECTION_TIME_SEC = 3600
BATCH_COLLECTION_TIME_SEC = 1800
BUNDLE_COLLECTION_TIME_SEC = 600
COORDINATOR_JWT_SECRET_KEY = "e788b62d39254928a821ac1c76b274a8c835aa1e20ecfb6f50eb10e87847de44"

[ingress]
Expand Down
2 changes: 1 addition & 1 deletion docker/templates/coordinator-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"provers_per_session": 1,
"session_attempts": 100,
"chunk_collection_time_sec": 3600,
"batch_collection_time_sec": 600,
"batch_collection_time_sec": 1800,
"bundle_collection_time_sec": 600,
"verifier": {
"mock_mode": false,
Expand Down
6 changes: 6 additions & 0 deletions scripts/deterministic/Configuration.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ abstract contract Configuration is Script {
address internal L1_PLONK_VERIFIER_ADDR;

// coordinator
string internal CHUNK_COLLECTION_TIME_SEC;
string internal BATCH_COLLECTION_TIME_SEC;
string internal BUNDLE_COLLECTION_TIME_SEC;
string internal COORDINATOR_JWT_SECRET_KEY;

// frontend
Expand Down Expand Up @@ -147,6 +150,9 @@ abstract contract Configuration is Script {
L1_FEE_VAULT_ADDR = cfg.readAddress(".contracts.L1_FEE_VAULT_ADDR");
L1_PLONK_VERIFIER_ADDR = cfg.readAddress(".contracts.L1_PLONK_VERIFIER_ADDR");

CHUNK_COLLECTION_TIME_SEC = cfg.readString(".coordinator.CHUNK_COLLECTION_TIME_SEC");
BATCH_COLLECTION_TIME_SEC = cfg.readString(".coordinator.BATCH_COLLECTION_TIME_SEC");
BUNDLE_COLLECTION_TIME_SEC = cfg.readString(".coordinator.BUNDLE_COLLECTION_TIME_SEC");
COORDINATOR_JWT_SECRET_KEY = cfg.readString(".coordinator.COORDINATOR_JWT_SECRET_KEY");

EXTERNAL_RPC_URI_L1 = cfg.readString(".frontend.EXTERNAL_RPC_URI_L1");
Expand Down
4 changes: 4 additions & 0 deletions scripts/deterministic/GenerateConfigs.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ contract GenerateCoordinatorConfig is DeployScroll {
string memory template = vm.readFile(COORDINATOR_CONFIG_TEMPLATE_PATH);
vm.writeFile(COORDINATOR_CONFIG_PATH, template);

vm.writeJson(CHUNK_COLLECTION_TIME_SEC, COORDINATOR_CONFIG_PATH, ".prover_manager.chunk_collection_time_sec");
vm.writeJson(BATCH_COLLECTION_TIME_SEC, COORDINATOR_CONFIG_PATH, ".prover_manager.batch_collection_time_sec");
vm.writeJson(BUNDLE_COLLECTION_TIME_SEC, COORDINATOR_CONFIG_PATH, ".prover_manager.bundle_collection_time_sec");

vm.writeJson(vm.toString(CHAIN_ID_L2), COORDINATOR_CONFIG_PATH, ".l2.chain_id");
vm.writeJson(COORDINATOR_JWT_SECRET_KEY, COORDINATOR_CONFIG_PATH, ".auth.secret");
}
Expand Down

0 comments on commit e87ed8e

Please sign in to comment.