Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Feat: add 'params' to every relaychain RPC requests #2053

Closed
bLd75 opened this issue Jan 3, 2023 · 2 comments
Closed

Feat: add 'params' to every relaychain RPC requests #2053

bLd75 opened this issue Jan 3, 2023 · 2 comments
Assignees

Comments

@bLd75
Copy link

bLd75 commented Jan 3, 2023

Issue

The relay-chain-rpc-url option works fine with any type of relay chain RPC but is not accepted by smoldot to sync with a light client.
[json-rpc-polkadot] Refused malformed JSON-RPC request: missing field params at line 1 column 59

This is because the params field is not sent by client when no param is required (like here on the initial subscribeNewHeads request).
{"jsonrpc":"2.0","id":0,"method":"chain_subscribeNewHeads"}

Adding an empty params field would allow syncing the relay to a light client.
"params":{}

Steps to reproduce

  • clone the smoldot repo / have rust & npm installed
  • start the light client/Websocket app: cd bin/wasm-node/javascript then npm install; npm start
  • start a para node: polkadot-parachain --chain statemine --relay-chain-rpc-url ws://127.0.0.1:9944/polkadot
@bkchr
Copy link
Member

bkchr commented Jan 3, 2023

CC @skunert

@skunert
Copy link
Contributor

skunert commented Feb 13, 2023

Fixed by smol-dot/smoldot#13

@skunert skunert closed this as completed Feb 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants