paritytech / paritytech/polkadot-cli

Adding chain via light-client times out

Open
#98 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10
Forks
2
Avg merge
12h 35m
Merged PRs (30d)
4

Description

Was playing with the CLI and saw the timeout being hit a few times before it worked in a later attempt.

dot chain add polkadot-asset-hub --light-client
Connecting to polkadot-asset-hub...
[smoldot] Smoldot v2.0.40
[smoldot] Chain initialization complete for polkadot. Name: "Polkadot". Genesis hash: 0x91b1…90c3. Chain specification starting at: 0x4f19…b7be (#29624271)
[smoldot] Parachain initialization complete for asset-hub-polkadot. Name: "Polkadot Asset Hub". Genesis hash: 0x68d5…de2f. Relay chain: polkadot (id: 1000)
Fetching metadata...
[json-rpc-asset-hub-polkadot] The JSON-RPC client has just called a JSON-RPC function from the legacy JSON-RPC API (state_getMetadata). Legacy JSON-RPC functions have loose semantics and cannot be properly implemented on a light client. You are encouraged to use the new JSON-RPC API <https://github.com/paritytech/json-rpc-interface-spec/> instead. The legacy JSON-RPC API functions will be deprecated and removed in the distant future.
[runtime-polkadot] Successfully compiled runtime. Spec version: 2000001. Size of `:code`: 1.7 MiB.
[runtime-polkadot] Finalized block runtime ready. Spec version: 2000007. Size of `:code`: 1.7 MiB.
[smoldot] Shutting down chain asset-hub-polkadot
Error: Timed out fetching metadata for "polkadot-asset-hub" after 15s. Check that the RPC endpoint is correct and reachable.

Probably as simple as increasing the timeout a bit.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the dot chain add polkadot-asset-hub --light-client command and tracing where metadata fetching applies the 15-second timeout. Confirm the timeout is the failure point and define done as successful initialization when metadata takes longer than 15 seconds, with the command no longer reporting a timeout prematurely.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.