Skip to content

Commit

Permalink
rm e2 changesets tables (#12940)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Dec 3, 2024
1 parent 93c8008 commit 4e40c9f
Show file tree
Hide file tree
Showing 24 changed files with 316 additions and 1,106 deletions.
4 changes: 2 additions & 2 deletions cmd/evm/internal/t8ntool/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,11 @@ func CalculateStateRoot(tx kv.RwTx) (*libcommon.Hash, error) {
h.Sha.Write(k[length.Addr+length.Incarnation:])
//nolint:errcheck
h.Sha.Read(newK[length.Hash+length.Incarnation:])
if err = tx.Put(kv.HashedStorage, newK, libcommon.CopyBytes(v)); err != nil {
if err = tx.Put(kv.HashedStorageDeprecated, newK, libcommon.CopyBytes(v)); err != nil {
return nil, fmt.Errorf("insert hashed key: %w", err)
}
} else {
if err = tx.Put(kv.HashedAccounts, newK, libcommon.CopyBytes(v)); err != nil {
if err = tx.Put(kv.HashedAccountsDeprecated, newK, libcommon.CopyBytes(v)); err != nil {
return nil, fmt.Errorf("insert hashed key: %w", err)
}
}
Expand Down
6 changes: 2 additions & 4 deletions cmd/integration/commands/refetence_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ import (
)

var stateBuckets = []string{
kv.HashedAccounts,
kv.HashedStorage,
kv.HashedAccountsDeprecated,
kv.HashedStorageDeprecated,
kv.ContractCode,
kv.PlainState,
kv.AccountChangeSet,
kv.StorageChangeSet,
kv.PlainContractCode,
kv.IncarnationMap,
kv.Code,
Expand Down
38 changes: 17 additions & 21 deletions cmd/pics/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,27 +86,23 @@ import (
}*/

var bucketLabels = map[string]string{
kv.Receipts: "Receipts",
kv.Log: "Event Logs",
kv.E2AccountsHistory: "History Of Accounts",
kv.E2StorageHistory: "History Of Storage",
kv.Headers: "Headers",
kv.HeaderCanonical: "Canonical headers",
kv.HeaderTD: "Headers TD",
kv.BlockBody: "Block Bodies",
kv.HeaderNumber: "Header Numbers",
kv.TxLookup: "Transaction Index",
kv.Code: "Code Of Contracts",
kv.SyncStageProgress: "Sync Progress",
kv.PlainState: "Plain State",
kv.HashedAccounts: "Hashed Accounts",
kv.HashedStorage: "Hashed Storage",
kv.TrieOfAccounts: "Intermediate Hashes Of Accounts",
kv.TrieOfStorage: "Intermediate Hashes Of Storage",
kv.AccountChangeSet: "Account Changes",
kv.StorageChangeSet: "Storage Changes",
kv.IncarnationMap: "Incarnations",
kv.Senders: "Transaction Senders",
kv.Receipts: "Receipts",
kv.Log: "Event Logs",
kv.Headers: "Headers",
kv.HeaderCanonical: "Canonical headers",
kv.HeaderTD: "Headers TD",
kv.BlockBody: "Block Bodies",
kv.HeaderNumber: "Header Numbers",
kv.TxLookup: "Transaction Index",
kv.Code: "Code Of Contracts",
kv.SyncStageProgress: "Sync Progress",
kv.PlainState: "Plain State",
kv.HashedAccountsDeprecated: "Hashed Accounts",
kv.HashedStorageDeprecated: "Hashed Storage",
kv.TrieOfAccounts: "Intermediate Hashes Of Accounts",
kv.TrieOfStorage: "Intermediate Hashes Of Storage",
kv.IncarnationMap: "Incarnations",
kv.Senders: "Transaction Senders",
}

/*dbutils.PlainContractCode,
Expand Down
36 changes: 0 additions & 36 deletions cmd/state/commands/check_enc.go

This file was deleted.

39 changes: 0 additions & 39 deletions cmd/state/commands/check_index.go

This file was deleted.

23 changes: 6 additions & 17 deletions cmd/state/commands/global_flags_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ import (
)

var (
datadirCli string
chaindata string
statsfile string
block uint64
changeSetBucket string
indexBucket string
snapshotsCli bool
chain string
logdir string
datadirCli string
chaindata string
statsfile string
block uint64
indexBucket string
chain string
)

func must(err error) {
Expand All @@ -59,14 +56,6 @@ func withStatsfile(cmd *cobra.Command) {
must(cmd.MarkFlagFilename("statsfile", "csv"))
}

func withCSBucket(cmd *cobra.Command) {
cmd.Flags().StringVar(&changeSetBucket, "changeset-bucket", kv.AccountChangeSet, kv.AccountChangeSet+" for account and "+kv.StorageChangeSet+" for storage")
}

func withIndexBucket(cmd *cobra.Command) {
cmd.Flags().StringVar(&indexBucket, "index-bucket", kv.E2AccountsHistory, kv.E2AccountsHistory+" for account and "+kv.E2StorageHistory+" for storage")
}

func withChain(cmd *cobra.Command) {
cmd.Flags().StringVar(&chain, "chain", "", "pick a chain to assume (mainnet, sepolia, etc.)")
}
144 changes: 0 additions & 144 deletions cmd/state/verify/check_changeset_enc.go

This file was deleted.

Loading

0 comments on commit 4e40c9f

Please sign in to comment.