Skip to content

Instantly share code, notes, and snippets.

@stonegao
Forked from teebaumcrypto/install_guide.md
Created June 30, 2023 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stonegao/1ec5d0f648dfe3cb81f4bae78aa1dd21 to your computer and use it in GitHub Desktop.
Save stonegao/1ec5d0f648dfe3cb81f4bae78aa1dd21 to your computer and use it in GitHub Desktop.
lighthouse & reth install and sync mainnet ethereum

Specs

CPU

  • AMD Ryzen 9 7900X AM5, 4.70 GHz, 12-Core

RAM

  • Corsair 6000-40 Vengeance 2 x 32GB 6000 MHz (DDR5)

Nvme

  • WD Black SN850X 4 TB M.2 2280

Times for syncing:

Stage Time
1. Headers 5min
2. TotalDifficulty 12 sec
3. Bodies 1h 30min
4. SenderRecovery 1h 45min
5. Execution 24h 25min
6. MerkleUnwind??? instant
7. AccountHashing 25 min
8. StorageHashing 55 min
9. MerkleExecute 31 min
10. TransactionLookup 22h 42min
11. IndexStorageHistory 6h 52min
12. IndexAccountHistory 3h 12min
13. Finish 31min

Server check

check your memory before starting to sync, mdbx will eventually corrupt if your memory has an error. check in runtime:

sudo apt update
sudo apt install memtester
# Execute memtester for 60Gb -> 60 x 1024 and run the test once
# takes approx 2-4h
sudo memtester 60G 1

Additionally with physical access or KVM: check with memtest86.com

Lighthouse

Lighthouse install guide

https://lighthouse-book.sigmaprime.io/installation-source.html

sudo apt install -y git gcc g++ make cmake pkg-config llvm-dev libclang-dev clang protobuf-compiler
git clone https://github.com/sigp/lighthouse.git
cd lighthouse
git checkout stable
PROFILE=maxperf make
# Run lighthouse in screen or terminal:
lighthouse bn  --network mainnet --execution-endpoint http://localhost:8551 --execution-jwt ~/data/jwt.hex --checkpoint-sync-url https://mainnet.checkpoint.sigp.io --disable-deposit-contract-sync --datadir ~/data/lighthouse_data

Install Guide from paradigm

https://paradigmxyz.github.io/reth/installation/source.html

Commit of source

https://github.com/paradigmxyz/reth/commit/86a130b68334758abd082efd9d38db8cc1e637bf

git clone https://github.com/paradigmxyz/reth
cd reth
# Build reth with
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc
# Run reth with
RUST_LOG=info ~/reth/target/maxperf/reth node --datadir ~/data/reth_data --authrpc.jwtsecret ~/data/jwt.hex --ws --ws.addr="127.0.0.1" --ws.api=eth,web3,net,txpool --http --http.api=eth,web3,net,txpool --http.addr="127.0.0.1" --http.port=8545 --metrics 127.0.0.1:9001

Log startup

2023-06-10T21:24:50.258095Z  INFO reth::cli: reth 0.1.0 (86a130b6) starting
2023-06-10T21:24:50.258222Z  INFO reth::cli: Configuration loaded path="/home/teebaum/data/reth_data/reth.toml"
2023-06-10T21:24:50.258229Z  INFO reth::cli: Opening database path="/home/teebaum/data/reth_data/db"
2023-06-10T21:24:50.259939Z  INFO reth::cli: Database opened
2023-06-10T21:24:50.259943Z  INFO reth::cli: Starting metrics endpoint addr=127.0.0.1:9001
2023-06-10T21:24:50.280348Z  INFO reth::cli: Transaction pool initialized
2023-06-10T21:24:50.280361Z  INFO reth::cli: Connecting to P2P network
2023-06-10T21:24:50.280802Z  INFO reth::cli: Connected to P2P network peer_id=0x07c4…b0d7 local_addr=0.0.0.0:30303
2023-06-10T21:24:50.281230Z  INFO reth::cli: Consensus engine initialized
2023-06-10T21:24:50.281237Z  INFO reth::cli: Engine API handler initialized
2023-06-10T21:24:50.281495Z  INFO reth::cli: RPC auth server started
2023-06-10T21:24:50.281966Z  INFO reth::cli: RPC IPC server started url=/tmp/reth.ipc
2023-06-10T21:24:50.281969Z  INFO reth::cli: RPC HTTP server started url=127.0.0.1:8545
2023-06-10T21:24:50.281970Z  INFO reth::cli: RPC WS server started url=127.0.0.1:8546
2023-06-10T21:24:50.281972Z  INFO reth::cli: Starting consensus engine

Syncing start and end logs

1. Headers
2023-06-10T21:25:00.872158Z  INFO execute{stage=Headers}: sync::pipeline: Stage committed progress stage=Headers progress=0 checkpoint=0.1% done=false
2023-06-10T21:30:13.406509Z  INFO execute{stage=Headers}: sync::pipeline: Stage committed progress stage=Headers progress=17452283 checkpoint=100.0% done=true
2. TotalDifficulty
2023-06-10T21:30:13.466195Z  INFO execute{stage=TotalDifficulty}: sync::pipeline: Stage committed progress stage=TotalDifficulty progress=100000 checkpoint=0.6% done=false
2023-06-10T21:30:25.466779Z  INFO execute{stage=TotalDifficulty}: sync::pipeline: Stage committed progress stage=TotalDifficulty progress=17452283 checkpoint=100.0% done=true
3. Bodies
2023-06-10T21:30:26.627106Z  INFO execute{stage=Bodies}: sync::pipeline: Stage committed progress stage=Bodies progress=10000 checkpoint=0.1% done=false
2023-06-10T23:00:18.189932Z  INFO execute{stage=Bodies}: sync::pipeline: Stage committed progress stage=Bodies progress=17452283 checkpoint=100.0% done=true
4. SenderRecovery
2023-06-10T23:00:18.435017Z  INFO execute{stage=SenderRecovery}: sync::pipeline: Stage committed progress stage=SenderRecovery progress=135300 checkpoint=0.0% done=false
2023-06-11T00:45:38.856783Z  INFO execute{stage=SenderRecovery}: sync::pipeline: Stage committed progress stage=SenderRecovery progress=17452283 checkpoint=100.0% done=true
5. Execution
2023-06-11T00:49:06.744454Z  INFO execute{stage=Execution}: sync::pipeline: Stage committed progress stage=Execution progress=500001 checkpoint=0.0% done=false
2023-06-12T01:14:01.845783Z  INFO execute{stage=Execution}: sync::pipeline: Stage committed progress stage=Execution progress=17452283 checkpoint=100.0% done=true
6. stage not in logs?
Merkle Unwind?
2023-06-12T01:14:02.866992Z  INFO execute{stage=MerkleUnwind}: sync::pipeline: Stage committed progress stage=MerkleUnwind progress=17452283 checkpoint=17452283 done=true
7. AccountHashing
2023-06-12T01:14:02.943040Z  INFO execute{stage=AccountHashing}: sync::pipeline: Stage committed progress stage=AccountHashing progress=0 checkpoint=0.0% done=false
2023-06-12T01:39:44.293920Z  INFO execute{stage=AccountHashing}: sync::pipeline: Stage committed progress stage=AccountHashing progress=17452283 checkpoint=100.0% done=true
8. StorageHashing
2023-06-12T01:39:44.692968Z  INFO execute{stage=StorageHashing}: sync::pipeline: Stage committed progress stage=StorageHashing progress=0 checkpoint=0.0% done=false
2023-06-12T02:34:36.379587Z  INFO execute{stage=StorageHashing}: sync::pipeline: Stage committed progress stage=StorageHashing progress=17452283 checkpoint=100.0% done=true
9. MerkleExecute
2023-06-12T02:34:36.832854Z  INFO execute{stage=MerkleExecute}: sync::pipeline: Stage committed progress stage=MerkleExecute progress=0 checkpoint=0.0% done=false
2023-06-12T03:05:39.625084Z  INFO execute{stage=MerkleExecute}: sync::pipeline: Stage committed progress stage=MerkleExecute progress=17452283 checkpoint=100.0% done=true
10. TransactionLookup
2023-06-12T03:05:39.795373Z  INFO execute{stage=TransactionLookup}: sync::pipeline: Stage committed progress stage=TransactionLookup progress=180998 checkpoint=0.0% done=false
2023-06-13T01:47:43.308841Z  INFO execute{stage=TransactionLookup}: sync::pipeline: Stage committed progress stage=TransactionLookup progress=17452283 checkpoint=100.0% done=true
11. IndexStorageHistory
2023-06-13T01:47:43.626269Z  INFO reth::cli: Stage committed progress pipeline_stages=11/13 stage=IndexStorageHistory progress=100000 checkpoint=0.0%
2023-06-13T08:39:32.386024Z  INFO execute{stage=IndexStorageHistory}: sync::pipeline: Stage committed progress stage=IndexStorageHistory progress=17452283 checkpoint=100.0% done=true
12.IndexAccountHistory
2023-06-13T08:39:35.259827Z  INFO execute{stage=IndexAccountHistory}: sync::pipeline: Stage committed progress stage=IndexAccountHistory progress=100000 checkpoint=0.0% done=false
2023-06-13T11:56:58.108018Z  INFO execute{stage=IndexAccountHistory}: sync::pipeline: Stage committed progress stage=IndexAccountHistory progress=17452283 checkpoint=100.0% done=true
13. Finish
2023-06-13T11:56:58.623226Z  INFO execute{stage=Finish}: sync::pipeline: Stage committed progress stage=Finish progress=17452283 checkpoint=17452283 done=true
2023-06-13T12:28:07.046485Z  INFO execute{stage=Finish}: sync::pipeline: Stage committed progress stage=Finish progress=17471072 checkpoint=17471072 done=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment