Skip to main content

Questions tagged [rpc]

Questions relating to custom RPC implementations or using existing RPCs to make calls to a Substrate node.

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
2 answers
202 views

How to implement `into_rpc` method in jsonrpsee's rpc macro

I'm trying to add custom RPC to Substrate node template. As explained in the jsonrpsee's proc_macro doc here, I define BalancesApi trait where #[rpc(server)] attribute added, and implement ...
Shunsuke's user avatar
  • 432
2 votes
0 answers
86 views

Fuzzing Polkadot produces Invalid Signature after chaos is injected

I'm using Polkadot version 0.9.37-08b1c09ca46, across 4 Nodes - Alice, Bob, Charlie, Dave, in a local testnet environment. I have a period of network chaos applied, and then moments of stabilized '...
David Searle's user avatar
2 votes
0 answers
96 views

RPC apis & node entry-points

I am trying to identify all the possible entry points that an extrinsic can reach the node. From my understanding so far the following rpc endpoints are the only ones that can add transactions to the ...
thduke's user avatar
  • 21
2 votes
0 answers
45 views

Load balancing across RPCs

I’m looking for resources on how to implement a front end load balancing mechanism for splitting traffic across RPCs. I know polkadot.js.org has something running that does this and I think it might ...
sweden_chat's user avatar
1 vote
0 answers
17 views

Rpc call showing empty in evm integrated chain?

i have been working on polkadot layer 0 chain. i have integrated evm frontier on layer 0 chain and everything is working fine .when i try to call rpc (eth.getcode) it is showing empty . can some ...
Karanvir Singh's user avatar
1 vote
2 answers
37 views

What are the RPC endpoints that is usually unique to Substrate vs the unique to Polkadot nodes?

I used typegen to generate types for Substrate, Kusama and Polkadot networks. And I got the exact same types for the rpc endpoints (rpc methods). Is this normal? Should not be there some unique ...
Muhammad Altabba's user avatar
1 vote
0 answers
58 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
28 views

how to solve mismatched type error in substrate?

I have been integrating paritytech frontier(0.9.43) version with the substrate 0.9.43 version . while integrating when i added frontier changes in rpc.rs and service.rs file i am facing this error. ...
Karanvir Singh's user avatar
1 vote
0 answers
28 views

How to curl `ink!` contract storage?

I'm trying to use curl to query an ink contract's storage using the RPC of substrate. I've looked at the below question How do I call the RPC method `contractInfoOf` using curl? but it does not ...
goastler's user avatar
  • 579
1 vote
1 answer
63 views

Best way to automate extrinsic submissions for testing

I am developing a chain in substrate, and am trying to find the best way to run integration tests against certain sets of extrinsic submissions when the network is running in development mode. It's ...
Nate Armstrong's user avatar
1 vote
0 answers
28 views

RPC enabled? CLI configuration?

I need to determine whether RPCs are enabled in a OCW. I am thinking that I could check rpc_external and/or ws_external in sc_cli::commands::run_cmd but (1) is this the best way and (2) if it is, how ...
Robert La Ferla's user avatar
1 vote
0 answers
26 views

upgrade custom chain to 0.9.24, rpc-client/src/main.rs report "no `AuthorClient` in `author`"

report "no AuthorClient in author" in rpc-client/src/main.rs when i upgrade chain to 0.9.24 report "add dyn keyword before this trait" if i change to AuthorApiClient. does ...
Smith's user avatar
  • 141
1 vote
0 answers
65 views

Get System info in custom RPC call

Hello I would like to be able to call fn system_name(&self) -> RpcResult<String> { Ok(self.info.impl_name.clone()) } inside a custom rpc call our custom rpc call is implemented like ...
cibou's user avatar
  • 131
0 votes
0 answers
8 views

how to use Substrate RPC metrics in Grafana

I need to use substrate_rpc_calls_time, substrate_rpc_calls_started, substrate_rpc_calls_finished to show RPC metrics on Grafana dashboard. I added following section in my prometheus config file: { ...
Boleng's user avatar
  • 557
0 votes
0 answers
17 views

how to use substrate-rpc-client query storage

I am trying to use substrate-rpc-client for querying a storage item in our chain, the documentation is very sparse on how to go about this. just says client.storage(StorageKey(vec![]), Some(H256::...
Emmanuel Thomas's user avatar
0 votes
2 answers
36 views

How to declare a RPC endpoint in the node config?

The public-addr option allows to declare the node p2p endpoint, allowing to use DNS for example, or different port than the listen port if using docker port mapping. --public-addr <PUBLIC_ADDR>.....
Hugo Trentesaux's user avatar
0 votes
1 answer
41 views

Force bonding withdrawal period to 0 days

I run a local testnode using chopsticks and I want to unbond funds right after I bond them. What configuration I could use in chopsticks or RPC call I could make to make sure I can withdraw my funds ...
lvndry's user avatar
  • 101
0 votes
0 answers
40 views

Rpc methods not decorated

Goal I'm trying to decorate the rpc methods to be able to interact with api.tx. If anyone has faced this issue, what has helped you out? Issue I'm not able to access tx method inside of api, which I ...
Peter Kim's user avatar
0 votes
0 answers
48 views

Error querying evm rpc endpoint on a node run by Chopsticks

I'm trying to run a local node using Chopsticks and connect to it using Metamask, but when I make the request to the eth-rpc-adapter, it fails. Here are the steps I followed with the corresponding ...
magecnion's user avatar
  • 394
0 votes
0 answers
87 views

Connect a frontend application with a Substrate blockchain as a backend without using an RPC endpoint

I'd like to connect my frontend application (built on Rust) to be able to connect to my network without using any hardcoded endpoints to create a bottleneck for DDoS attacks. One possibility for this ...
Discardo's user avatar
  • 436
0 votes
0 answers
22 views

is the endpoint TransactionPaymentApi_query_info usable on current Westend testnet?

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
0 votes
0 answers
13 views

Does Substrate support custom node specific environment vars or flags

I have a pallet that should have access to a secp256k1::Keypair for signing messages. And I want to be able to start the node with either the secret_key string or a path to a key-file. Then have the ...
ambiguous omen's user avatar
0 votes
0 answers
25 views

Adding RPC node in private network without node authorization

I have set up a private network and it has node_authorization pallet included. I have added several validator nodes by using the node_authorization pallet as well_known nodes. Now I want to allow some ...
Faraz Ahmad's user avatar
0 votes
0 answers
39 views

Implementing FullDeps in Substrate rpc.rs using channels instead of Arcs

This is a standard implementation of FullDeps in the rpc.rs: // Full client dependencies. pub struct FullDeps<C, P, SC, B> { /// The client instance to use. pub client: Arc<C>, ...
Discardo's user avatar
  • 436
0 votes
0 answers
59 views

StakerStatus is not updating on my custom explorer

I have made a custom explorer of a substrate based blockchain, and when i am chilling the staker, its status is not updating to inactive on the custom explorer, is there any RPC call or any other way ...
Gagandeep Kaur's user avatar