From df0262769bedcda52bd31cb8cd29368ee06461da Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Sat, 9 Nov 2024 17:03:12 -0600 Subject: [PATCH] switch default behavior and config value --- node/config/engine.go | 4 ++-- .../intrinsics/token/token_execution_engine.go | 2 +- node/main.go | 10 ++++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/node/config/engine.go b/node/config/engine.go index 3c72803..082c7ae 100644 --- a/node/config/engine.go +++ b/node/config/engine.go @@ -19,8 +19,8 @@ type EngineConfig struct { // Alternative configuration path to manually specify data workers by multiaddr DataWorkerMultiaddrs []string `yaml:"dataWorkerMultiaddrs"` MultisigProverEnrollmentPaths []string `yaml:"multisigProverEnrollmentPaths"` - // Does not verify execution, enables light provers - LightNode bool + // Fully verifies execution, omit to enable light prover + FullProver bool // Automatically merges coins after minting once a sufficient number has been // accrued AutoMergeCoins bool diff --git a/node/execution/intrinsics/token/token_execution_engine.go b/node/execution/intrinsics/token/token_execution_engine.go index a84e609..9a2f7c4 100644 --- a/node/execution/intrinsics/token/token_execution_engine.go +++ b/node/execution/intrinsics/token/token_execution_engine.go @@ -200,7 +200,7 @@ func NewTokenExecutionEngine( []*tries.RollingFrecencyCritbitTrie, error, ) { - if !e.engineConfig.LightNode { + if e.engineConfig.FullProver { if err := e.VerifyExecution(frame, triesAtFrame); err != nil { return nil, err } diff --git a/node/main.go b/node/main.go index 84c3a72..858e1ba 100644 --- a/node/main.go +++ b/node/main.go @@ -126,7 +126,7 @@ var ( ) lightProver = flag.Bool( "light-prover", - false, + true, "when enabled, frame execution validation is skipped", ) ) @@ -327,11 +327,9 @@ func main() { ) } - if *lightProver { - nodeConfig.Engine.LightNode = true - fmt.Println( - "Node is running in light mode – be sure you intended to do this.", - ) + // If it's not explicitly set to true, we should defer to flags + if !nodeConfig.Engine.FullProver { + nodeConfig.Engine.FullProver = !*lightProver } clearIfTestData(*configDirectory, nodeConfig)