Skip to content

Commit

Permalink
Fix state network RPC methods in interop docs (#1922)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeme committed Dec 4, 2023
1 parent 283271a commit 443e7c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fluffy/docs/the_fluffy_book/docs/protocol-interop-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ Testing the Portal wire protocol messages:

```bash
# Ping / Pong
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_state_ping","params":["enr:<base64 encoding of ENR>"]}' http://localhost:8545 | jq
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_statePing","params":["enr:<base64 encoding of ENR>"]}' http://localhost:8545 | jq

# FindNode / Nodes
# Extra parameter is an array of requested logarithmic distances
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_state_findNodes","params":["enr:<base64 encoding of ENR>", [254, 255, 256]]}' http://localhost:8545 | jq
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_stateFindNodes","params":["enr:<base64 encoding of ENR>", [254, 255, 256]]}' http://localhost:8545 | jq

# FindContent / Content
# A request with an invalid content key will not receive a response
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_state_findContent","params":["enr:<base64 encoding of ENR>", "02829bd824b016326a401d083b33d092293333a830d1c390624d3bd4e409a61a858e5dcc5517729a9170d014a6c96530d64dd8621d"]}' http://localhost:8545 | jq
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_stateFindContent","params":["enr:<base64 encoding of ENR>", "02829bd824b016326a401d083b33d092293333a830d1c390624d3bd4e409a61a858e5dcc5517729a9170d014a6c96530d64dd8621d"]}' http://localhost:8545 | jq

# Read out the Portal state network routing table contents
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_state_routingTableInfo","params":[]}' http://localhost:8545 | jq
curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"1","method":"portal_stateRoutingTableInfo","params":[]}' http://localhost:8545 | jq
```

> The `portal_state_` prefix can be replaced for testing other networks such as
Expand Down

0 comments on commit 443e7c4

Please sign in to comment.