Skip to content

Commit

Permalink
Erigon 3: Purified states repressentation (#13227)
Browse files Browse the repository at this point in the history
Purifification of states works by pruning historical states from
dangling nodes.

The process is to collect all keys into a temporary MDBX with mapping
`node -> layer` , then we iterate over each node again and remove all of
them whose `node->layer` is not matching in the historical states DB.

---------

Co-authored-by: alex.sharov <[email protected]>
  • Loading branch information
Giulio2002 and AskAlexSharov authored Jan 8, 2025
1 parent 2cea51f commit 62c8e81
Show file tree
Hide file tree
Showing 12 changed files with 419 additions and 56 deletions.
8 changes: 8 additions & 0 deletions RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ In most cases, it is enough to bump minor version.
In the file `ethdb/remote/remotedbserver/server.go` there is variable `KvServiceAPIVersion` that needs to be updated if there are any changes in the remote KV interface, or
database schema, leading to data migrations.
In most cases, it is enough to bump minor version. It is best to change both DB schema version and remove KV version together.

## Purify the state domains if a regenration is done

If a regenration is done, the state domains need to be purified. This can be done by running the following command:
````
make integration
./build/bin/integration purify_domains --datadir=<path to datadir> --replace-in-datadir
````
Loading

0 comments on commit 62c8e81

Please sign in to comment.