Update manual for altona (#1251)
This commit is contained in:
parent
3c19f5f5f9
commit
f1570cd4c3
|
@ -4,6 +4,7 @@
|
|||
- [Become a Validator](./validator.md)
|
||||
- [Installation](./install.md)
|
||||
- [Command-line Options](./cli.md)
|
||||
- [API](./api.md)
|
||||
- [Advanced Usage for Developers](./advanced.md)
|
||||
- [FAQs](./faq.md)
|
||||
- [Contribute](./contribute.md)
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
NBC exposes API:s for querying the state of the application at runtime.
|
||||
|
||||
:note: Where applicable, this API mimics https://github.com/ethereum/eth2.0-APIs with the exception that JSON-RPC is used instead of http rest - method names, parameters and results are equivalent except for the encoding / access method.
|
||||
|
||||
## Introduction
|
||||
|
||||
The NBC API is implemented using JSON-RPC 2.0. To query it, you can use a JSON-RPC library in the language of your choice, or a tool like `curl` to access it from the command line. A tool like [jq](https://stedolan.github.io/jq/) is helpful to pretty-print the responses.
|
||||
|
||||
```
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"peers","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
|
||||
```
|
||||
|
||||
Before you can access the API, make sure it's enabled using the RPC flag (`beacon_node --rpc`):
|
||||
|
||||
```
|
||||
--rpc Enable the JSON-RPC server.
|
||||
--rpc-port HTTP port for the JSON-RPC service.
|
||||
--rpc-address Listening address of the RPC server.
|
||||
```
|
||||
|
||||
## Beacon Node API
|
||||
|
||||
### getBeaconHead
|
||||
|
||||
The latest head slot, as chosen by the latest fork choice.
|
||||
|
||||
```
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"getBeaconHead","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
|
||||
```
|
||||
|
||||
### getChainHead
|
||||
|
||||
Show chain head information, including head, justified and finalized checkpoints.
|
||||
|
||||
```
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"getChainHead","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
|
||||
```
|
||||
|
||||
### getSyncing
|
||||
|
||||
### getBeaconBlock
|
||||
|
||||
### getBeaconState
|
||||
|
||||
### getNetworkPeerId
|
||||
|
||||
### getNetworkPeers
|
||||
|
||||
### getNetworkEnr
|
||||
|
||||
```
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"getNetworkEnr","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
|
||||
```
|
||||
|
||||
## Valdiator API
|
||||
|
||||
## Administrative / Debug API
|
||||
|
||||
### getNodeVersion
|
||||
|
||||
Show version of the software
|
||||
|
||||
```
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"getNodeVersion","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
|
||||
```
|
||||
|
||||
### getSpecPreset
|
||||
|
||||
Show spec constants in use.
|
||||
|
||||
```
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"getSpecPreset","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
|
||||
```
|
||||
|
||||
### peers
|
||||
|
||||
Show a list of peers that the beacon node is connected to.
|
||||
|
||||
```
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"peers","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
|
||||
```
|
|
@ -1,6 +1,6 @@
|
|||
# Command-line Options
|
||||
|
||||
You can run your customized beacon node using the beacon_node executable. The available options are shown below.
|
||||
You can run your customized beacon node using the `beacon_node` executable. The available options are shown below - you can also run `beacon_node --help` for a reminder.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
|
|
@ -24,3 +24,12 @@ It is obvious that you must have enough computing power or dedicated hardware in
|
|||
In a sentence, Nimbus is an Ethereum 1.0 & 2.0 Client for Resource-Restricted Devices.
|
||||
|
||||
It is open sourced at [github.com/status-im/nimbus](github.com/status-im/nimbus). Development progress and updates can be viewed at the [Nimbus blog](https://our.status.im/tag/nimbus/).
|
||||
|
||||
## Why are metrics not working?
|
||||
|
||||
Metrics are currently implemented using a HTTP server that hasn't been hardened sufficiently that it can be exposed as a public endpoint - it must thus be enabled specifically during build:
|
||||
|
||||
```
|
||||
make NIMFLAGS="-d:insecure"
|
||||
beacon_node --metrics ...
|
||||
```
|
||||
|
|
|
@ -15,9 +15,10 @@ In this book, we will cover:
|
|||
2. How to [become a validator](./validator.md) in Ethereum 2.0 as a user.
|
||||
3. [Installation steps](./install.md) for nimbus beacon chain.
|
||||
4. [CLI](./cli.md) for running your customized nimbus beacon node.
|
||||
5. [Advanced usage](./advanced.md) for developers.
|
||||
6. Common [questions and answers](./faq.md) to satisfy your curiosity.
|
||||
7. How to [contribute](./contribute.md) to this book.
|
||||
5. [API](./api.md) for monitoring your node through `http`.
|
||||
6. [Advanced usage](./advanced.md) for developers.
|
||||
7. Common [questions and answers](./faq.md) to satisfy your curiosity.
|
||||
8. How to [contribute](./contribute.md) to this book.
|
||||
|
||||
Feel free to give us feedback on how to improve as well as contribute to our book on github. :)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ To become a validator, you have to first connect to a testnet, deposit your Ethe
|
|||
|
||||
Though Nimbus can connect to any of the testnets published in the [eth2-clients/eth2-testnets repo](https://github.com/eth2-clients/eth2-testnets/tree/master/nimbus), below are the recommended ones:
|
||||
|
||||
- Public Testnet: [witti](https://github.com/goerli/witti) ([explorer](https://witti.beaconcha.in))
|
||||
- Public Testnet: [altona](https://github.com/goerli/altona) ([explorer](https://altona.beaconcha.in))
|
||||
- Local Testnet: testnet0 (currently not available)
|
||||
|
||||
## Connecting to Testnets
|
||||
|
@ -18,9 +18,9 @@ Before we start, we have to obtain 32 Ethers on the Goerli testnet. Then, we can
|
|||
3. Post your account address on a social media platform (Twitter or Facebook). Copy the url to the post.
|
||||
4. Paste your post url on the [Goerli faucet](https://faucet.goerli.mudit.blog/) and select `Give me Ether > 37.5 Ethers` from the top right cornor of the page.
|
||||
5. Wait for a few seconds and return to your MetaMask wallet to check if you have successfully received.
|
||||
6. Once the [prerequisites](./install.md) are installed, you can connect to the witti testnet with the following commands: <br>
|
||||
6. Once the [prerequisites](./install.md) are installed, you can connect to the altona testnet with the following commands: <br>
|
||||
|
||||
- Change `witti` to `testnet0` to connect to testnet0.
|
||||
- Change `altona` to `testnet0` to connect to testnet0.
|
||||
- **_Remember to replace `make` with `mingw32-make` if using Windows._**
|
||||
|
||||
```bash
|
||||
|
@ -29,8 +29,8 @@ cd nim-beacon-chain
|
|||
git checkout devel
|
||||
git pull
|
||||
make update
|
||||
make witti # This will build Nimbus and all other dependencies
|
||||
# and connect you to witti
|
||||
make altona # This will build Nimbus and all other dependencies
|
||||
# and connect you to altona
|
||||
```
|
||||
|
||||
<img src="./img/connect_testnet.PNG" alt="" style="margin: 0 40 0 40"/>
|
||||
|
@ -49,14 +49,14 @@ make witti # This will build Nimbus and all other dependencies
|
|||
|
||||
<img src="./img/success.PNG" alt="" style="margin: 0 40 0 40"/>
|
||||
|
||||
You can also get a brief estimate of the time remaining until your network gets synced by comparing the output `epoch` value and the one in the blockchain explorer (the [witti explorer](https://witti.beaconcha.in) for example).
|
||||
You can also get a brief estimate of the time remaining until your network gets synced by comparing the output `epoch` value and the one in the blockchain explorer (the [altona explorer](https://altona.beaconcha.in) for example).
|
||||
|
||||
## Trouble Shooting
|
||||
## Troubleshooting
|
||||
|
||||
1. The directory that stores the blockchain data of the testnet is `build/data/shared_witti_0` (replace `witti` with other testnet names). Delete this folder if you want to start over. For example, you can start over with a fresh storage if you entered a wrong private key.
|
||||
1. The directory that stores the blockchain data of the testnet is `build/data/shared_altona_0` (replace `altona` with other testnet names). Delete this folder if you want to start over. For example, you can start over with a fresh storage if you entered a wrong private key.
|
||||
|
||||
2. Currently, you have to switch to the devel branch in order to run the validator node successfully.
|
||||
|
||||
3. Everytime you want to update your node to the latest version, run `git pull`, `make update`, and then `make witti`.
|
||||
3. Everytime you want to update your node to the latest version, run `git pull`, `make update`, and then `make altona`.
|
||||
|
||||
4. If `make update` has been running for too long, you can use `make update V=1` or `make update V=2` for verbose output.
|
||||
|
|
Loading…
Reference in New Issue