Skip to content

Commit

Permalink
Update l1 sync lib to support validium (#88)
Browse files Browse the repository at this point in the history
* update l1 sync to support validium
  • Loading branch information
ToniRamirezM authored Jun 20, 2024
1 parent db8ed56 commit ad48288
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 32 deletions.
29 changes: 16 additions & 13 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,23 @@ SequencerPrivateKey = {}
HTTPHeaders = []
[Aggregator.Synchronizer]
[Aggregator.Synchronizer.DB]
Name = "sync_db"
User = "sync_user"
Password = "sync_password"
Host = "zkevm-db"
Port = "5432"
EnableLog = false
MaxConns = 10
Name = "sync_db"
User = "sync_user"
Password = "sync_password"
Host = "zkevm-db"
Port = "5432"
EnableLog = false
MaxConns = 10
[Aggregator.Synchronizer.Synchronizer]
SyncInterval = "10s"
SyncChunkSize = 1000
GenesisBlockNumber = 5511080
SyncUpToBlock = "finalized"
BlockFinality = "finalized"
SyncInterval = "10s"
SyncChunkSize = 1000
GenesisBlockNumber = 5511080
SyncUpToBlock = "finalized"
BlockFinality = "finalized"
OverrideStorageCheck = false
[Aggregator.Synchronizer.Etherman]
[Aggregator.Synchronizer.Etherman.Validium]
Enabled = false
[EventLog]
[EventLog.DB]
`
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/0xPolygon/cdk-rpc v0.0.0-20240419104226-c0a62ba0f49d
github.com/0xPolygonHermez/zkevm-data-streamer v0.2.2
github.com/0xPolygonHermez/zkevm-ethtx-manager v0.1.9
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.4
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.6.0
github.com/ethereum/go-ethereum v1.14.5
github.com/gobuffalo/packr/v2 v2.8.3
github.com/hermeznetwork/tracerr v0.3.2
Expand Down Expand Up @@ -115,7 +115,7 @@ require (
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ github.com/0xPolygonHermez/zkevm-data-streamer v0.2.2 h1:XRMTk+W6vtJVGVjuEznfWyN
github.com/0xPolygonHermez/zkevm-data-streamer v0.2.2/go.mod h1:0QkAXcFa92mFJrCbN3UPUJGJYes851yEgYHLONnaosE=
github.com/0xPolygonHermez/zkevm-ethtx-manager v0.1.9 h1:vrAezzwTNke6NroDAltGh1k2AJ6ibmZPBsG0bCltbRc=
github.com/0xPolygonHermez/zkevm-ethtx-manager v0.1.9/go.mod h1:pRqfLQVM3nbzdhy3buqjAgcVyNDKAXOHqTSgkwiKpic=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.4 h1:ovSpYnlOjraL33J61knxVGc20PHdPQaO1BCEDAqZSpg=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.4/go.mod h1:fAwP9VXeKdUY7gJu6S4sus72CtPFUEB7+BYFSJYMu8s=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.6.0 h1:tFO0wHDOxBGlhaczxKbwYsbRq6kIx6P9qBo3VAN1SL4=
github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.6.0/go.mod h1:RmDFoqIKWhuhTOXwIUrhGGLCVi03SnXDMVL6NOVTlvE=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
Expand Down Expand Up @@ -718,8 +718,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down
33 changes: 20 additions & 13 deletions test/config/test.aggregator.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,26 @@ UseFullWitness = false
HTTPHeaders = []
[Aggregator.Synchronizer]
[Aggregator.Synchronizer.DB]
Name = "sync_db"
User = "sync_user"
Password = "sync_password"
Host = "zkevm-db"
Port = "5432"
EnableLog = false
MaxConns = 10
Name = "sync_db"
User = "sync_user"
Password = "sync_password"
Host = "zkevm-db"
Port = "5432"
EnableLog = false
MaxConns = 10
[Aggregator.Synchronizer.Synchronizer]
SyncInterval = "10s"
SyncChunkSize = 1000
GenesisBlockNumber = 5511080
SyncUpToBlock = "finalized"
BlockFinality = "finalized"
SyncInterval = "10s"
SyncChunkSize = 1000
GenesisBlockNumber = 5511080
SyncUpToBlock = "finalized"
BlockFinality = "finalized"
[Aggregator.Synchronizer.Etherman]
[Aggregator.Synchronizer.Etherman.Validium]
Enabled = false
TrustedSequencerURL = ""
DataSourcePriority = ["trusted", "external"]
[Aggregator.Synchronizer.Etherman.Validium.Translator]
FullMatchRules = []

[EventLog]
[EventLog.DB]
[EventLog.DB]

0 comments on commit ad48288

Please sign in to comment.