optimism icon indicating copy to clipboard operation
optimism copied to clipboard

l2geth generates dirty files

Open gabronick opened this issue 2 years ago • 1 comments

Describe the bug overtime 2geth generates dirty LDB files that are only cleaned up when restarting geth, this causes the disk to reach 100% and L2Geth crashes due to insufficient space, I have a 3.6 Tb disk with 43% effective data, and every 8 hours I have to be restarting l2geth so that it cleans these files and the disk can have space

To Reproduce let l2Geth run

SERVICE FILE


[Unit] Description=Optimism l2geth After=syslog.target network.target

[Service] Environment="CHAIN_ID=10" Environment="DATADIR=/external/gethData" Environment="NETWORK_ID=10" Environment="NO_DISCOVER=true" Environment="NO_USB=true" Environment="GASPRICE=0" Environment="GCMODE=archive" Environment="BLOCK_SIGNER_ADDRESS=0x00000398232E2064F896018496b4b44b3D62751F" Environment="BLOCK_SIGNER_PRIVATE_KEY=6587ae678cf4fc9a33000cdbf9f35226b71dcc6a4684a31203241f9bcfd55d27" Environment="ETH1_CTC_DEPLOYMENT_HEIGHT=13596466" Environment="ETH1_SYNC_SERVICE_ENABLE=true" Environment="ROLLUP_ADDRESS_MANAGER_OWNER_ADDRESS=0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A" Environment="ROLLUP_CLIENT_HTTP=http://localhost:7878" Environment="ROLLUP_DISABLE_TRANSFERS=false" Environment="ROLLUP_ENABLE_L2_GAS_POLLING=false" Environment="ROLLUP_GAS_PRICE_ORACLE_OWNER_ADDRESS=0x648E3e8101BFaB7bf5997Bd007Fb473786019159" Environment="ROLLUP_MAX_CALLDATA_SIZE=40000" Environment="ROLLUP_POLL_INTERVAL_FLAG=1s" Environment="ROLLUP_SYNC_SERVICE_ENABLE=true" Environment="ROLLUP_TIMESTAMP_REFRESH=5m" Environment="ROLLUP_VERIFIER_ENABLE=true" Environment="RPC_ADDR=0.0.0.0" Environment="RPC_API=eth,rollup,net,web3,debug" Environment="RPC_CORS_DOMAIN=" Environment="RPC_ENABLE=true" Environment="RPC_PORT=8545" Environment="RPC_VHOSTS=" Environment="TARGET_GAS_LIMIT=15000000" Environment="USING_OVM=true" Environment="ROLLUP_BACKEND=l2"

LimitNOFILE=50097152 User=root Group=root Restart=on-failure Type=simple RestartSec=10s KillMode=process KillSignal=SIGINT TimeoutStopSec=90 ExecStart=/external/optimism/l2geth/build/bin/geth --nousb --datadir=/external/gethData --password=/external/password -allow-insecure-unlock --unlock=0x00000398232E2064F896018496b4b44b3D62751F --mine --miner.etherbase=0x00000398232E2064F896018496b4b44b3D62751F

[Install] WantedBy=multi-user.target


Expected behavior l2geth should keep cleaning up its DB like geth does

System Specs:

  • OS: Ubuntu 22.04.1 LTS aarch64, 32Gb RAM, 3.6Tb NVME , AWS instance: im4gn.2xlarge
  • Package Version (or commit hash): 266897a9598117a683b436bfbb7374ece3707c49

gabronick avatar Jan 01 '23 14:01 gabronick

We're very close to deprecating L2Geth entirely with the launch of Bedrock, so it's likely that this will not be fixed before Bedrock launches. After Bedrock is live, I might push for a "Turbo L2Geth" where we rebuild the legacy L2Geth on top of the latest Geth release.

smartcontracts avatar Jan 11 '23 21:01 smartcontracts