Skip to content

Commit c9c148c

Browse files
colinlyguoJJVincentJJ
authored andcommitted
# This is a combination of 19 commits.
# This is the 1st commit message: feat: add monitor metrics (#262) Co-authored-by: colinlyguo <[email protected]> Co-authored-by: maskpp <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> # This is the commit message #2: refactor(bridge): remove layer1 client in in layer1 relayer constructor (#274) Co-authored-by: vincent <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> # This is the commit message #3: fix: add gas multiplier (#275) # This is the commit message #4: feat(libzkp): use dylib instead of staticlib (#266) Co-authored-by: maskpp <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: colin <[email protected]> Co-authored-by: colinlyguo <[email protected]> # This is the commit message #5: Revert "fix: add gas multiplier (#275)" (#279) # This is the commit message #6: build: add nightly-2022-12-10 rust-related builder image (#282) # This is the commit message #7: fix(bridge): compatible with DynamicFeeTxType not supported chain (#280) Co-authored-by: colinlyguo <[email protected]> # This is the commit message #8: feat(contract): enable whitelist relayer (#272) Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> # This is the commit message #9: perf(bridge): execute relayer loops independently (#258) Co-authored-by: colin <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> # This is the commit message #10: feat(bridge): confirm block based on "safe" and "finalized" tags (#265) # This is the commit message #11: feat: allow to override L2 deployment when address is provided (#293) # This is the commit message #12: feat(contracts): Add fee vault (#223) # This is the commit message #13: feat(confirmations): Upgrade confirm (#291) # This is the commit message #14: feat(coordinator): Enable set ws compression level. (#292) # This is the commit message #15: feat(roller&coordinator): upgrade lizkp to zkevm-0215 version (#281) Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: xinran chen <[email protected]> Co-authored-by: Ubuntu <[email protected]> # This is the commit message #16: build: update version to `alpha-v1.0` (#301) # This is the commit message #17: feat: import genesis batch during startup (#299) Co-authored-by: HAOYUatHZ <[email protected]> # This is the commit message #18: feat(contracts): new bridge contracts (#288) Co-authored-by: Haichen Shen <[email protected]> Co-authored-by: Thegaram <[email protected]> Co-authored-by: colin <[email protected]> # This is the commit message #19: chore: upgrade l2geth dependency for trace type (#304)
1 parent 0fd1a97 commit c9c148c

File tree

202 files changed

+57726
-14312
lines changed

Some content is hidden

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

202 files changed

+57726
-14312
lines changed

.github/workflows/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions-rs/toolchain@v1
2828
with:
29-
toolchain: nightly-2022-08-23
29+
toolchain: nightly-2022-12-10
3030
override: true
3131
components: rustfmt, clippy
3232
- name: Install Go

.github/workflows/coordinator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions-rs/toolchain@v1
2828
with:
29-
toolchain: nightly-2022-08-23
29+
toolchain: nightly-2022-12-10
3030
override: true
3131
components: rustfmt, clippy
3232
- name: Install Go

.github/workflows/roller.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions-rs/toolchain@v1
2828
with:
29-
toolchain: nightly-2022-08-23
29+
toolchain: nightly-2022-12-10
3030
override: true
3131
components: rustfmt, clippy
3232
- name: Install Go
@@ -42,6 +42,8 @@ jobs:
4242
- name: Test
4343
run: |
4444
make roller
45+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./prover/lib
46+
export CHAIN_ID=534353
4547
go test -v ./...
4648
check:
4749
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ assets/params*
33
assets/seed
44
coverage.txt
55
build/bin
6+
*.integration.txt
67

78
# misc
89
sftp-config.json

Jenkinsfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ pipeline {
1313
environment {
1414
GO111MODULE = 'on'
1515
PATH="/home/ubuntu/.cargo/bin:$PATH"
16+
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./coordinator/verifier/lib"
17+
CHAIN_ID='534353'
1618
// LOG_DOCKER = 'true'
1719
}
1820
stages {

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.PHONY: check update dev_docker clean
22

3+
ZKP_VERSION=release-1220
4+
35
help: ## Display this help message
46
@grep -h \
57
-E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
@@ -29,5 +31,15 @@ dev_docker: ## build docker images for development/testing usages
2931
docker build -t scroll_l1geth ./common/docker/l1geth/
3032
docker build -t scroll_l2geth ./common/docker/l2geth/
3133

34+
test_zkp: ## Test zkp prove and verify, roller/prover generates the proof and coordinator/verifier verifies it
35+
mkdir -p test_params
36+
wget https://circuit-release.s3.us-west-2.amazonaws.com/circuit-release/${ZKP_VERSION}/test_params/params19 -O ./test_params/params19
37+
wget https://circuit-release.s3.us-west-2.amazonaws.com/circuit-release/${ZKP_VERSION}/test_params/params26 -O ./test_params/params26
38+
wget https://circuit-release.s3.us-west-2.amazonaws.com/circuit-release/${ZKP_VERSION}/test_seed -O test_seed
39+
rm -rf ./roller/assets/test_params && mv test_params ./roller/assets/ && mv test_seed ./roller/assets/
40+
cd ./roller && make test-gpu-prover
41+
rm -rf ./coordinator/assets/test_params && mv ./roller/assets/test_params ./coordinator/assets/ && mv ./roller/assets/agg_proof ./coordinator/assets/
42+
cd ./coordinator && make test-gpu-verifier
43+
3244
clean: ## Empty out the bin folder
3345
@rm -rf build/bin

bridge/cmd/app/app.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package app
22

33
import (
4+
"context"
45
"fmt"
56
"os"
67
"os/signal"
@@ -10,6 +11,7 @@ import (
1011

1112
"scroll-tech/database"
1213

14+
"scroll-tech/common/metrics"
1315
"scroll-tech/common/utils"
1416
"scroll-tech/common/version"
1517

@@ -49,7 +51,10 @@ func action(ctx *cli.Context) error {
4951
log.Crit("failed to load config file", "config file", cfgFile, "error", err)
5052
}
5153

52-
// init db connection
54+
// Start metrics server.
55+
metrics.Serve(context.Background(), ctx)
56+
57+
// Init db connection.
5358
var ormFactory database.OrmFactory
5459
if ormFactory, err = database.NewOrmFactory(cfg.DBConfig); err != nil {
5560
log.Crit("failed to init db connection", "err", err)

bridge/config.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"l1_config": {
3-
"confirmations": 6,
3+
"confirmations": "0x6",
44
"endpoint": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
55
"l1_messenger_address": "0x0000000000000000000000000000000000000000",
66
"rollup_contract_address": "0x0000000000000000000000000000000000000000",
@@ -11,11 +11,11 @@
1111
"endpoint": "/var/lib/jenkins/workspace/SequencerPipeline/MyPrivateNetwork/geth.ipc",
1212
"check_pending_time": 3,
1313
"escalate_blocks": 100,
14-
"confirmations": 1,
14+
"confirmations": "0x1",
1515
"escalate_multiple_num": 11,
1616
"escalate_multiple_den": 10,
1717
"max_gas_price": 10000000000,
18-
"tx_type": "AccessListTx",
18+
"tx_type": "LegacyTx",
1919
"min_balance": 100000000000000000000
2020
},
2121
"message_sender_private_keys": [
@@ -24,7 +24,7 @@
2424
}
2525
},
2626
"l2_config": {
27-
"confirmations": 1,
27+
"confirmations": "0x1",
2828
"endpoint": "/var/lib/jenkins/workspace/SequencerPipeline/MyPrivateNetwork/geth.ipc",
2929
"l2_messenger_address": "0x0000000000000000000000000000000000000000",
3030
"relayer_config": {
@@ -34,11 +34,11 @@
3434
"endpoint": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
3535
"check_pending_time": 10,
3636
"escalate_blocks": 100,
37-
"confirmations": 6,
37+
"confirmations": "0x6",
3838
"escalate_multiple_num": 11,
3939
"escalate_multiple_den": 10,
4040
"max_gas_price": 10000000000,
41-
"tx_type": "DynamicFeeTx",
41+
"tx_type": "LegacyTx",
4242
"min_balance": 100000000000000000000
4343
},
4444
"message_sender_private_keys": [

bridge/config/l1_config.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
package config
22

3-
import "github.com/scroll-tech/go-ethereum/common"
3+
import (
4+
"github.com/scroll-tech/go-ethereum/common"
5+
"github.com/scroll-tech/go-ethereum/rpc"
6+
)
47

58
// L1Config loads l1eth configuration items.
69
type L1Config struct {
710
// Confirmations block height confirmations number.
8-
Confirmations uint64 `json:"confirmations"`
11+
Confirmations rpc.BlockNumber `json:"confirmations"`
912
// l1 eth node url.
1013
Endpoint string `json:"endpoint"`
1114
// The start height to sync event from layer 1

bridge/config/l2_config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ package config
33
import (
44
"encoding/json"
55

6+
"github.com/scroll-tech/go-ethereum/rpc"
7+
68
"github.com/scroll-tech/go-ethereum/common"
79
)
810

911
// L2Config loads l2geth configuration items.
1012
type L2Config struct {
1113
// Confirmations block height confirmations number.
12-
Confirmations uint64 `json:"confirmations"`
14+
Confirmations rpc.BlockNumber `json:"confirmations"`
1315
// l2geth node url.
1416
Endpoint string `json:"endpoint"`
1517
// The messenger contract address deployed on layer 2 chain.

0 commit comments

Comments
 (0)