Skip to main content

Questions tagged [runtime-api]

The tag has no usage guidance.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
2 answers
130 views

Runtime api not available just after client creation? Exported method is not found

I am trying to incorporate benchmark overhead command to our parachain. The issue i have is that runtime api methods are not available right away after client is created. https://github.com/mangata-...
Mateusz Nowakowski's user avatar
4 votes
0 answers
98 views

Polkadot JS API: Is is possible to define a custom runtime API?

Polkadot JS Api is aware of a lot of common runtime apis in the Substrate ecosystem. The docs contain a complete list of supported runtime apis. One that is missing is the PoW Difficulty API. Because ...
JoshOrndorff's user avatar
  • 1,201
4 votes
0 answers
177 views

api.call.transactionPaymentApi.queryInfo returns partial fee 0

With the update to the Polkadot-JS api depreciating rpc.payment.queryInfo in favor for api.call.transactionPaymentApi.queryInfo I am currently trying to migrate my code over. However I used to get the ...
cooper jones's user avatar
3 votes
0 answers
48 views

Integrating External Data into Blockchain: Can Validators Fetch and Incorporate API-sourced Data?

Is it feasible for validators to retrieve information from external APIs, particularly news data, and seamlessly incorporate it into the blockchain?
Ajit's user avatar
  • 827
3 votes
0 answers
80 views

Ways to mock client + custom runtime api from client side

I have some code in a Substrate client that needs to call one of my runtime apis. I'd like an easy way to mock the client and custom runtime api functions to check that they're called. Is there an ...
Justin Frevert's user avatar
2 votes
0 answers
40 views

Steps to handle renaming runtime api + upgrade

I'm considering a large refactor in our substrate codebase which would involve moving large chunks of code around. This includes a runtime api. In it's destined place, the runtime api's name(both its ...
Justin Frevert's user avatar
1 vote
1 answer
81 views

payment_queryInfo returning Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed

I was trying to query payment_queryInfo on current Westend testnet, and the following payload used to works at spec 9430. { "jsonrpc": "2.0", "method": "...
johnhckuo's user avatar
  • 123
1 vote
0 answers
56 views

How are the node threads and tasks managed?

When we run a node, we start a bunch of tasks using task_manager.spawn_handle() or task_manager.spawn_essential_handle(). From my understanding, those spawn new Tokio tasks. If my computer has ...
Timothée Delabrouille's user avatar
1 vote
0 answers
20 views

Why can't runtime APIs have default implementations?

I encountered a compile error error: A runtime API function cannot have a default implementation! when attempting to define a default implementation for a runtime API. Why is this not possible?
liamaharon's user avatar
1 vote
0 answers
68 views

Use state call to query from custom Runtime Api, Balance in frontend is not equal to Balance in Runtime

Background Our front end use state call to query custom RuntimeApi of our solo chain. We try to use state call to replace custom rpcs. Definition Balance is our chain is u128. RuntimeApi Definition ...
ironman_ch_parami's user avatar
1 vote
0 answers
55 views

Why isn't the state root checked on the client side?

Substrate requires that every header has a state root. (See Trait Header.) When the runtime executes a block authored by a peer, it is assumed that the runtime will check the state root from the ...
JoshOrndorff's user avatar
  • 1,201
0 votes
1 answer
23 views

How to declare runtime api?

I have a runtime constant declared in a pallet like this: /// How much space there is on the network. #[pallet::constant] type TotalSpacePledged: Get<u128>; Source code ...
abhi3700's user avatar
  • 131
0 votes
0 answers
19 views

Why are any of the `RuntimeApiSubsystemClient` trait methods marked `async` when its not needed?

The trait RuntimeApiSubsystemClient and its implementation DefaultSubsystemClient (https://github.com/paritytech/polkadot-sdk/blob/c421b87978404954dec4555895d50ef028b73cf0/polkadot/node/subsystem-...
Mathis Wellmann's user avatar
0 votes
0 answers
15 views

Standalone Runtime

I want to use Substrate Runtime in my application without consensus layer (outer node). I only want to create extrinsics in memory and pass them to runtime (or FRAME) of my custom pallets to proceed. ...
Saman H. Pasha's user avatar