Update readme

This commit is contained in:
Nabarun 2024-05-23 18:03:03 +05:30
parent 092c19c337
commit e75c36ab1d
2 changed files with 19 additions and 20 deletions

View File

@ -1,6 +1,6 @@
# lotus-node # lotus-node
Instructions for deploying a Lotus snap-synced node (for both mainnet and calibnet ) Instructions for deploying a Lotus snap-synced node (for both mainnet and calibnet)
## Prerequisite ## Prerequisite
@ -24,7 +24,7 @@ $ laconic-so fetch-stack git.vdb.to/cerc-io/lotus-stack
$ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node setup-repositories $ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node setup-repositories
``` ```
## Build the fixturenet-eth containers ## Build the Lotus containers
```bash ```bash
$ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node build-containers $ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node build-containers
@ -39,11 +39,11 @@ $ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node dep
## Setup config ## Setup config
Set filepath of downloaded snapshot in config.env Set file path of downloaded snapshot in config.env
Inside deployment directory, open the `config.env` file and set following env variables: Inside deployment directory, open the `config.env` file and set following env variables:
```bash ```bash
# Filepath of downloaded snapshot # File path of downloaded snapshot
CERC_LOTUS_SNAPSHOT_PATH=/path-to-file/snapshot CERC_LOTUS_SNAPSHOT_PATH=/path-to-file/snapshot
``` ```
@ -59,20 +59,7 @@ $ laconic-so deployment --dir lotus-node-deployment up
``` ```
docker ps | grep lotus docker ps | grep lotus
``` ```
NOTE: Starting node for the first time takes time (~20 mins) as it downloads latest snapshot and imports it NOTE: Starting node for the first time takes time (~20 mins) as it imports the snapshot
- Get latest block using CURL
```
curl -X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": 1
}' \
http://localhost:1234/rpc/v1
```
- To check whether Lotus node has synced till head - To check whether Lotus node has synced till head
```bash ```bash
@ -85,6 +72,18 @@ $ laconic-so deployment --dir lotus-node-deployment up
# Done! # Done!
``` ```
When the lotus sync wait command shows done you are fully synced with the chain When the lotus sync wait command shows done you are fully synced with the chain
- Get latest block using CURL
```
curl -X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": 1
}' \
http://localhost:1234/rpc/v1
```
## Clean up ## Clean up

View File

@ -2,7 +2,7 @@ version: "1.0"
name: lotus-node name: lotus-node
description: "Lotus node stack" description: "Lotus node stack"
repos: repos:
# TODO: Use a release version tag to match modified Dockerfile that is replaced in container build # TODO: Use a release version tag
- git.vdb.to/cerc-io/lotus - git.vdb.to/cerc-io/lotus
containers: containers:
- cerc/lotus-node - cerc/lotus-node