Skip to content

Commit

Permalink
feat: default zkevm.witness flag to false
Browse files Browse the repository at this point in the history
  • Loading branch information
MorettiGeorgiev committed Oct 31, 2024
1 parent 128f743 commit 39a6b56
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,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:
Expand Down
11 changes: 6 additions & 5 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,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",
Expand Down Expand Up @@ -1158,6 +1158,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
Expand Down Expand Up @@ -1475,7 +1476,7 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config, nodeName, datadir string) {

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"
}
Expand All @@ -1496,7 +1497,7 @@ func SetNodeConfig(ctx *cli.Context, cfg *nodecfg.Config) {

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)
}
Expand Down Expand Up @@ -1526,7 +1527,7 @@ func setDataDir(ctx *cli.Context, cfg *nodecfg.Config) {
}

func isPowerOfTwo(n uint64) bool {
if n == 0 { //corner case: if n is zero it will also consider as power 2
if n == 0 { // corner case: if n is zero it will also consider as power 2
return true
}
return n&(n-1) == 0
Expand Down Expand Up @@ -1825,7 +1826,7 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *nodecfg.Config, cfg *ethconfig.C
cfg.SentinelPort = ctx.Uint64(SentinelPortFlag.Name)

cfg.Sync.UseSnapshots = ethconfig.UseSnapshotsByChainName(ctx.String(ChainFlag.Name))
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)
}

Expand Down
1 change: 0 additions & 1 deletion zk/tests/nightly-l1-recovery/network5-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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
Expand Down
1 change: 0 additions & 1 deletion zk/tests/nightly-l1-recovery/network5-sync-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ zkevm.l1-first-block: 6032365
zkevm.rpc-ratelimit: 250
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
Expand Down
1 change: 0 additions & 1 deletion zk/tests/nightly-l1-recovery/network8-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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
Expand Down
1 change: 0 additions & 1 deletion zk/tests/nightly-l1-recovery/network8-sync-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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
Expand Down

0 comments on commit 39a6b56

Please sign in to comment.