rpc-nodes/bsc/bsc.md

42 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2022-03-03 10:14:26 +01:00
# BSC node
## Requirements for Ethereum network
* memory: 48Gb
2022-03-03 10:33:37 +01:00
* disk: 3Tb SSD (require periodically prune state) - the size increases quickly, so you need to periodically check the remaining space.
2022-03-03 10:14:26 +01:00
## Installation
Set in the `.env` file:
* `DOMAIN=` - the domain name to be used in traefik;
* `BSC_TAG=` - Use latest stable version from https://github.com/bnb-chain/bsc/tags.
You can also set a list of allowed IP addresses there and addresses to treat as local. Rename `example.env` to `.env`:
```
mv example.env .env
```
2022-03-12 07:23:27 +01:00
Start node (If you do not use traefik, specify the compose file with the `-f docker-compose.no-proxy.yml`):
2022-03-03 10:14:26 +01:00
```bash
docker-compose build
docker-compose up -d bsc
```
2022-03-12 07:39:38 +01:00
To see the sync status run:
`curl -X POST --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_syncing"}' -H 'Content-Type: application/json' -s https://${DOMAIN}/bsc-http/`
* `currentBlock` - your node current height;
* `highestBlock` - network height.
2022-03-03 10:14:26 +01:00
## Upgrade
2022-03-12 07:23:27 +01:00
Periodically check for new versions. If there is a release, then you need to update the tag (`BSC_TAG`) in the environment file.
2022-03-03 10:14:26 +01:00
```bash
docker-compose build
docker-compose up -d bsc
```
## Pruning
2022-03-03 10:33:37 +01:00
Use it if the size is approaching 2.6TB. At least 150 GB must be free for successful pruning.
2022-03-03 10:14:26 +01:00
```bash
docker-compose down
docker-compose up bsc-pruning
docker-compose down
docker-compose up -d bsc
```