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

Extrinsic RPC subscription events are capitalized #304

Closed
kratico opened this issue May 31, 2023 · 3 comments · Fixed by #412
Closed

Extrinsic RPC subscription events are capitalized #304

kratico opened this issue May 31, 2023 · 3 comments · Fixed by #412

Comments

@kratico
Copy link

kratico commented May 31, 2023

This is inconsistent with the Polkadot RPC

In Polkadot the ready, inBlock, finalized subscription event keys are not capitalized

image

Using chopsticks these event keys are Ready, InBlock, `Finalized

image

@xlc
Copy link
Member

xlc commented May 31, 2023

I will put this as "won't fix" for now until one of those happens:

  • Identify compatibility issue with existing tools due to this
  • OR some spec is created specifying what's the correct behaviour

@jsdw
Copy link
Contributor

jsdw commented Sep 25, 2023

There is no spec for these old methods, but Substrate nodes and now Smoldot will return the non-capitalised event names, so shouldn't chopsticks align with these?

A compatibility issue at present is with Subxt, which understands the smoldot/substrate based camelCase event names and fails for the uppercase names emitted by chopsticks (Rust being more strict on these sorts of things). We can patch Subxt to support this inconsistency, but it would be better for no inconsistency to exist at all imo :)

Side note: there is a spec for the new RPC methods, and the new version of this subscription will also use camelCase names: https://paritytech.github.io/json-rpc-interface-spec/api/transaction_unstable_submitAndWatch.html

@xlc
Copy link
Member

xlc commented Sep 25, 2023

we can fix this if it is causing trouble for subxt

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 a pull request may close this issue.

3 participants