Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
[erigon2.2] Optimisation of state reconstitution (ledgerwatch#4621)
Browse files Browse the repository at this point in the history
* Init

* Optimise ReconState flushes

* Updates

* Update

* Updates

* Updates

* More on parallel execution

* More on parallel exec

* Fix lint

* Improvements to parallel exec

* comment

* Fix history access, include incarnation

* Close work channel

* TxTask

* more fixes to parallel exec

* Update to latest erigon-lib

* Fix compilation

* Cleanup and timing

* Fixes to recon1

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
  • Loading branch information
3 people committed Jul 6, 2022
1 parent 5e1cc9a commit 73b0659
Show file tree
Hide file tree
Showing 9 changed files with 1,337 additions and 286 deletions.
10 changes: 0 additions & 10 deletions cmd/state/commands/erigon22.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,6 @@ func (rw *ReaderWrapper22) ReadAccountData(address common.Address) (*accounts.Ac
if incBytes > 0 {
a.Incarnation = bytesToUint64(enc[pos : pos+incBytes])
}
if rw.blockNum == 10264901 {
fmt.Printf("block %d ReadAccount [%x] => {Balance: %d, Nonce: %d}\n", rw.blockNum, address, &a.Balance, a.Nonce)
}
return &a, nil
}

Expand All @@ -450,9 +447,6 @@ func (rw *ReaderWrapper22) ReadAccountStorage(address common.Address, incarnatio
if err != nil {
return nil, err
}
if rw.blockNum == 10264901 {
fmt.Printf("block %d ReadStorage [%x] [%x] => [%x]\n", rw.blockNum, address, *key, enc)
}
if enc == nil {
return nil, nil
}
Expand Down Expand Up @@ -558,10 +552,6 @@ func (ww *WriterWrapper22) DeleteAccount(address common.Address, original *accou
}

func (ww *WriterWrapper22) WriteAccountStorage(address common.Address, incarnation uint64, key *common.Hash, original, value *uint256.Int) error {
trace := fmt.Sprintf("%x", address) == "000000000000006f6502b7f2bbac8c30a3f67e9a"
if trace {
fmt.Printf("block %d WriteAccountStorage [%x] [%x] => [%x]\n", ww.blockNum, address, *key, value.Bytes())
}
if err := ww.w.WriteAccountStorage(address.Bytes(), key.Bytes(), value.Bytes()); err != nil {
return err
}
Expand Down
Loading

0 comments on commit 73b0659

Please sign in to comment.