From a6672aa4b92a10d0ec72fd10d1db8a747f6b84c0 Mon Sep 17 00:00:00 2001 From: Janito Vaqueiro Ferreira Filho Date: Tue, 8 Mar 2022 22:21:54 -0300 Subject: [PATCH] Enable `checkpoint_sync` by default (#3777) * Enable `checkpoint_sync` by default Provide fast synchronization by default. * Add newline to separate fields Make it slighly easier to read. * Update `checkpoint_sync` documentation Change the documentation to match the new default value, and explain that changing the value can be used for debugging. * Improve documentation Remove `post-Canopy`, because Zebra will likely change checkpoint heights in the future. Also explain better what the checkpoints are and why it helps with debugging. Co-authored-by: teor Co-authored-by: teor --- zebra-consensus/src/config.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/zebra-consensus/src/config.rs b/zebra-consensus/src/config.rs index 4cb51bf5..034a351e 100644 --- a/zebra-consensus/src/config.rs +++ b/zebra-consensus/src/config.rs @@ -4,14 +4,19 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(deny_unknown_fields, default)] pub struct Config { - /// Should Zebra sync using checkpoints? + /// Should Zebra use its optional checkpoints to sync? /// - /// Setting this option to true enables post-Canopy checkpoints. - /// (Zebra always checkpoints up to and including Canopy activation.) + /// This option is `true` by default, and allows for faster chain synchronization. /// - /// Future versions of Zebra may change the mandatory checkpoint - /// height. + /// Zebra requires some checkpoints to validate legacy network upgrades. + /// But it also ships with optional checkpoints, which can be used instead of full block validation. + /// + /// Disabling this option makes Zebra start full validation as soon as possible. + /// This helps developers debug Zebra, by running full validation on more blocks. + /// + /// Future versions of Zebra may change the required and optional checkpoints. pub checkpoint_sync: bool, + /// Skip the pre-download of Groth16 parameters if this option is true. pub debug_skip_parameter_preload: bool, } @@ -22,7 +27,7 @@ pub struct Config { impl Default for Config { fn default() -> Self { Self { - checkpoint_sync: false, + checkpoint_sync: true, debug_skip_parameter_preload: false, } }