From 9516e0f6b693794dee7191ecbb5cef6749d3eef3 Mon Sep 17 00:00:00 2001 From: Christina <156356273+cratiu222@users.noreply.github.com> Date: Tue, 28 Jan 2025 17:56:23 +0200 Subject: [PATCH] chore: fix various comments (#31082) --- core/vm/eof_validation_test.go | 2 +- tests/fuzzers/bls12381/bls12381_fuzz.go | 2 +- triedb/pathdb/database.go | 4 ++-- triedb/pathdb/difflayer.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/vm/eof_validation_test.go b/core/vm/eof_validation_test.go index afb856a32c..f7b0e78f26 100644 --- a/core/vm/eof_validation_test.go +++ b/core/vm/eof_validation_test.go @@ -363,7 +363,7 @@ func BenchmarkEOFValidation(b *testing.B) { } } -// BenchmarkEOFValidation tries to benchmark the code validation for the CALLF/RETF operation. +// BenchmarkEOFValidation2 tries to benchmark the code validation for the CALLF/RETF operation. // For this we set up code that calls into 1024 code sections which // - contain calls to some other code sections. // We can't have all code sections calling each other, otherwise we would exceed 48KB. diff --git a/tests/fuzzers/bls12381/bls12381_fuzz.go b/tests/fuzzers/bls12381/bls12381_fuzz.go index 9efc6f596f..5cb05b5660 100644 --- a/tests/fuzzers/bls12381/bls12381_fuzz.go +++ b/tests/fuzzers/bls12381/bls12381_fuzz.go @@ -346,7 +346,7 @@ func multiExpG1Gnark(gs []gnark.G1Affine, scalars []fr.Element) gnark.G1Affine { return res } -// multiExpG1Gnark is a naive implementation of G1 multi-exponentiation +// multiExpG2Gnark is a naive implementation of G2 multi-exponentiation func multiExpG2Gnark(gs []gnark.G2Affine, scalars []fr.Element) gnark.G2Affine { res := gnark.G2Affine{} for i := 0; i < len(gs); i++ { diff --git a/triedb/pathdb/database.go b/triedb/pathdb/database.go index b0d84eb879..d48850c102 100644 --- a/triedb/pathdb/database.go +++ b/triedb/pathdb/database.go @@ -471,8 +471,8 @@ func (db *Database) Recoverable(root common.Hash) bool { if id == nil { return false } - // Recoverable state must below the disk layer. The recoverable - // state only refers the state that is currently not available, + // Recoverable state must be below the disk layer. The recoverable + // state only refers to the state that is currently not available, // but can be restored by applying state history. dl := db.tree.bottom() if *id >= dl.stateID() { diff --git a/triedb/pathdb/difflayer.go b/triedb/pathdb/difflayer.go index c06026b6ca..2e1d83c74a 100644 --- a/triedb/pathdb/difflayer.go +++ b/triedb/pathdb/difflayer.go @@ -27,8 +27,8 @@ import ( // diffLayer represents a collection of modifications made to the in-memory tries // along with associated state changes after running a block on top. // -// The goal of a diff layer is to act as a journal, tracking recent modifications -// made to the state, that have not yet graduated into a semi-immutable state. +// The purpose of a diff layer is to serve as a journal, recording recent state modifications +// that have not yet been committed to a more stable or semi-permanent state. type diffLayer struct { // Immutables root common.Hash // Root hash to which this layer diff belongs to