Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Use WS by default instead of HTTP #954

Merged
merged 1 commit into from
May 11, 2023
Merged

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented May 11, 2023

After the substrate patch to remove the RPC HTTP port, trying to fetch the metadata directly from the runtime will fail.

This is because on the HTTP port asking for Metadata_versions will return

Err(Transport(HTTP error: error trying to connect: tcp connect error: Connection refused (os error 111)))

Reproduce

  1. Start substrate from the latest master
  2. Fetch the unstable metadata via CLI
cargo run --release -p subxt-cli -- metadata  --version unstable --format json

Error:
   0: Other error: The node can only return version 14 metadata but you've asked for something else

Location:
   cli/src/utils.rs:67

However, the Substrate node has access and exposes the V15 under the u32::max.

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv requested a review from a team as a code owner May 11, 2023 12:41
@lexnv lexnv self-assigned this May 11, 2023
@niklasad1 niklasad1 merged commit bb39415 into master May 11, 2023
@niklasad1 niklasad1 deleted the lexnv/default_ws_metadata branch May 11, 2023 14:02
@jsdw jsdw mentioned this pull request Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants