diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index f3e039f9..0ba92c25 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -1045,28 +1045,6 @@ func (a *Aggregator) buildFinalProof( finalProof.Public.NewLocalExitRoot = finalDBBatch.Batch.LocalExitRoot.Bytes() } - // Sanity Check: state root from the proof must match the one from the final batch - if a.cfg.FinalProofSanityCheckEnabled { - finalDBBatch, err := a.state.GetBatch(ctx, proof.BatchNumberFinal, nil) - if err != nil { - return nil, fmt.Errorf("failed to retrieve batch with number [%d]", proof.BatchNumberFinal) - } - - if common.BytesToHash(finalProof.Public.NewStateRoot).String() != finalDBBatch.Batch.StateRoot.String() { - for { - log.Errorf( - "State root from the final proof does not match the expected for batch %d: Proof = [%s] Expected = [%s]", - proof.BatchNumberFinal, - common.BytesToHash(finalProof.Public.NewStateRoot).String(), - finalDBBatch.Batch.StateRoot.String(), - ) - time.Sleep(a.cfg.RetryTime.Duration) - } - } else { - log.Infof("State root sanity check from the final proof for batch %d passed", proof.BatchNumberFinal) - } - } - return finalProof, nil } diff --git a/aggregator/config.go b/aggregator/config.go index e17a24d1..4550c637 100644 --- a/aggregator/config.go +++ b/aggregator/config.go @@ -82,9 +82,6 @@ type Config struct { // BatchProofSanityCheckEnabled is a flag to enable the sanity check of the batch proof BatchProofSanityCheckEnabled bool `mapstructure:"BatchProofSanityCheckEnabled"` - // FinalProofSanityCheckEnabled is a flag to enable the sanity check of the final proof - FinalProofSanityCheckEnabled bool `mapstructure:"FinalProofSanityCheckEnabled"` - // ChainID is the L2 ChainID provided by the Network Config ChainID uint64 diff --git a/config/default.go b/config/default.go index 0cd33d79..ce76abc4 100644 --- a/config/default.go +++ b/config/default.go @@ -61,7 +61,6 @@ SenderAddress = "" CleanupLockedProofsInterval = "2m" GeneratingProofCleanupThreshold = "10m" BatchProofSanityCheckEnabled = true -FinalProofSanityCheckEnabled = true ForkId = 9 GasOffset = 0 WitnessURL = "localhost:8123"