mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
* update: logs * update: more logging * update: rename local ingest dir args * update: fix build * update: directory path * update: logs * update: log ts * update: fetch last block * update: time formatting * update: handle seconds * update: lmore logs * fix: provided args * update: logs * fix: build * update: indefinite wiat * update: run the right loop * update: remove offset * update: scan impl * update: log exists * update: collect s3 blocks * update: change the file * update: logs * fix: deserialization * fix: build * update: remove block * update: add logs * update: logs * update: logs * update: dates * update: ignore older blocks * update: hook up to sync * fix: build * fix: build * update: logs * update: logs * update: start height cond * update: height * update: loggy * update: cond * update: cond * update: cond * update: logs * update: fix height issues * update: logs * only collect s3 * update: log block * update: log both blocks * update; return s3 block * update: use local block * update: blocks * update: remove logs * update: logs * update: remove warns and logs * update: collection log * update: logs * update: logs * update: scan through heights when registering evm * update: add local ingest dir to other evm factory * fix: build * update: add cli cmd * update: remove additional arg * update: change where local ingest dir comes from * fix: receipts * update: deser format * update: fix build * update: logs * update: logs * update: logs * update: logs * update: share precompiles with engine * update: insert compiles * update: change sync dir * update: logs * update: logs * update: logs * update: fix build * update: pipe builder context through * update: untracked * update: pass through context * fix: build * fix: build * update: logs * update: logs * update: logs * update: fix cache passthrough * update: remove logs * update: logs * update: hour rollover * update: zero out hour * update: hour sync * update: cleanup code and speedup sync * update: speedup sync * update: remove logs * update: speed up sync * update: speed up sync * update: ingest in reverse * fix: iter rev * update: break line loop early * update: remove break * update: iteration speed * update: fix build * update: slow down tail ival * update: logs * update: skip last line * update: remove log * update: height * update: logs * update: return logs * update: disable attempt logs * update: tail interval * update: cleanup logs * update: add iter skip * update: fix build * update: skip -1 * fix: skip * fix: build * update: build * fix: build * update: logs * update: log idx * update: skip after enumerate * update: cleanup * update: more cleanup * update: refactor BuilderSharedState to HyperliquidSharedState * update: more cleanup * update: cleanup and refactor collect_local_block * update: error msg * update: readme * update: typo * update: file log * fix: typo build * update: debug log
67 lines
2.7 KiB
Markdown
67 lines
2.7 KiB
Markdown
# nanoreth
|
|
|
|
Hyperliquid archive node based on [reth](https://github.com/paradigmxyz/reth).
|
|
|
|
## ⚠️ IMPORTANT: 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
|
|
$ aws s3 sync s3://hl-mainnet-evm-blocks/ ~/evm-blocks --request-payer requester # one-time
|
|
$ goofys --region=ap-northeast-1 --requester-pays hl-mainnet-evm-blocks evm-blocks-bak # realtime
|
|
|
|
# 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
|
|
```
|
|
|
|
## How to run (mainnet) (with local block sync)
|
|
|
|
You can choose to source blocks from your local instance of hl-node instead of relying on an s3 replica.
|
|
This will require you to first have a hl-node outputting blocks prior to running the initial s3 sync,
|
|
the node will prioritise locally produced blocks with a fallback to s3.
|
|
This method will allow you to reduce the need to rely on goofys.
|
|
|
|
It is recommended that you periodically sync evm-blocks from s3 so you have a fallback in case your hl-node fails, as hl-node
|
|
will not backfill evm blocks.
|
|
```sh
|
|
# Run your local hl-node (make sure output file buffering is disabled)
|
|
# Make sure evm blocks are being produced inside evm_block_and_receipts
|
|
$ hl-node run-non-validator --replica-cmds-style recent-actions --serve-eth-rpc --disable-output-file-buffering
|
|
|
|
# Fetch EVM blocks (Initial sync)
|
|
$ aws s3 sync s3://hl-mainnet-evm-blocks/ ~/evm-blocks --request-payer requester # one-time
|
|
|
|
# Run node (with local-ingest-dir arg)
|
|
$ 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 --local-ingest-dir <path-to-your-hl-node-evm-blocks-dir> --ws.port 8545
|
|
```
|
|
|
|
## How to run (testnet)
|
|
|
|
Testnet is supported since block 21304281.
|
|
|
|
```sh
|
|
# Get testnet genesis at block 21304281
|
|
$ 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/21304281.rlp \
|
|
--header-hash 0x5b10856d2b1ad241c9bd6136bcc60ef7e8553560ca53995a590db65f809269b4 \
|
|
~/hl-testnet-genesis/21304281.jsonl --total-difficulty 0
|
|
|
|
# Run node
|
|
$ reth node --chain testnet --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
|
|
```
|