Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ RUN curl -o /home/$USERNAME/hl-visor $HL_VISOR_URL \
&& gpg --verify /home/$USERNAME/hl-visor.asc /home/$USERNAME/hl-visor \
&& chmod +x /home/$USERNAME/hl-visor

# Expose rpc port
EXPOSE 3001
# Expose gossip ports
EXPOSE 4000-4010

# Run a non-validating node
ENTRYPOINT ["/home/hluser/hl-visor", "run-non-validator", "--replica-cmds-style", "recent-actions"]

# Optional: Run a non-validating node with EVM RPC enabled (if using, comment out the above line and uncomment this one)
# ENTRYPOINT ["/home/hluser/hl-visor", "run-non-validator", "--serve-eth-rpc", "--replica-cmds-style", "recent-actions"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ Enable the EVM RPC by adding the `--serve-eth-rpc` flag:
~/hl-visor run-non-validator --serve-eth-rpc
```

Ensure that port 3001 is open in your local firewall if you are planning on accessing the EVM RPC from outside the node.

Once running, you can send RPC requests. For example, to retrieve the latest block:
```bash
curl -X POST --header 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":1}' http://localhost:3001/evm
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
restart: unless-stopped
build: .
ports:
- "3001:3001"
- "4000-4010:4000-4010"
volumes:
- hl-data:/home/hluser/hl/data
Expand Down