From b2adb0f31daf3f9a21cb06f069f9db5142a70bb2 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Fri, 18 Apr 2025 05:47:41 +0000 Subject: [PATCH] doc: Add testnet instruction --- README.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fc6386d32..59a7116d7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,13 @@ Hyperliquid archive node based on [reth](https://github.com/paradigmxyz/reth). -## How to run +## System Transactions Appear as Pseudo Transactions + +Deposit transactions from `0x222..22` to user addresses are intentionally recorded as pseudo transactions. +This change simplifies block explorers, making it easier to track deposit timestamps. +Ensure careful handling when indexing. + +## How to run (mainnet) ```sh # Fetch EVM blocks @@ -11,11 +17,27 @@ $ goofys --region=ap-northeast-1 --requester-pays hl-mainnet-evm-blocks evm-bloc # Run node $ make install -$ reth node --http --http.addr 0.0.0.0 --http.api eth,ots,net,web3 --ws --ws.addr 0.0.0.0 --ws.origins '*' --ws.api eth,ots,net,web3 --ingest-dir ~/evm-blocks --ws.port 8545 +$ reth node --http --http.addr 0.0.0.0 --http.api eth,ots,net,web3 \ + --ws --ws.addr 0.0.0.0 --ws.origins '*' --ws.api eth,ots,net,web3 --ingest-dir ~/evm-blocks --ws.port 8545 ``` -## System Transactions Appear as Pseudo Transactions +## How to run (testnet) -Deposit transactions from `0x222..22` to user addresses are intentionally recorded as pseudo transactions. -This change simplifies block explorers, making it easier to track deposit timestamps. -Ensure careful handling when indexing. +Testnet is supported since block 21043587. + +```sh +# Get testnet genesis at block 21043587 +$ cd ~ +$ git clone https://github.com/sprites0/hl-testnet-genesis +$ zstd --rm -d ~/hl-testnet-genesis/*.zst + +# Init node +$ make install +$ reth init-state --without-evm --chain testnet --header ~/hl-testnet-genesis/21043587.rlp \ + --header-hash 0x2404e9a38b87e9028295df91e922c2e804c3ca75b550289cf5b353a9c61c34ea \ + ~/hl-testnet-genesis/21043587.jsonl --total-difficulty 0 + +# Run node +$ reth node --http --http.addr 0.0.0.0 --http.api eth,ots,net,web3 \ + --ws --ws.addr 0.0.0.0 --ws.origins '*' --ws.api eth,ots,net,web3 --ingest-dir ~/evm-blocks --ws.port 8546 +```