Skip to content

scroll stable #250

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

Closed
wants to merge 231 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
c31cd96
squash scroll fork diffs
lispc Dec 13, 2022
3a74d93
disable some constraints for super circuit
lispc Dec 21, 2022
047f4d2
RLP Circuit and RLP Table (#225)
roynalnaruto Dec 26, 2022
f1d60b8
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Dec 27, 2022
0ac26f4
fix conflicts after merge
lispc Dec 27, 2022
849bf2a
fix native transfer
lispc Dec 27, 2022
d6f0e6d
Merge branch 'scroll-stable-syncing' into mock-prove-1227
lispc Dec 27, 2022
32b4e96
Merge remote-tracking branch 'origin/main' into mock-prove-1227
lispc Dec 27, 2022
ed428b6
add mock prove rlp circuit
lispc Dec 27, 2022
ce7e0b0
mock prove rlp
lispc Dec 27, 2022
d7df16c
bug fix: tag_rindex can be as large as 2^24-1
kunxian-xia Dec 27, 2022
d971598
Merge remote-tracking branch 'scroll/fix/rlp-circuit' into mock-prove…
lispc Dec 27, 2022
4a0a195
clippy
lispc Dec 27, 2022
5795133
fix LOG reversion; log msize when trace
lispc Dec 28, 2022
c7771ad
fix tx.id for multi block
lispc Dec 28, 2022
7587594
add "onephase" feature to disable multi phase behavior. Debug only
lispc Dec 29, 2022
4addc1c
speedup bytecode circuit assignment
lispc Jan 2, 2023
d0acd9d
opt(assignment): speedup EndBlock padding
lispc Dec 30, 2022
7bb4a39
Public Inputs Circuit (#238)
lispc Jan 7, 2023
704ee35
(1) make keccak witgen parallel (2) fix TransactionRequest from Trans…
lispc Jan 7, 2023
a25038e
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Jan 7, 2023
43d4b35
fix conflicts after merge
lispc Jan 7, 2023
25c1170
CI: update to use self-hosted runner (#240)
silathdiir Jan 9, 2023
768553a
add "codehash" feature; reduce the SecondPhase code diffs
lispc Jan 10, 2023
3454cd5
Fix to ignore CI actions when target is `main` branch (source is `scr…
silathdiir Jan 10, 2023
f80dd0e
improve mainnet fuzz tests
lispc Jan 10, 2023
06b9539
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Jan 10, 2023
b81524e
Fix/rlp data prefix (#243)
kunxian-xia Jan 11, 2023
62a60d7
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Jan 11, 2023
2eaaee1
Merge branch 'scroll-stable' of github.com:scroll-tech/zkevm-circuits…
lispc Jan 11, 2023
8c51e3f
add precompile (#237)
lightsing Jan 11, 2023
829dbfa
fail fast for bytecode circuit
lispc Jan 7, 2023
c1e5748
add rwc in bus mapping log
lispc Jan 7, 2023
3fbb1fe
better check_rw_lookup log: avoid repeated ctx
lispc Jan 11, 2023
8ef74e6
fix circuits for precompile; re-enable all state circuit constraints …
lispc Jan 11, 2023
dabfbca
Tx Circuit (#220)
roynalnaruto Jan 11, 2023
3550eba
Fix cache-restore conflict in CI. (#245)
silathdiir Jan 11, 2023
185bdc5
Feat/scroll create (#247)
z2trillion Jan 11, 2023
117417e
opt 1st pass assignment of keccak; more assignment log of rlp/state
lispc Jan 12, 2023
c2c65bc
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Jan 12, 2023
6250e0b
update fft optimized halo2
lispc Jan 12, 2023
260a9b3
Fix to also `chown` Go dirs in CI. (#249)
silathdiir Jan 12, 2023
c7c8322
CI: delete previous cached Go folder to fix conflict in CI (#251)
silathdiir Jan 12, 2023
c11f82b
Skip caller_address check for non-legacy tx (#253)
kunxian-xia Jan 12, 2023
cf35514
add CHECK_MEM_STRICT env var
lispc Jan 12, 2023
78a47a6
fix delegatecall when insufficient balance
DreamWuGit Jan 12, 2023
bc5c3f3
fix call; allow none tx.chain_id
lispc Jan 12, 2023
ad3e81f
Bug-fix: make the tx circuit universal universal (#255)
kunxian-xia Jan 13, 2023
5786f33
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Jan 15, 2023
4cfb1f6
fix merge conflicts after evm challenge api refactor merge
lispc Jan 15, 2023
a5edeba
disable some codehash constraints in create gadget
lispc Jan 15, 2023
ceb6628
only enable "onephase" feature in CI
lispc Jan 16, 2023
bbd7d3d
fix extcodecopy: non-exsit-proof, challenge api, and other fixes
lispc Jan 16, 2023
7ce45ee
fix check rw lookup
lispc Jan 16, 2023
a19c6ca
Merge remote-tracking branch 'origin/fix/extcodecopy' into scroll-sta…
lispc Jan 16, 2023
56f3d72
introduce zktrie circuit and add it to super circuit (#254)
noel2004 Jan 16, 2023
7397222
fix
lispc Jan 16, 2023
8591fc0
Merge remote-tracking branch 'origin/fxi/check_rw_lookup' into scroll…
lispc Jan 16, 2023
7496bb5
Merge branch 'scroll-stable' of github.com:scroll-tech/zkevm-circuits…
lispc Jan 16, 2023
7a6f06a
Merge branch 'scroll-stable' into scroll-stable-challenge
lispc Jan 16, 2023
e9a7821
Merge remote-tracking branch 'origin/fix/extcodecopy' into scroll-stable
lispc Jan 16, 2023
59b61f5
fix super circuit mock randomness; fix mpt circuit row limit; fixing …
lispc Jan 16, 2023
9e0cd65
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Jan 17, 2023
a7e7e9a
fix mpt table assignment
lispc Jan 17, 2023
3a69fa2
bug-fix: phase check of cols in tx circuit
kunxian-xia Jan 18, 2023
80ab6ea
almost fix mpt<->state...
lispc Jan 18, 2023
e1e8d97
add check for 'onephase'
lispc Jan 18, 2023
0aab093
use onephase feature to control challenge api
lispc Jan 18, 2023
4b604ad
fix mpt/block table phase; speedup ci by reducing state circuit paddi…
lispc Jan 18, 2023
b6d150c
handle tx creation
DreamWuGit Jan 19, 2023
b296070
add acount once write for creation
DreamWuGit Jan 19, 2023
3ddf66d
fix evm circuit phase2 cells
lispc Jan 19, 2023
de2e8bf
Fix to parallel run `callop_simple` test.
silathdiir Jan 19, 2023
15e5c76
fix lookup issue
DreamWuGit Jan 19, 2023
4311496
Merge branch 'scroll-stable' into handle_tx_creation
DreamWuGit Jan 19, 2023
f0770a1
chores
DreamWuGit Jan 19, 2023
99e6890
remove lines
DreamWuGit Jan 19, 2023
a72dbe4
Integrate `skip-duplicate-actions` to CI.
silathdiir Jan 19, 2023
e01f4b9
fixing challenge api...
lispc Jan 19, 2023
1d2b76b
Fix to no skip CI for `ready_for_review`. (#266)
silathdiir Jan 19, 2023
5e19e90
fix mpt table assign
lispc Jan 20, 2023
bc48ea0
Feat: speed up the witness assignment of RLP/Tx circuits (#267)
kunxian-xia Jan 20, 2023
0051f34
estimate ecmul in super circuit log; upgrade rust
lispc Jan 26, 2023
2801ad9
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Jan 28, 2023
1bac8f8
fix precompile; more robust mainnet tests;
lispc Jan 29, 2023
87f428b
fix conflicts
lispc Jan 29, 2023
7ad71d5
Merge branch 'scroll-stable' into fix/return-data
lispc Jan 29, 2023
526542b
fix conflicts
lispc Jan 29, 2023
b286773
begin_tx: change read codehash and transfer order
lispc Jan 29, 2023
25ffff9
fix `make test-all`
lispc Jan 30, 2023
5da4c2d
fix: rw counter change incorrect
roynalnaruto Jan 30, 2023
a4abb74
Merge pull request #276 from scroll-tech/fix/begin-tx
roynalnaruto Jan 30, 2023
cee53b8
fix some non exist account lookup; dedup keccak inputs (#277)
lispc Jan 30, 2023
393cfac
Add timeout for action cache in CI. (#278)
silathdiir Jan 30, 2023
f9ff42a
Feat: include state roots in PI circuit (#270)
kunxian-xia Jan 30, 2023
f30901a
fixing state_root connection between state<->pi...
lispc Jan 31, 2023
65575c8
Merge branch 'scroll-stable' into handle_tx_creation
roynalnaruto Feb 1, 2023
01d6c74
CI: add `SECRET_REPO_DEPLOY_KEY` for private crates (#281)
silathdiir Feb 1, 2023
6908b67
account write for contract creation
roynalnaruto Feb 1, 2023
ba87a2b
Merge branch 'scroll-stable' into handle_tx_creation
roynalnaruto Feb 1, 2023
aa6accc
[wip]: keccak input/output
roynalnaruto Feb 1, 2023
27fa89f
disable state root connection pi<->state; allow codehash 0->keccak(ni…
lispc Feb 2, 2023
cf9bdfa
Merge branch 'scroll-stable' into handle_tx_creation
roynalnaruto Feb 2, 2023
ef29c24
[wip]: some progress, some todos
roynalnaruto Feb 2, 2023
33fc436
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Feb 3, 2023
b83fd6f
keccak lookup for contract addr
roynalnaruto Feb 3, 2023
a313cef
fix test build
roynalnaruto Feb 3, 2023
40295ce
lint
lispc Feb 3, 2023
a0b6ac1
Merge branch 'main' into scroll-stable
lispc Feb 3, 2023
06a7244
Merge branch 'scroll-stable' into handle_tx_creation
roynalnaruto Feb 3, 2023
0b379e3
add to sha3 inputs for contract creation tx
roynalnaruto Feb 3, 2023
843cebd
fix: untrimmed contract address
roynalnaruto Feb 3, 2023
9523dce
fix: keccak lookup complete
roynalnaruto Feb 4, 2023
e313346
keccak-rlc-phase2: compute input_̑rlc in the second phase
Feb 4, 2023
66ef468
keccak-rlc-phase2: fmt
Feb 5, 2023
a2caf17
minor changes, comments
roynalnaruto Feb 5, 2023
598af5f
more tests
roynalnaruto Feb 6, 2023
8b7c865
fix: clippy
roynalnaruto Feb 6, 2023
7cdeda5
FEAT: use halo2-ecc's ecdsa implementation [Ready for review] (#282)
silathdiir Feb 6, 2023
9e37959
Merge branch 'scroll-stable' into handle_tx_creation
roynalnaruto Feb 6, 2023
b08a539
many fixes after sync upstream (#287)
lispc Feb 6, 2023
2946b33
fix: no write required for init code
roynalnaruto Feb 6, 2023
d1b93ec
Merge branch 'scroll-stable' into handle_tx_creation
roynalnaruto Feb 6, 2023
296c166
upgrade halo2 (#290)
lispc Feb 6, 2023
f2f7642
fix: account write for deployed contract should be reversible
roynalnaruto Feb 6, 2023
c6ba739
Merge branch 'scroll-stable' into handle_tx_creation
roynalnaruto Feb 6, 2023
fbeb27b
chore: remove rlp dep, reuse from ethers
roynalnaruto Feb 6, 2023
fc79909
chore: refactor (closer to upstream sttructure)
roynalnaruto Feb 6, 2023
8b2a0d8
Merge pull request #263 from scroll-tech/handle_tx_creation
roynalnaruto Feb 7, 2023
df547c0
OOG error Circuit for `SLOAD` and `SSTORE` (#288)
silathdiir Feb 7, 2023
67cbbe0
Handle OOG of callcode, delegatecall and staticcall in `error_oog_cal…
silathdiir Feb 7, 2023
54e78a4
scroll-stable-rebase: Circuit for `ErrorInvalidOpcode` state (#294)
silathdiir Feb 7, 2023
1c941da
add RwMap::check_value (#297)
lispc Feb 8, 2023
ec00028
fix ecdsa witness gen bug (#298)
zhenfeizhang Feb 8, 2023
fcdd22a
add oog log (#299)
DreamWuGit Feb 8, 2023
97e8968
make ecdsa public (#300)
lispc Feb 8, 2023
0269001
Handle all `Precompile` errors to unimplemented (#301)
silathdiir Feb 9, 2023
4dd7b83
Sync OOG Call update from upstream (#303)
silathdiir Feb 9, 2023
62b6349
feat: poseidon circuit and poseidon bytecode circuit (#291)
noel2004 Feb 9, 2023
a48b403
add precompile for begin-tx (#306)
lightsing Feb 9, 2023
0a11301
fix standalone circuit's issue (#312)
noel2004 Feb 10, 2023
269ca38
Sync small fixes of merging `ErrorInvalidOpcode` in upstream (#311)
silathdiir Feb 10, 2023
c85ace5
[bug fix]: add phase 2 flex gate config (#310)
zhenfeizhang Feb 10, 2023
1cb75a2
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Feb 12, 2023
828b756
fix conflicts
lispc Feb 12, 2023
1308f42
Merge remote-tracking branch 'scroll/keccak-rlc-phase2' into scroll-s…
lispc Feb 12, 2023
212c9c3
fix testool (#317)
lispc Feb 13, 2023
629fed9
Refactor RLP logic into RLP Create Gadget (#316)
roynalnaruto Feb 14, 2023
d2d1360
Temporary fix: poseidon circuit (#319)
noel2004 Feb 14, 2023
8cac03c
fix/challenges-mutability: remove unnecessary &mut in Challenges::val…
naure Feb 15, 2023
4004ae2
fix tx circuit with 0 txs (#330)
lispc Feb 15, 2023
b0542c5
fix/disable-root-circuit-tests: ignore tests that are not supported (…
naure Feb 15, 2023
2a87652
many fixes for compatibility (#321)
lispc Feb 16, 2023
82c44f0
fix: restrict `block_number == current_block_number - 1` in `BlockHas…
silathdiir Feb 16, 2023
e391628
fix/keccak-decode-overflow: calculate with bitshifts in u64 (#335)
naure Feb 16, 2023
58caad9
add batch chain id
lispc Feb 16, 2023
1d69572
fix EndInnerBlock
lispc Feb 16, 2023
ab05f73
add poseidon in super circuit row estimation
lispc Feb 17, 2023
a61f08c
modify pi circuit to be compatible with bridge contract (#334)
kunxian-xia Feb 20, 2023
fcf59e7
CI: replace to Rust smart cache (#341)
silathdiir Feb 20, 2023
98a4738
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Feb 20, 2023
8059c90
fix conflicts
lispc Feb 20, 2023
045c4ed
revert ci changes
lispc Feb 20, 2023
b8cdd67
comment prev_value check
lispc Feb 20, 2023
4a47f74
sync-halo2-5689a747: explicit type unsafety in tests (#346)
naure Feb 20, 2023
73f68b7
test/keccak-normalize-table: unittest for lookup tables (#326)
naure Feb 20, 2023
06e9d64
Fix/ecdsa err Fix #344 (#345)
zhenfeizhang Feb 21, 2023
cbdce3a
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Feb 23, 2023
1946abf
fix conflicts
lispc Feb 23, 2023
360083b
add oog static memory (#327)
lightsing Feb 23, 2023
1a86698
Revert to use Jenkins self host.
silathdiir Feb 23, 2023
dd2c7b5
Fix `fee` to not reversible in begin tx (#348)
silathdiir Feb 23, 2023
34f282e
Merge remote-tracking branch 'scroll/scroll-stable' into HEAD
lispc Feb 23, 2023
b5737c3
not use EvmCircuitCached
lispc Feb 23, 2023
e35a277
Merge remote-tracking branch 'origin/main' into syncing-0223
lispc Feb 23, 2023
8d8924a
Merge remote-tracking branch 'origin/main' into syncing-0223
lispc Feb 23, 2023
545a22a
fix conflicts
lispc Feb 23, 2023
53e4d14
fixing testool (#360)
lispc Feb 25, 2023
d8a2a6a
Bug-fix: handle tx.to = 0x0 correctly (#353)
kunxian-xia Feb 27, 2023
1a7d140
Delete `webfactory/ssh-agent` in CI configurations. Since `scroll-tec…
silathdiir Feb 27, 2023
2e41e95
fix: minor typos (#361)
lissstern Feb 27, 2023
7594b14
many fixes for testool (#363)
lispc Feb 27, 2023
a1eae0f
add oog dynamic mem expand (#351)
lightsing Mar 3, 2023
45c2e1a
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Mar 3, 2023
cfc7e8b
fix conflicts
lispc Mar 3, 2023
182c0c2
circuit for create error: oog code store & max code size exceed (#304)
DreamWuGit Mar 7, 2023
f5a672d
Implement circuit for `ErrorOutOfGasMemoryCopy` state (#368)
silathdiir Mar 7, 2023
bb21666
Bug: fix to handle successful run when Uint64 overflow in `BLOCKHASH`…
silathdiir Mar 7, 2023
a9dd6c2
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Mar 7, 2023
a05d620
fix conflicts
lispc Mar 7, 2023
ab44ccc
Merge `env` in `ci.yml`.
silathdiir Mar 7, 2023
018ad78
fix begin_tx
lispc Mar 7, 2023
249a3d7
update begin tx to be closer to upstream
lispc Mar 7, 2023
9722985
fix begin tx
lispc Mar 8, 2023
4bcdd96
fix begin tx
lispc Mar 8, 2023
03a21c9
Merge remote-tracking branch 'origin/main' into sync-0307
lispc Mar 8, 2023
8b2ae2a
fix gas_left in end tx
lispc Mar 8, 2023
3e08880
fix create
lispc Mar 8, 2023
7f74c8e
sync diff with upstream (#381)
DreamWuGit Mar 8, 2023
3ebd844
Fix successful run case of `JUMPI` with zero `condition` and overflow…
silathdiir Mar 8, 2023
a9625ea
Fix: update according to previous comment of Uint64 overflow PR (#380)
silathdiir Mar 8, 2023
a97c3e3
misc fixes for testool
lispc Mar 8, 2023
07684a8
fix some return revert problem (#384)
lispc Mar 8, 2023
864b238
fix empty create (#385)
lispc Mar 8, 2023
9c8b997
Replace `WordByteRangeGadget` with `WordByteCapGadget` in `ErrorInval…
silathdiir Mar 8, 2023
11cd87f
dummy err gadget: GasUintOverflow, NonceUintOverflow, ContractAddress…
lispc Mar 9, 2023
3a4af25
CI: change host user for self-runner (#387)
silathdiir Mar 9, 2023
44b03b3
Fix to support overflow memory start and zero memory size in logs. (#…
silathdiir Mar 9, 2023
cec1a80
fix oog_memory_copy (#388)
lispc Mar 9, 2023
87f266a
update codehash.txt
lispc Mar 9, 2023
6b6d4b9
better trace parse
lispc Mar 9, 2023
679f779
dynamic max_rw
lispc Mar 9, 2023
095bc5b
Bug: fix to truncate memory offset of Word to Uint64 when memory leng…
silathdiir Mar 10, 2023
ed3bb38
dummy OOG(CREATE2) (#396)
lispc Mar 11, 2023
2fa8ef9
improve selfdestruct; upgrade precompile crate (#397)
lispc Mar 12, 2023
2e25fec
Fix to enable `gas_is_u64` for failed Calls. (#400)
silathdiir Mar 14, 2023
1321408
Fix overflow cases of `ErrorReturnDataOutOfBound`. (#405)
silathdiir Mar 14, 2023
4f0ad22
Fix wrong stack pointer range for error stack. (#407)
silathdiir Mar 15, 2023
b9bbac9
calldata zeros assigned twice in tx table and circuit (#408)
kunxian-xia Mar 16, 2023
f4bef92
zktrie: construct state with additional proof (#412)
noel2004 Mar 17, 2023
95133ec
Fix leftover issues in pi/tx circuits (#371)
kunxian-xia Mar 17, 2023
f044f32
pick error depth (#413)
lightsing Mar 17, 2023
86a8f89
Merge commit '84e9bd48b83faa08f551514ff3a96bffd5eefd68' into scroll-s…
lispc Mar 20, 2023
fb5a424
fix conflicts
lispc Mar 20, 2023
0975dcf
fmt
lispc Mar 20, 2023
608fa32
Merge commit '6113111dcfe541a316c108afa536eaf80626837e' into scroll-s…
lispc Mar 20, 2023
1ac1d43
fix conflicts
lispc Mar 20, 2023
7366aff
Merge remote-tracking branch 'origin/main' into scroll-stable
lispc Mar 20, 2023
d9e10b8
fix conflicts
lispc Mar 20, 2023
364d643
Update execution.rs
lispc Mar 20, 2023
f64d2a5
Fix begin tx to process reversion of precompile. (#410)
silathdiir Mar 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[target.'cfg(target_os="macos")']
rustflags = ["-C", "link-args=-framework CoreFoundation -framework Security"]
[net]
git-fetch-with-cli = true
[env]
RUST_MIN_STACK = "16777216"
17 changes: 9 additions & 8 deletions .github/ciChecksScripts/wakeUpRunner.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#!/bin/bash

profile="cirunner"
runner_vpc_id="vpc-08ac0db4d8a7cce9e"
runner_vpc_id="vpc-8bdf97ec"
region_opt="--region us-west-2"

# Get runner status
runner=$(aws ec2 describe-instances --profile $profile --filters Name=tag:Name,Values=[ci-checks-runner] Name=network-interface.vpc-id,Values=[$runner_vpc_id] --query "Reservations[*].Instances[*][InstanceId]" --output text | xargs)
runner=$(aws ec2 describe-instances --profile $profile --filters Name=tag:Name,Values=[jenkins] Name=network-interface.vpc-id,Values=[$runner_vpc_id] --query "Reservations[*].Instances[*][InstanceId]" ${region_opt} --output text | xargs)

while true; do
runner_status=$(aws ec2 describe-instances --profile $profile --instance-ids $runner --query "Reservations[*].Instances[*].State.[Name]" --output text)
if [ $runner_status = "stopped" ]; then
aws ec2 start-instances --profile $profile --instance-ids $runner
runner_status=$(aws ec2 describe-instances --profile $profile --instance-ids $runner --query "Reservations[*].Instances[*].State.[Name]" ${region_opt} --output text)
if [[ $runner_status = "stopped" ]]; then
aws ec2 start-instances --profile $profile --instance-ids $runner ${region_opt}
exit 0
elif [ $runner_status = "running" ]; then
elif [[ $runner_status = "running" ]]; then
sleep 120
runner_status=$(aws ec2 describe-instances --profile $profile --instance-ids $runner --query "Reservations[*].Instances[*].State.[Name]" --output text)
if [ $runner_status = "running" ]; then
runner_status=$(aws ec2 describe-instances --profile $profile --instance-ids $runner --query "Reservations[*].Instances[*].State.[Name]" ${region_opt} --output text)
if [[ $runner_status = "running" ]]; then
exit 0
fi
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from pprint import pprint
import reporting_modules as rmod

env = json.load(open('/home/ubuntu/env.json'))
cstats = '/home/ubuntu/cpu.stats'
mstats = '/home/ubuntu/mem.stats'
env = json.load(open('/home/CI/env.json'))
cstats = '/home/CI/cpu.stats'
mstats = '/home/CI/mem.stats'

def main():
parser = argparse.ArgumentParser(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def log_processor(pull_request,circuit, degree):
SETUP_PREFIX = "[Setup generation]"
PROOFGEN_PREFIX = "[Proof generation]"
PROOFVER_PREFIX = "[Proof verification]"
logfile = [i for i in os.listdir('/home/ubuntu/') if 'proverlog' in i][0]
f = open(f'/home/ubuntu/{logfile}', 'r')
logfile = [i for i in os.listdir('/home/CI/') if 'proverlog' in i][0]
f = open(f'/home/CI/{logfile}', 'r')
logdata = f.read()
logdata = logdata.split("\n")
running = [i for i in logdata if 'running' in i and 'test' in i][0].split()[1]
Expand Down
2 changes: 1 addition & 1 deletion .github/proverCiScripts/deployToProver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#set -x

prnumber=$1
base_dir="/home/ubuntu/CI_Prover_Benches/"
base_dir="/home/CI/CI_Prover_Benches/"
target_dir="$base_dir"PR"$1"

source_dir=$2
Expand Down
2 changes: 1 addition & 1 deletion .github/proverCiScripts/execBench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
#set -x

prnumber=$1
base_dir="/home/ubuntu/CI_Prover_Benches/"
base_dir="/home/CI/CI_Prover_Benches/"
target_dir="$base_dir"PR"$1"
k=$2
circuit=$(echo $3 | awk '{ print $2 }' | tr '[:upper:]' '[:lower:]')
Expand Down
2 changes: 1 addition & 1 deletion .github/proverCiScripts/getSysstat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
#set -x

prnumber=$1
base_dir="/home/ubuntu/CI_Prover_Benches/"
base_dir="/home/CI/CI_Prover_Benches/"
target_dir="$base_dir"PR"$prnumber"

logfile=$(ls $target_dir | grep proverlog | xargs -n 1 basename)
Expand Down
2 changes: 1 addition & 1 deletion .github/proverCiScripts/injectHalo2Revision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#set -x

prnumber=$1
base_dir="/home/ubuntu/CI_Prover_Benches/"
base_dir="/home/CI/CI_Prover_Benches/"
target_dir="$base_dir"PR"$1"

_revision=$2
Expand Down
2 changes: 1 addition & 1 deletion .github/proverCiScripts/prepareProver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#set -x

prnumber=$1
base_dir="/home/ubuntu/CI_Prover_Benches/"
base_dir="/home/CI/CI_Prover_Benches/"
target_dir="$base_dir"PR"$1"
source_dir=$2

Expand Down
2 changes: 1 addition & 1 deletion .github/proverCiScripts/processResults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
prnumber=$1
label=$2
degree=$3
base_dir="/home/ubuntu/CI_Prover_Benches/"
base_dir="/home/CI/CI_Prover_Benches/"
target_dir="$base_dir"PR"$prnumber"

rm -f ~/*.stats
Expand Down
2 changes: 1 addition & 1 deletion .github/proverCiScripts/shutdownProver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#set -x

profile="cirunner"
provers_vpc_id="vpc-09fb44da782f32abb"
provers_vpc_id="vpc-1176d875"

running_prover=$(aws ec2 describe-instances --profile $profile --filters Name=tag:Name,Values=[proverbench-multiAZ] Name=instance-state-name,Values=[running] Name=network-interface.vpc-id,Values=[$provers_vpc_id] --query "Reservations[*].Instances[*][InstanceId]" --output text)

Expand Down
12 changes: 6 additions & 6 deletions .github/proverCiScripts/wakeUpProver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
#set -x

profile="cirunner"
provers_vpc_id="vpc-09fb44da782f32abb"
provers_vpc_id="vpc-1176d875"
dns_ipaddr=$(dig prover.cirunners.internal +short)
zone_id=$(aws route53 --profile $profile list-hosted-zones --query 'HostedZones[?Name==`cirunners.internal.`].[Id]' --output text | awk -F \/ '{ print $3 }')
route53_dir=".github/proverCiScripts/misc"

sshprover () {
ssh -o ConnectTimeout=5 prover
ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no prover "uptime"
}

# Get running provers IDs
provers_running=$(aws ec2 describe-instances --profile $profile --filters Name=tag:Name,Values=[proverbench-multiAZ] Name=instance-state-name,Values=[running] Name=network-interface.vpc-id,Values=[$provers_vpc_id] --query "Reservations[*].Instances[*][InstanceId]" --output text)
provers_running_num=$(echo $provers_running | wc -w)

if [ $provers_running_num -gt 1 ]; then
if [[ $provers_running_num -gt 1 ]]; then
echo "More than 1 provers running"
exit 1
elif [ $provers_running_num -eq 0 ]; then
elif [[ $provers_running_num -eq 0 ]]; then
# Get provers IDs and start first available
provers=$(aws ec2 describe-instances --profile $profile --filters Name=tag:Name,Values=[proverbench-multiAZ] Name=network-interface.vpc-id,Values=[$provers_vpc_id] --query "Reservations[*].Instances[*][InstanceId]" --output text | xargs)
else
Expand All @@ -28,7 +28,7 @@ else
fi

for prover in $provers; do
[ ! -z $single_prover_running ] || aws ec2 start-instances --profile $profile --instance-ids $prover
[[ ! -z $single_prover_running ]] || aws ec2 start-instances --profile $profile --instance-ids $prover
if [ $? -eq 0 ]; then
ipaddr=$(aws ec2 describe-instances --profile $profile --instance-ids $prover --query "Reservations[*].Instances[*].NetworkInterfaces[*].[PrivateIpAddress]" --output text)
if [ $ipaddr != $dns_ipaddr ]; then
Expand All @@ -38,7 +38,7 @@ for prover in $provers; do
aws route53 change-resource-record-sets --profile $profile --hosted-zone-id $zone_id --change-batch file://$route53_dir/route53.template.json
sleep 61
rm $route53_dir/route53.template.json
ssh-keygen -f "/home/ubuntu/.ssh/known_hosts" -R "prover.cirunners.internal"
ssh-keygen -f "/home/CI/.ssh/known_hosts" -R "prover.cirunners.internal"
fi
break
fi
Expand Down
99 changes: 46 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: CI checks

on:
merge_group:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
# Ignore when target branch is `main` and source branch is scroll-stable.
# It could avoid running twice. Since scroll-stable is set as `push` below.
branches-ignore:
- main
push:
branches:
- main
- scroll-stable

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
RUST_MIN_STACK: 16777216

## `actions-rs/toolchain@v1` overwrite set to false so that
## `rust-toolchain` is always used and the only source of truth.
Expand All @@ -28,23 +31,36 @@ jobs:
concurrent_skipping: 'same_content_newer'
paths_ignore: '["**/README.md"]'

test:
runner:
needs: [skip_check]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
uses: ./.github/workflows/select-runner.yml

test:
name: Test
runs-on: ["${{github.run_id}}", self-hosted, c5.9xlarge]
needs: [runner]
runs-on: ${{ matrix.os }}
concurrency: ${{ needs.runner.outputs.concurrency-group }}
strategy:
matrix:
# We don't need to test across multiple platforms yet
# os: [ubuntu-latest, windows-latest, macOS-latest]
os: ${{ fromJSON(needs.runner.outputs.runner-matrix) }}

steps:
- uses: actions/checkout@v2
- name: set HOME env
run: |
echo "HOME=/home/CI" >> $GITHUB_ENV
- uses: actions-rs/toolchain@v1
with:
override: false
- name: Setup golang
uses: actions/setup-go@v3
with:
cache: false
go-version: ~1.18
# Go cache for building geth-utils
- name: Go cache
Expand All @@ -56,22 +72,18 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: Swatinem/rust-cache@v2
- name: Run light tests # light tests are run in parallel
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks
args: --verbose --release --all --exclude integration-tests --exclude circuit-benchmarks
- name: Run heavy tests # heavy tests are run serially to avoid OOM
if: false
uses: actions-rs/cargo@v1
with:
command: test
Expand All @@ -80,6 +92,7 @@ jobs:
build:
needs: [skip_check]
if: |
false &&
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')

Expand Down Expand Up @@ -108,16 +121,11 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: Swatinem/rust-cache@v2
- name: cargo build
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -154,16 +162,11 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: Swatinem/rust-cache@v2
# Build benchmarks to prevent bitrot
- name: Build benchmarks
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -195,16 +198,11 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: Swatinem/rust-cache@v2
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -242,16 +240,11 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://github.com/actions/cache/issues/810
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: Swatinem/rust-cache@v2
- name: cargo check
uses: actions-rs/cargo@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Drafter
on:
push:
branches:
- main
- scroll-stable

jobs:
update_release_draft:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/github-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

jobs:
ping:
if: false
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
Expand Down
Loading