Skip to content
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

fetch upstream zkevm release/v0.7.0 #223

Merged
merged 25 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3ce6ff8
Update DS Format (#3608)
ToniRamirezM Apr 30, 2024
3aac36b
proto batch end (#3612)
ToniRamirezM May 2, 2024
02ba1fc
fix genesis DS (#3615)
ToniRamirezM May 3, 2024
de387c7
Fix DSSendL2Block batch number (#3617)
ToniRamirezM May 3, 2024
f7b11f6
latest proto (#3620)
ToniRamirezM May 6, 2024
3ee3b6e
Fix DSSendBatchEnd (#3621)
agnusmor May 6, 2024
ff71691
add TxFeeCap config (#3611)
tclemos May 9, 2024
60d6c74
Add delay when getting storedFlushId from the executor/hashdb (#3625)
agnusmor May 22, 2024
fb2c4e4
cherry-pick: fix #3613 timestamp needs to be greater or equal (#3614)…
joanestebanr May 22, 2024
de0329d
Fix use of L2coinbase configured in sequencesender.L2Coinbase paramet…
agnusmor May 22, 2024
0ab583a
Feature/3640 synchronizer choose to sync from l2 (#3641)
joanestebanr May 23, 2024
6023dca
change synchronization config params 'Enable' to 'Enabled' (#3656)
joanestebanr May 27, 2024
0233b40
Cherry-pick #3650: Do fatal when datastream channel is full (workarou…
agnusmor May 27, 2024
d9a1a10
add optimistic gas computation while estimating gas (#3653)
tclemos May 28, 2024
cea67d1
Use Eth block hash for l2 blocks in data stream (#3661)
ToniRamirezM May 30, 2024
d9a240f
empty imStateRoot (#3663)
ToniRamirezM May 30, 2024
92add9a
Cherry-pick #3659,#3662: Remove sync with virtual state (synchronizer…
agnusmor May 31, 2024
8361140
remove db tx from RPC (#3648) (#3683)
tclemos Jun 5, 2024
68fb048
remove synchronizer dependency from eth tx manager to confirm monitor…
tclemos Jun 5, 2024
d555d65
Cherry-pick #3669: Add WriteTimeout config parameter to StreamServer …
agnusmor Jun 5, 2024
bdeddb3
change imstateroot handling in DS (#3698)
ToniRamirezM Jun 6, 2024
226ce99
Merge branch 'zkevm/v0.7.0' into zjg/merge-v0.7.0
zjg555543 Jun 21, 2024
fd233e3
Modify code
zjg555543 Jun 25, 2024
868ffaf
Merge branch 'dev' into zjg/merge-v0.7.0
zjg555543 Jun 25, 2024
6aebf66
Merge branch 'dev' into zjg/merge-v0.7.0
zjg555543 Jul 8, 2024
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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ generate-code-from-proto: ## Generates code from proto files
cd proto/src/proto/hashdb/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../merkletree/hashdb --go-grpc_out=../../../../../merkletree/hashdb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative hashdb.proto
cd proto/src/proto/executor/v1 && protoc --proto_path=. --go_out=../../../../../state/runtime/executor --go-grpc_out=../../../../../state/runtime/executor --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative executor.proto
cd proto/src/proto/aggregator/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../aggregator/prover --go-grpc_out=../../../../../aggregator/prover --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative aggregator.proto
cd proto/src/proto/datastream/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../state/datastream --go-grpc_out=../../../../../state/datastream --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative datastream.proto

## Help display.
## Pulls comments from beside commands and prints a nicely formatted
Expand Down
4 changes: 4 additions & 0 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func start(cliCtx *cli.Context) error {
poolInstance.StartPollingMinSuggestedGasPrice(cliCtx.Context)
}
poolInstance.StartRefreshingBlockedAddressesPeriodically()
// XLayer handler
poolInstance.StartRefreshingWhiteAddressesPeriodically()
apis := map[string]bool{}
for _, a := range cliCtx.StringSlice(config.FlagHTTPAPI) {
Expand Down Expand Up @@ -434,6 +435,8 @@ func runJSONRPCServer(c config.Config, etherman *etherman.Client, chainID uint64
}

func createSequencer(cfg config.Config, pool *pool.Pool, st *state.State, etherman *etherman.Client, eventLog *event.EventLog) *sequencer.Sequencer {
cfg.Sequencer.L2Coinbase = cfg.SequenceSender.L2Coinbase

seq, err := sequencer.New(cfg.Sequencer, cfg.State.Batch, cfg.Pool, pool, st, etherman, eventLog)
if err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -467,6 +470,7 @@ func createSequenceSender(cfg config.Config, pool *pool.Pool, etmStorage *ethtxm
}

func runAggregator(ctx context.Context, c aggregator.Config, etherman *etherman.Client, ethTxManager *ethtxmanager.Client, st *state.State) {
// XLayer handler
var (
aggCli *agglayerClient.Client
pk *ecdsa.PrivateKey
Expand Down
24 changes: 24 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ func Test_Defaults(t *testing.T) {
path: "Synchronizer.L2Synchronization.CheckLastL2BlockHashOnCloseBatch",
expectedValue: true,
},
{
path: "Synchronizer.L1BlockCheck.Enabled",
expectedValue: true,
},
{
path: "Synchronizer.L1BlockCheck.PreCheckEnabled",
expectedValue: true,
},
{
path: "Synchronizer.L2Synchronization.Enabled",
expectedValue: true,
},

{
path: "Sequencer.DeletePoolTxsL1BlockConfirmations",
Expand Down Expand Up @@ -133,6 +145,10 @@ func Test_Defaults(t *testing.T) {
path: "Sequencer.Finalizer.BatchMaxDeltaTimestamp",
expectedValue: types.NewDuration(1800 * time.Second),
},
{
path: "Sequencer.Finalizer.FlushIdCheckInterval",
expectedValue: types.NewDuration(50 * time.Millisecond),
},
{
path: "Sequencer.Finalizer.Metrics.Interval",
expectedValue: types.NewDuration(60 * time.Minute),
Expand Down Expand Up @@ -181,6 +197,10 @@ func Test_Defaults(t *testing.T) {
path: "SequenceSender.GasOffset",
expectedValue: uint64(80000),
},
{
path: "SequenceSender.SequenceL1BlockConfirmations",
expectedValue: uint64(32),
},
{
path: "Etherman.URL",
expectedValue: "http://localhost:8545",
Expand Down Expand Up @@ -302,6 +322,10 @@ func Test_Defaults(t *testing.T) {
path: "Pool.GlobalQueue",
expectedValue: uint64(1024),
},
{
path: "Pool.TxFeeCap",
expectedValue: float64(1),
},
{
path: "Pool.EffectiveGasPrice.Enabled",
expectedValue: false,
Expand Down
8 changes: 6 additions & 2 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ PollMinAllowedGasPriceInterval = "15s"
AccountQueue = 64
GlobalQueue = 1024
FreeGasAddress = ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]
TxFeeCap = 1.0
[Pool.EffectiveGasPrice]
Enabled = false
L1GasPriceFactor = 0.25
Expand Down Expand Up @@ -152,11 +153,11 @@ L1SynchronizationMode = "sequential"
L1SyncCheckL2BlockHash = true
L1SyncCheckL2BlockNumberhModulus = 600
[Synchronizer.L1BlockCheck]
Enable = true
Enabled = true
L1SafeBlockPoint = "finalized"
L1SafeBlockOffset = 0
ForceCheckBeforeStart = true
PreCheckEnable = true
PreCheckEnabled = true
L1PreSafeBlockPoint = "safe"
L1PreSafeBlockOffset = 0
[Synchronizer.L1ParallelSynchronization]
Expand All @@ -173,6 +174,7 @@ L1SyncCheckL2BlockNumberhModulus = 600
AceptableInacctivityTime = "5s"
ApplyAfterNumRollupReceived = 10
[Synchronizer.L2Synchronization]
Enabled = true
AcceptEmptyClosedBatches = false
ReprocessFullBatchOnClose = false
CheckLastL2BlockHashOnCloseBatch = true
Expand All @@ -195,6 +197,7 @@ StateConsistencyCheckInterval = "5s"
L2BlockMaxDeltaTimestamp = "3s"
ResourceExhaustedMarginPct = 10
StateRootSyncInterval = "3600s"
FlushIdCheckInterval = "50ms"
HaltOnBatchNumber = 0
SequentialBatchSanityCheck = false
SequentialProcessL2Block = false
Expand All @@ -215,6 +218,7 @@ LastBatchVirtualizationTimeMaxWaitPeriod = "5s"
L1BlockTimestampMargin = "30s"
MaxTxSizeForL1 = 131072
MaxBatchesForL1 = 10
SequenceL1BlockConfirmations = 32
L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
DAPermitApiPrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"}
GasOffset = 80000
Expand Down
2 changes: 2 additions & 0 deletions config/environments/local/local.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ StateConsistencyCheckInterval = "5s"
L2BlockMaxDeltaTimestamp = "3s"
ResourceExhaustedMarginPct = 10
StateRootSyncInterval = "360s"
FlushIdCheckInterval = "50ms"
HaltOnBatchNumber = 0
SequentialBatchSanityCheck = false
SequentialProcessL2Block = false
Expand All @@ -121,6 +122,7 @@ WaitPeriodSendSequence = "5s"
LastBatchVirtualizationTimeMaxWaitPeriod = "5s"
L1BlockTimestampMargin = "30s"
MaxTxSizeForL1 = 131072
SequenceL1BlockConfirmations = 32
L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"}

Expand Down
Loading
Loading