Skip to content

Commit 4e2a4f0

Browse files
authored
Downgrade to Carmen version from 1.2.1-d (#174)
1 parent ad04853 commit 4e2a4f0

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

cmd/sonictool/check/archive.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func CheckArchiveStateDb(dataDir string, cacheRatio cachescale.Func) error {
2323
if err != nil {
2424
return fmt.Errorf("failed to check archive state dir: %w", err)
2525
}
26-
if err := mpt.VerifyArchiveTrie(archiveDir, info.Config, verificationObserver{}); err != nil {
26+
if err := mpt.VerifyArchive(archiveDir, info.Config, verificationObserver{}); err != nil {
2727
return fmt.Errorf("archive state verification failed: %w", err)
2828
}
2929
log.Info("Verification of the archive state succeed")

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require (
4444
gopkg.in/urfave/cli.v1 v1.20.0
4545
)
4646

47-
require github.com/Fantom-foundation/Carmen/go v0.0.0-20240613164726-ad1657431037
47+
require github.com/Fantom-foundation/Carmen/go v0.0.0-20240507092214-445df9f3b43c
4848

4949
require (
5050
github.com/DataDog/zstd v1.4.5 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mo
5757
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
5858
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
5959
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
60-
github.com/Fantom-foundation/Carmen/go v0.0.0-20240613164726-ad1657431037 h1:bK2Mk7ujPHV4mbGOF9SfTjvTPXEP+POrke7Dy4IaC3w=
61-
github.com/Fantom-foundation/Carmen/go v0.0.0-20240613164726-ad1657431037/go.mod h1:vNRGm/b21hDlF8kYyKHkXq1s+jLMKpV4jGwXHylXIIg=
60+
github.com/Fantom-foundation/Carmen/go v0.0.0-20240507092214-445df9f3b43c h1:zSUdDjwjcgrQ6Ov0a/wranXE50jpjXHwClfEPiVVpMs=
61+
github.com/Fantom-foundation/Carmen/go v0.0.0-20240507092214-445df9f3b43c/go.mod h1:d7YbZSMQ+IIrxAfQKBs75V50T+J/VDCyKavnRZxSNdQ=
6262
github.com/Fantom-foundation/Substate v0.0.0-20230224090651-4c8c024214f4 h1:AA0BtERxmlf7jvDF4fwIB2k/Lsc7HTRE3QHTZnfcSVA=
6363
github.com/Fantom-foundation/Substate v0.0.0-20230224090651-4c8c024214f4/go.mod h1:/yIHWCDDJcdKMJYvOLdYOnHt5eUBF9XWnrvrNE+90ik=
6464
github.com/Fantom-foundation/go-ethereum-substate v1.1.1-0.20240523185630-b058188a043a h1:JSaTMHvYKZOizg2EcJeNEiIpdF939Xw80g/sHd2qeWQ=

gossip/evmstore/statedb_import.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (s *Store) InitializeArchiveWorldState(liveReader io.Reader, blockNum uint6
8181
// The Store must be closed during the call.
8282
func (s *Store) ExportLiveWorldState(ctx context.Context, out io.Writer) error {
8383
liveDir := filepath.Join(s.parameters.Directory, "live")
84-
if err := io2.Export(ctx, liveDir, out); err != nil {
84+
if err := io2.Export(liveDir, out); err != nil {
8585
return fmt.Errorf("failed to export Live StateDB; %v", err)
8686
}
8787
return nil
@@ -91,7 +91,7 @@ func (s *Store) ExportLiveWorldState(ctx context.Context, out io.Writer) error {
9191
// The Store must be closed during the call.
9292
func (s *Store) ExportArchiveWorldState(ctx context.Context, out io.Writer) error {
9393
archiveDir := filepath.Join(s.parameters.Directory, "archive")
94-
if err := io2.ExportArchive(ctx, archiveDir, out); err != nil {
94+
if err := io2.ExportArchive(archiveDir, out); err != nil {
9595
return fmt.Errorf("failed to export Archive StateDB; %v", err)
9696
}
9797
return nil

gossip/evmstore/statedb_verify.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (s *Store) VerifyWorldState(expectedBlockNum uint64, expectedHash common.Ha
4444
if err != nil {
4545
return fmt.Errorf("failed to check archive dir: %w", err)
4646
}
47-
if err := mpt.VerifyArchiveTrie(archiveDir, archiveInfo.Config, observer); err != nil {
47+
if err := mpt.VerifyArchive(archiveDir, archiveInfo.Config, observer); err != nil {
4848
return fmt.Errorf("archive verification failed: %w", err)
4949
}
5050
s.Log.Info("Archive verified successfully.")

integration/makegenesis/genesis.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package makegenesis
22

33
import (
44
"bytes"
5-
"context"
65
"errors"
76
"fmt"
87
"io"
@@ -258,7 +257,7 @@ func (b *GenesisBuilder) Build(head genesis.Header) *genesisstore.Store {
258257
return buf, nil
259258
}
260259
if name == genesisstore.FwsLiveSection(0) {
261-
err := mptIo.Export(context.Background(), filepath.Join(b.carmenDir, "live"), buf)
260+
err := mptIo.Export(filepath.Join(b.carmenDir, "live"), buf)
262261
if err != nil {
263262
return nil, err
264263
}

0 commit comments

Comments
 (0)