mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-03 02:05:03 +00:00
Remove getSpecPreset() because of crash and add missing calls into api.md
This commit is contained in:
parent
599e56c820
commit
7731109320
@ -64,24 +64,6 @@ proc installNimbusApiHandlers*(rpcServer: RpcServer, node: BeaconNode) =
|
|||||||
rpcServer.rpc("getNodeVersion") do () -> string:
|
rpcServer.rpc("getNodeVersion") do () -> string:
|
||||||
return "Nimbus/" & fullVersionStr
|
return "Nimbus/" & fullVersionStr
|
||||||
|
|
||||||
rpcServer.rpc("getSpecPreset") do () -> JsonNode:
|
|
||||||
var res = newJObject()
|
|
||||||
genStmtList:
|
|
||||||
for presetValue in PresetValue:
|
|
||||||
if presetValue notin ignoredValues + runtimeValues:
|
|
||||||
let
|
|
||||||
settingSym = ident($presetValue)
|
|
||||||
settingKey = newLit(toLowerAscii($presetValue))
|
|
||||||
let f = quote do:
|
|
||||||
res[`settingKey`] = %(presets.`settingSym`)
|
|
||||||
yield f
|
|
||||||
|
|
||||||
for field, value in fieldPairs(node.config.runtimePreset):
|
|
||||||
res[field] = when value isnot Version: %value
|
|
||||||
else: %value.toUInt64
|
|
||||||
|
|
||||||
return res
|
|
||||||
|
|
||||||
rpcServer.rpc("peers") do () -> JsonNode:
|
rpcServer.rpc("peers") do () -> JsonNode:
|
||||||
var res = newJObject()
|
var res = newJObject()
|
||||||
var peers = newJArray()
|
var peers = newJArray()
|
||||||
|
@ -185,6 +185,68 @@ curl -d '{"jsonrpc":"2.0","method":"get_v1_debug_beacon_states_stateId","params"
|
|||||||
|
|
||||||
## Nimbus extensions
|
## Nimbus extensions
|
||||||
|
|
||||||
|
### 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
|
||||||
|
```
|
||||||
|
|
||||||
|
### getNodeVersion
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -d '{"jsonrpc":"2.0","method":"getNodeVersion","params":[],"id":1}' -H 'Content-Type: application/json' localhost:7001 -s | jq
|
||||||
|
```
|
||||||
|
|
||||||
|
### getSpecPreset
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -d '{"jsonrpc":"2.0","method":"getSpecPreset","params":[],"id":1}' -H 'Content-Type: application/json' localhost:7001 -s | jq
|
||||||
|
```
|
||||||
|
|
||||||
|
### peers
|
||||||
|
|
||||||
|
Show a list of peers in PeerPool.
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -d '{"jsonrpc":"2.0","method":"peers","params":[],"id":1}' -H 'Content-Type: application/json' localhost:7001 -s | jq
|
||||||
|
```
|
||||||
|
|
||||||
|
### getSyncing
|
||||||
|
|
||||||
|
Shows current state of forward syncing manager.
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -d '{"jsonrpc":"2.0","method":"getSyncing","params":[],"id":1}' -H 'Content-Type: application/json' localhost:7001 -s | jq
|
||||||
|
```
|
||||||
|
|
||||||
|
### getNetworkPeerId
|
||||||
|
|
||||||
|
Shows current node's libp2p peer identifier (PeerID).
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -d '{"jsonrpc":"2.0","method":"getNetworkPeerId","params":[],"id":1}' -H 'Content-Type: application/json' localhost:7001 -s | jq
|
||||||
|
```
|
||||||
|
|
||||||
|
### getNetworkPeers
|
||||||
|
|
||||||
|
Shows list of available PeerIDs in PeerPool.
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -d '{"jsonrpc":"2.0","method":"getNetworkPeers","params":[],"id":1}' -H 'Content-Type: application/json' localhost:7001 -s | jq
|
||||||
|
```
|
||||||
|
|
||||||
|
### getNetworkEnr
|
||||||
|
|
||||||
### setLogLevel
|
### setLogLevel
|
||||||
|
|
||||||
Set the current logging level dynamically: TRACE, DEBUG, INFO, NOTICE, WARN, ERROR or FATAL
|
Set the current logging level dynamically: TRACE, DEBUG, INFO, NOTICE, WARN, ERROR or FATAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user