0xPolygonHermez / cdk-erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
29 stars 23 forks source link

when I run erigon as zkevm rpc and sync batch from 0 to latest, I got OOM error #491

Closed zibuyu28 closed 2 weeks ago

zibuyu28 commented 1 month ago

System information

Erigon version: branch zkevm

OS & Version: Linux

Commit hash:

Erigon Command (with flags/config):

Concensus Layer:

Concensus Layer Command (with flags/config):

Chain/Network:

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

Backtrace

[backtrace]
zjg555543 commented 1 month ago

Fixed PR: https://github.com/0xPolygonHermez/cdk-erigon/pull/585.

Root case: Using mapmutation consumes too much memory in the regenerateIntermediateHashes function, especially when processing blocks from 0 to the maximum block.

Test Result: Tested on the XLayer Testnet with 8 cores and 64 GB of RAM. Test branches: https://github.com/okx/xlayer-erigon/pull/18 Old method: image

New method: image