From a831054809b395efa441066711edadef0cb5b7b2 Mon Sep 17 00:00:00 2001 From: Moreti Georgiev Date: Thu, 31 Oct 2024 13:27:38 +0200 Subject: [PATCH] feat: default zkevm.witness flag to false --- README.md | 2 +- cmd/utils/flags.go | 10 +++++----- zk/tests/nightly-l1-recovery/network5-config.yaml | 1 - zk/tests/nightly-l1-recovery/network5-sync-config.yaml | 1 - zk/tests/nightly-l1-recovery/network8-config.yaml | 1 - zk/tests/nightly-l1-recovery/network8-sync-config.yaml | 1 - zk/tests/unwinds/config/dynamic-integration8.yaml | 1 - 7 files changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a07076c4488..4e58a99cadb 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ For a full explanation of the config options, see below: Sequencer specific config: - `zkevm.executor-urls`: A csv list of the executor URLs. These will be used in a round robbin fashion by the sequencer - `zkevm.executor-strict`: Defaulted to true, but can be set to false when running the sequencer without verifications (use with extreme caution) -- `zkevm.witness-full`: Defaulted to true. Controls whether the full or partial witness is used with the executor. +- `zkevm.witness-full`: Defaulted to false. Controls whether the full or partial witness is used with the executor. - `zkevm.reject-smart-contract-deployments`: Defaulted to false. Controls whether smart contract deployments are rejected by the TxPool. Resource Utilisation config: diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 7db91e06bf3..8bd7e1f7cb7 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -696,7 +696,7 @@ var ( WitnessFullFlag = cli.BoolFlag{ Name: "zkevm.witness-full", Usage: "Enable/Diable witness full", - Value: true, + Value: false, } SyncLimit = cli.UintFlag{ Name: "zkevm.sync-limit", @@ -1433,6 +1433,7 @@ func setNodeUserIdent(ctx *cli.Context, cfg *nodecfg.Config) { cfg.UserIdent = identity } } + func setNodeUserIdentCobra(f *pflag.FlagSet, cfg *nodecfg.Config) { if identity := f.String(IdentityFlag.Name, IdentityFlag.Value, IdentityFlag.Usage); identity != nil && len(*identity) > 0 { cfg.UserIdent = *identity @@ -1741,7 +1742,7 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config, nodeName, datadir string, l if ctx.String(ChainFlag.Name) == networkname.DevChainName { // --dev mode can't use p2p networking. - //cfg.MaxPeers = 0 // It can have peers otherwise local sync is not possible + // cfg.MaxPeers = 0 // It can have peers otherwise local sync is not possible if !ctx.IsSet(ListenPortFlag.Name) { cfg.ListenAddr = ":0" } @@ -1762,7 +1763,7 @@ func SetNodeConfig(ctx *cli.Context, cfg *nodecfg.Config, logger log.Logger) { func SetNodeConfigCobra(cmd *cobra.Command, cfg *nodecfg.Config) { flags := cmd.Flags() - //SetP2PConfig(ctx, &cfg.P2P) + // SetP2PConfig(ctx, &cfg.P2P) setNodeUserIdentCobra(flags, cfg) setDataDirCobra(flags, cfg) } @@ -2138,7 +2139,7 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *nodecfg.Config, cfg *ethconfig.C } cfg.Sync.UseSnapshots = ethconfig.UseSnapshotsByChainName(chain) - if ctx.IsSet(SnapshotFlag.Name) { //force override default by cli + if ctx.IsSet(SnapshotFlag.Name) { // force override default by cli cfg.Sync.UseSnapshots = ctx.Bool(SnapshotFlag.Name) } @@ -2169,7 +2170,6 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *nodecfg.Config, cfg *ethconfig.C webseedsList = append(webseedsList, known...) } cfg.Downloader, err = downloadercfg2.New(cfg.Dirs, version, lvl, downloadRate, uploadRate, ctx.Int(TorrentPortFlag.Name), ctx.Int(TorrentConnsPerFileFlag.Name), ctx.Int(TorrentDownloadSlotsFlag.Name), libcommon.CliString2Array(ctx.String(TorrentStaticPeersFlag.Name)), webseedsList, chain, true) - if err != nil { panic(err) } diff --git a/zk/tests/nightly-l1-recovery/network5-config.yaml b/zk/tests/nightly-l1-recovery/network5-config.yaml index b274cc3b290..80d134d3742 100644 --- a/zk/tests/nightly-l1-recovery/network5-config.yaml +++ b/zk/tests/nightly-l1-recovery/network5-config.yaml @@ -23,7 +23,6 @@ zkevm.datastream-version: 2 zkevm.data-stream-host: "127.0.0.1" zkevm.executor-strict: false # zkevm.executor-urls: "zkevm2-stateless-executor:50071" -zkevm.witness-full: false zkevm.sequencer-block-seal-time: "5s" zkevm.sequencer-batch-seal-time: "15m" zkevm.allow-pre-eip155-transactions: true diff --git a/zk/tests/nightly-l1-recovery/network5-sync-config.yaml b/zk/tests/nightly-l1-recovery/network5-sync-config.yaml index 5a09921c6af..f99dfb183bd 100644 --- a/zk/tests/nightly-l1-recovery/network5-sync-config.yaml +++ b/zk/tests/nightly-l1-recovery/network5-sync-config.yaml @@ -19,7 +19,6 @@ zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 6032365 zkevm.executor-strict: false # zkevm.executor-urls: "zkevm2-stateless-executor:50071" -zkevm.witness-full: false zkevm.sequencer-block-seal-time: "5s" zkevm.sequencer-batch-seal-time: "15m" zkevm.allow-pre-eip155-transactions: true diff --git a/zk/tests/nightly-l1-recovery/network8-config.yaml b/zk/tests/nightly-l1-recovery/network8-config.yaml index 4c414cdc9c0..8fa15132691 100644 --- a/zk/tests/nightly-l1-recovery/network8-config.yaml +++ b/zk/tests/nightly-l1-recovery/network8-config.yaml @@ -22,7 +22,6 @@ zkevm.datastream-version: 2 zkevm.data-stream-host: "127.0.0.1" # zkevm.sequencer-initial-fork-id: 9 zkevm.executor-strict: false -zkevm.witness-full: false zkevm.sequencer-block-seal-time: "5s" zkevm.sequencer-batch-seal-time: "15m" zkevm.allow-pre-eip155-transactions: true diff --git a/zk/tests/nightly-l1-recovery/network8-sync-config.yaml b/zk/tests/nightly-l1-recovery/network8-sync-config.yaml index f51c251ea81..745635e524a 100644 --- a/zk/tests/nightly-l1-recovery/network8-sync-config.yaml +++ b/zk/tests/nightly-l1-recovery/network8-sync-config.yaml @@ -22,7 +22,6 @@ zkevm.datastream-version: 2 #zkevm.data-stream-host: "127.0.0.1" # zkevm.sequencer-initial-fork-id: 9 zkevm.executor-strict: false -zkevm.witness-full: false zkevm.sequencer-block-seal-time: "5s" zkevm.sequencer-batch-seal-time: "15m" zkevm.allow-pre-eip155-transactions: true diff --git a/zk/tests/unwinds/config/dynamic-integration8.yaml b/zk/tests/unwinds/config/dynamic-integration8.yaml index 2590341925d..519f9882ace 100644 --- a/zk/tests/unwinds/config/dynamic-integration8.yaml +++ b/zk/tests/unwinds/config/dynamic-integration8.yaml @@ -21,7 +21,6 @@ zkevm.l1-first-block: 6411787 zkevm.datastream-version: 2 # zkevm.data-stream-host: "127.0.0.1" zkevm.executor-strict: false -zkevm.witness-full: false zkevm.sequencer-block-seal-time: "5s" zkevm.sequencer-batch-seal-time: "15m" zkevm.allow-pre-eip155-transactions: true