Skip to content

Commit 12513ad

Browse files
shu-unifrazimphaThegarammssassiidependabot[bot]
authored
Try merge v3.0.0 (#19)
* hotfix: forbid enforced gateway (scroll-tech#101) Co-authored-by: Péter Garamvölgyi <peter@scroll.io> * chore: bump version 2.0.1 (scroll-tech#102) * ci: bump GitHub Action versions (scroll-tech#107) * ci: add Slither static-analysis (scroll-tech#103) Co-authored-by: Péter Garamvölgyi <peter@scroll.io> * new `ScrollChainCommitmentVerifier` (scroll-tech#95) Co-authored-by: Péter Garamvölgyi <peter@scroll.io> * build(deps): bump base-x from 3.0.9 to 3.0.11 (scroll-tech#108) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add L2SystemContract (scroll-tech#114) * feat: add e2e devnet deployment scripts (scroll-tech#97) * feat: add pause controller (scroll-tech#117) * feat: consider EIP-7623 floor gas in message queue (scroll-tech#118) * feat: add L1SystemConfig events (scroll-tech#119) * feat: require top-level call to commitAndFinalizeBatch (scroll-tech#120) * feat: add new zkevm verifier for Feynman upgrade (scroll-tech#123) * feat(feynman): update L1GasPriceOracle (scroll-tech#124) * remove unused contracts and functions (scroll-tech#110) Co-authored-by: Péter Garamvölgyi <peter@scroll.io> * fix: allow only top level call in commitAndFinalizeBatch (scroll-tech#126) * feat: support resetPauseCooldownPeriod (scroll-tech#127) * fix conflicts part 1 fix conflicts part2 fix conflict part3 fix compile part1 fix compile part2 fix compile part3 register V8 verifier: feynman upgrade todo revert this after test fix rollup-config missing endpoint remove debug log add -vvvv set batch size to 10 some fix fix read private key use a small batch size 5, so the l2-sequencer won't get stuck * fix: read from file still required while run gen-configs * improve verify.sh * use deterministic foundry version v1.3.0-rc2 * fix rollup-config.json gas_price_oracle_contract_address * remove --resume * set BATCH_SIZE=7 * fix bug: missing L2_SYSTEM_CONFIG other missing fields in genesis.json * set genesisStateRoot default to null set missingHeaderFieldsSHA256 default to null //TODO * replace scrolltech with dogeos69 * verify.sh add L2SystemConfig --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Xi Lin <zimpha@gmail.com> Co-authored-by: Péter Garamvölgyi <peter@scroll.io> Co-authored-by: Souhail M. <65525816+mssassii@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Morty <70688412+yiweichi@users.noreply.github.com>
1 parent e22c42d commit 12513ad

File tree

98 files changed

+2117
-5060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2117
-5060
lines changed

.github/workflows/contracts.yml

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
persist-credentials: false
3636

3737
- name: Install Foundry
38-
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c # v1.3.1
38+
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0
3939
with:
4040
version: nightly
4141

@@ -84,7 +84,7 @@ jobs:
8484
run : lcov --rc branch_coverage=1 --remove ./lcov.info -o ./lcov.info.pruned 'src/mocks/*' 'src/test/*' 'scripts/*' 'node_modules/*' 'lib/*' --ignore-errors unused,unused
8585

8686
- name: Upload coverage reports to Codecov
87-
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
87+
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
8888
env:
8989
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9090
with:
@@ -136,4 +136,59 @@ jobs:
136136
run: npx hardhat compile
137137

138138
- name: Run hardhat tests
139-
run: npx hardhat test
139+
run: npx hardhat test
140+
141+
slither:
142+
if: github.event.pull_request.draft == false
143+
needs: foundry
144+
runs-on: ubuntu-latest
145+
permissions:
146+
statuses: write
147+
security-events: write
148+
149+
steps:
150+
- uses: actions/checkout@v4
151+
with:
152+
submodules: recursive
153+
persist-credentials: false
154+
155+
- uses: actions/setup-node@v4
156+
with:
157+
node-version: '18'
158+
159+
- run: yarn install --frozen-lockfile
160+
161+
- uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0
162+
with:
163+
version: nightly
164+
165+
- name: Build contracts
166+
run: forge build --build-info --out out --evm-version cancun
167+
168+
- uses: actions/setup-python@v5
169+
with:
170+
python-version: '3.11'
171+
172+
- run: |
173+
python -m pip install --upgrade pip
174+
pip install slither-analyzer==0.11.3
175+
176+
- name: Run Slither (High severity gate)
177+
run: |
178+
slither . \
179+
--filter-paths "src/test/*|src/mocks/*|scripts/*|node_modules" \
180+
--foundry-out-directory out \
181+
--exclude-dependencies \
182+
--exclude-medium \
183+
--exclude-low \
184+
--exclude-informational \
185+
--fail-high \
186+
--json slither-report.json \
187+
--markdown-root slither-report.md
188+
189+
- uses: actions/upload-artifact@v4
190+
with:
191+
name: slither-static-analysis
192+
path: |
193+
slither-report.json
194+
slither-report.md

.github/workflows/docker-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ jobs:
7373

7474
- name: Build deploy image
7575
id: build_deploy_image
76-
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
76+
env:
77+
REPOSITORY: ${{ env.DOCKER_REPOSITORY }}
78+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0
7779
with:
7880
platforms: linux/amd64,linux/arm64
7981
push: true
@@ -85,7 +87,9 @@ jobs:
8587
8688
- name: Build gen image
8789
id: build_gen_image
88-
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
90+
env:
91+
REPOSITORY: ${{ env.DOCKER_REPOSITORY }}
92+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0
8993
with:
9094
platforms: linux/amd64,linux/arm64
9195
push: true

.github/workflows/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
persist-credentials: false
2424

2525
- name: Install the latest version of uv
26-
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
26+
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
2727

2828
- name: Run zizmor
2929
run: uvx zizmor --format sarif . > results.sarif

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ broadcast
1919

2020
# Visual Studio Code
2121
.vscode
22+
23+
# OS
24+
.DS_Store
25+
26+
# config
27+
scripts/deterministic/config/config-contracts.toml

docker/Dockerfile.base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN curl -L https://foundry.paradigm.xyz | bash
2222
ENV PATH="/root/.foundry/bin:${PATH}"
2323

2424
# Run foundryup to update Foundry
25-
RUN foundryup
25+
RUN foundryup -i v1.3.0-rc2
2626

2727
# copy dependencies
2828
COPY ./lib /contracts/lib

docker/Dockerfile.gen-configs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@ SHELL ["/bin/bash", "-c"]
88
WORKDIR /contracts
99

1010
# copy script configs
11-
COPY ./docker/templates/balance-checker-config.json /contracts/docker/templates/balance-checker-config.json
12-
COPY ./docker/templates/bridge-history-config.json /contracts/docker/templates/bridge-history-config.json
13-
COPY ./docker/templates/chain-monitor-config.json /contracts/docker/templates/chain-monitor-config.json
14-
COPY ./docker/templates/config-contracts.toml /contracts/docker/templates/config-contracts.toml
15-
COPY ./docker/templates/coordinator-config.json /contracts/docker/templates/coordinator-config.json
16-
COPY ./docker/templates/genesis.json /contracts/docker/templates/genesis.json
17-
COPY ./docker/templates/rollup-config.json /contracts/docker/templates/rollup-config.json
18-
COPY ./docker/templates/rollup-explorer-backend-config.json /contracts/docker/templates/rollup-explorer-backend-config.json
19-
COPY ./docker/templates/admin-system-backend-config.json /contracts/docker/templates/admin-system-backend-config.json
11+
COPY ./docker/templates/ /contracts/docker/templates/
2012

2113
COPY ./docker/scripts/gen-configs.sh /contracts/docker/scripts/gen-configs.sh
2214

docker/scripts/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
latest_commit=$(git log -1 --pretty=format:%H)
44
tag=${latest_commit}
5+
56
REPO="dogeos69/scroll-stack-contracts"
67
echo "Using Docker image tag: $tag"
78
echo ""

docker/scripts/deploy.sh

Lines changed: 23 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,46 @@
11
#!/bin/sh
2+
# Enable timestamped execution trace to show progress with time and line numbers
3+
export PS4='$(date "+%Y-%m-%dT%H:%M:%S%z") ${0##*/}:${LINENO}: '
24
echo "=== SCRIPT START ==="
35
export FOUNDRY_EVM_VERSION="cancun"
46
export FOUNDRY_BYTECODE_HASH="none"
5-
set -e
7+
set -ex
68

7-
echo "Environment variables:"
8-
echo "FOUNDRY_EVM_VERSION: $FOUNDRY_EVM_VERSION"
9-
echo "FOUNDRY_BYTECODE_HASH: $FOUNDRY_BYTECODE_HASH"
10-
echo "BATCH_SIZE: $BATCH_SIZE"
11-
12-
if [ "${L1_RPC_ENDPOINT}" = "" ]; then
13-
echo "L1_RPC_ENDPOINT is not set"
14-
L1_RPC_ENDPOINT="http://host.docker.internal:8543"
15-
fi
9+
CONFIG_FILE="./volume/config.toml"
1610

17-
if [ "$L2_RPC_ENDPOINT" = "" ]; then
18-
echo "L2_RPC_ENDPOINT is not set"
19-
L2_RPC_ENDPOINT="http://host.docker.internal:8545"
20-
fi
21-
22-
if [ "${BATCH_SIZE}" = "" ]; then
23-
BATCH_SIZE="100"
24-
fi
11+
# Set default values for environment variables if they are not set
12+
L1_RPC_ENDPOINT="${L1_RPC_ENDPOINT}"
13+
L2_RPC_ENDPOINT="${L2_RPC_ENDPOINT}"
14+
# Using a smaller batch size as a compromise between the slow but reliable --slow flag and the fast but potentially unreliable default.
15+
BATCH_SIZE="7"
2516

2617
echo "using L1_RPC_ENDPOINT = $L1_RPC_ENDPOINT"
2718
echo "using L2_RPC_ENDPOINT = $L2_RPC_ENDPOINT"
19+
echo "Environment variables:"
20+
echo "FOUNDRY_EVM_VERSION: $FOUNDRY_EVM_VERSION"
21+
echo "FOUNDRY_BYTECODE_HASH: $FOUNDRY_BYTECODE_HASH"
22+
echo "BATCH_SIZE: $BATCH_SIZE"
2823

2924
# simulate L1
3025
echo ""
3126
echo "simulating on L1"
32-
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L1_RPC_ENDPOINT" --sig "run(string,string)" "L1" "verify-config" || exit 1
27+
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L1_RPC_ENDPOINT" --sig "run(string,string)" "L1" "verify-config"
28+
29+
# deploy L1
30+
echo ""
31+
echo "deploying on L1"
32+
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L1_RPC_ENDPOINT" --batch-size "${BATCH_SIZE}" --sig "run(string,string)" "L1" "verify-config" --broadcast --json
33+
3334

3435
# simulate L2
3536
echo ""
3637
echo "simulating on L2"
37-
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L2_RPC_ENDPOINT" --sig "run(string,string)" "L2" "verify-config" --legacy || exit 1
38+
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L2_RPC_ENDPOINT" --sig "run(string,string)" "L2" "verify-config" --legacy
3839

39-
# deploy L1
40-
echo ""
41-
echo "deploying on L1"
42-
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L1_RPC_ENDPOINT" --batch-size "$BATCH_SIZE" --sig "run(string,string)" "L1" "verify-config" --broadcast || exit 1
4340

4441
# deploy L2
4542
echo ""
4643
echo "deploying on L2"
47-
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L2_RPC_ENDPOINT" --batch-size "$BATCH_SIZE" --sig "run(string,string)" "L2" "verify-config" --broadcast --legacy || exit 1
48-
49-
# log broadcast files
50-
51-
echo "=== START BROADCAST FILES ==="
52-
echo "Current directory: $(pwd)"
53-
echo "Broadcast files location: broadcast/DeployScroll.s.sol/*/*"
54-
echo "Found files:"
55-
ls -la broadcast/DeployScroll.s.sol/*/* || echo "No files found"
56-
echo "Broadcast files content:"
44+
forge script scripts/deterministic/DeployScroll.s.sol:DeployScroll --rpc-url "$L2_RPC_ENDPOINT" --batch-size "$BATCH_SIZE" --sig "run(string,string)" "L2" "verify-config" --broadcast --legacy --json
5745

58-
for file in broadcast/DeployScroll.s.sol/*/*; do
59-
if [ -f "$file" ]; then
60-
echo "$file:"
61-
cat "$file"
62-
echo ""
63-
fi
64-
done
65-
echo "=== END BROADCAST FILES ==="
46+
echo "=== SCRIPT END ==="

docker/scripts/gen-configs.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,25 @@ echo "generating rollup-config.yaml"
4949
forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateRollupConfig || exit 1
5050
format_config_file "./volume/rollup-config.yaml"
5151

52-
echo ""
53-
echo "generating coordinator-config.yaml"
54-
forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateCoordinatorConfig || exit 1
55-
format_config_file "./volume/coordinator-config.yaml"
52+
# echo ""
53+
# echo "generating coordinator-config.yaml"
54+
# forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateCoordinatorConfig || exit 1
55+
# format_config_file "./volume/coordinator-config.yaml"
5656

5757
echo ""
5858
echo "generating chain-monitor-config.yaml"
5959
forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateChainMonitorConfig || exit 1
6060
format_config_file "./volume/chain-monitor-config.yaml"
6161

62-
echo ""
63-
echo "generating bridge-history-config.yaml"
64-
forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateBridgeHistoryConfig || exit 1
65-
format_config_file "./volume/bridge-history-config.yaml"
62+
# echo ""
63+
# echo "generating bridge-history-config.yaml"
64+
# forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateBridgeHistoryConfig || exit 1
65+
# format_config_file "./volume/bridge-history-config.yaml"
6666

67-
echo ""
68-
echo "generating balance-checker-config.yaml"
69-
forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateBalanceCheckerConfig || exit 1
70-
format_config_file "./volume/balance-checker-config.yaml"
67+
# echo ""
68+
# echo "generating balance-checker-config.yaml"
69+
# forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateBalanceCheckerConfig || exit 1
70+
# format_config_file "./volume/balance-checker-config.yaml"
7171

7272
echo ""
7373
echo "generating frontend-config.yaml"
@@ -79,7 +79,7 @@ echo "generating rollup-explorer-backend-config.yaml"
7979
forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateRollupExplorerBackendConfig || exit 1
8080
format_config_file "./volume/rollup-explorer-backend-config.yaml"
8181

82-
echo ""
83-
echo "generating admin-system-backend-config.yaml"
84-
forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateAdminSystemBackendConfig || exit 1
85-
format_config_file "./volume/admin-system-backend-config.yaml"
82+
# echo ""
83+
# echo "generating admin-system-backend-config.yaml"
84+
# forge script scripts/deterministic/GenerateConfigs.s.sol:GenerateAdminSystemBackendConfig || exit 1
85+
# format_config_file "./volume/admin-system-backend-config.yaml"

0 commit comments

Comments
 (0)