2023-05-02 21:13:48 +00:00
# Pocket Fixturenet
2023-05-26 14:37:59 +00:00
Instructions for deploying a local single-node Pocket chain alongside a geth + lighthouse blockchain "fixturenet" for development and testing purposes using Stack Orchestrator.
2023-05-02 21:13:48 +00:00
2023-05-26 14:37:59 +00:00
## 1. Clone required repositories
2023-05-02 21:13:48 +00:00
```
$ laconic-so --stack fixturenet-pocket setup-repositories
```
2023-05-26 14:37:59 +00:00
## 2. Build the stack's containers
2023-05-02 21:13:48 +00:00
```
$ laconic-so --stack fixturenet-pocket build-containers
```
2023-05-26 14:37:59 +00:00
## 3. Deploy the stack
2023-05-02 21:13:48 +00:00
```
$ laconic-so --stack fixturenet-pocket deploy up
```
It may take up to 10 minutes for the Eth Fixturenet to fully come online and start producing blocks.
2023-05-26 14:37:59 +00:00
## 4. Check status
2023-05-02 21:13:48 +00:00
**Eth Fixturenet:**
```
$ laconic-so --stack fixturenet-pocket deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
2023-05-26 14:37:59 +00:00
```
Response:
```
2023-05-02 21:13:48 +00:00
Waiting for geth to generate DAG.... done
Waiting for beacon phase0.... done
Waiting for beacon altair.... done
Waiting for beacon bellatrix pre-merge.... done
Waiting for beacon bellatrix merge.... done
```
2023-05-26 14:37:59 +00:00
2023-05-02 21:13:48 +00:00
**Pocket node:**
```
$ laconic-so --stack fixturenet-pocket deploy exec pocket "pocket query height"
2023-05-26 14:37:59 +00:00
```
Response:
```
2023-05-02 21:13:48 +00:00
2023/04/20 08:07:46 Initializing Pocket Datadir
2023/04/20 08:07:46 datadir = /home/app/.pocket
http://localhost:8081/v1/query/height
{
"height": 4
}
```
2023-05-26 14:37:59 +00:00
or see the full logs:
2023-05-02 21:13:48 +00:00
```
$ laconic-so --stack fixturenet-pocket deploy logs pocket
```
2023-05-26 14:37:59 +00:00
## 5. Send a relay request to Pocket node
2023-05-02 21:13:48 +00:00
The Pocket node serves relay requests at `http://localhost:8081/v1/client/sim`
2023-05-26 14:37:59 +00:00
Example request:
2023-05-02 21:13:48 +00:00
```
$ curl -X POST --data '{"relay_network_id":"0021","payload":{"data":"{\"jsonrpc\": \"2.0\",\"id\": 1,\"method\": \"eth_blockNumber\",\"params\": []}","method":"POST","path":"","headers":{}}}' http://localhost:8081/v1/client/sim
```
2023-05-26 14:37:59 +00:00
Response:
2023-05-02 21:13:48 +00:00
```
"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x6fe\"}\n"
```