Git Product home page Git Product logo

hl-node's Introduction

Running a node

Machine Specs

Recommended hardware: 4 CPU cores, 16 gb RAM, 50 gb disk.

Currently only Ubuntu 24.04 is supported.

Ports 8000 and 9000 are used for gossip and must be open to the public. Otherwise your IP address will be deprioritized by peers in the p2p network.

For lowest latency, run the node in Tokyo, Japan.

Setup

Configure chain to testnet. Mainnet will be available once testing is complete on testnet:

echo '{"chain": "Testnet"}' > ~/visor.json

For now, the non-validating node requires a configuration file. This will no longer be required in a future update when the node will verify the validator beacon chain from genesis:

curl https://binaries.hyperliquid.xyz/Testnet/non_validator_config.json > ~/non_validator_config.json

Download the visor binary, which will spawn and manage the child node process:

curl https://binaries.hyperliquid.xyz/Testnet/hl-visor > ~/hl-visor && chmod a+x ~/hl-visor

Running

Run ~/hl-visor. It may take a while as your node navigates the network to find an appropriate peer to stream from. Once you see logs like applied block X then your node should be streaming live data. You can inspect the transactions or other data as described below.

Reading L1 data

The node process will write data to ~/hl/data. With default settings, the network will generate around 20 gb of logs per day, so it is also recommended to archive or delete old files.

Blocks parsed as transactions will be streamed to ~/hl/data/replica_cmds/{start_time}/{date}/{height}

State snapshots will be saved every 10000 blocks to ~/hl/data/periodic_abci_states/{date}/{height}.rmp

Trades will be streamed to ~/hl/data/node_trades/hourly/{date}/{hour}.

Orders can be streamed by running ~/hl-visor --write-order-statuses. This will write every L1 order status to ~/hl/data/node_order_statuses/hourly/{date}/{hour}. Orders can be a substantial amount of data so this flag is off by default.

Running with Docker

To build the node, run:

docker compose build

To run the node, run:

docker compose up -d

Examining the Blockchain data

The state can be translated to JSON format for examination:

./hl-node translate-abci-state ~/hl/data/periodic_abci_states/{date}/{height}.rmp /tmp/out.json

Troubleshooting

Crash logs from the child process will be written to ~/hl/data/visor_child_stderr/{date}/{node_binary_index}

hl-node's People

Contributors

autostake-com avatar paolofacchinetti avatar omurovec avatar chameleon-jeff avatar lmlmt avatar thesalade avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.