Questions tagged [rpc]
Questions relating to custom RPC implementations or using existing RPCs to make calls to a Substrate node.
23
questions with no upvoted or accepted answers
5
votes
1
answer
106
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 ...
2
votes
0
answers
31
views
RPC node is rebooting itself from time to time
Node is working correct but there is a moment that shows the following error messages and reboots:
2023-10-12 19:39:26 Accepting new connection 170/10000
2023-10-12 19:39:26 Accepting new connection ...
2
votes
0
answers
74
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 '...
2
votes
0
answers
68
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 ...
2
votes
1
answer
78
views
exposing RPC/ws publicaly
I want to expose an RPC/WS endpoints publicly. What mesures should I take into consideration?
Should I just expose RPC/WS using substrate options --unsafe-rpc-external --unsafe-ws-external?
But as I ...
1
vote
0
answers
36
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 ...
1
vote
0
answers
23
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. ...
1
vote
0
answers
18
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 ...
1
vote
1
answer
134
views
Parachain RPC errors since Polkadot 0.9.36 client upgrade
Astar uplifted to Polkadot 0.9.36 in v4.47.1
Client upgrade introduces 2 new errors on RPC nodes, both WS and HTTP.
HTTP: lots of these errors - seems high impact
HTTP serve connection failed hyper::...
1
vote
1
answer
45
views
Iterate storage maps inside an offchain worker
I need to iterate over the following double map inside an offchain worker:
How can I access this map outside the pallet assets? Can I use an RPC method to get all the values for that double map ...
1
vote
1
answer
52
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 ...
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 ...
1
vote
0
answers
24
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 ...
1
vote
0
answers
59
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 ...
1
vote
0
answers
36
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 ...
0
votes
0
answers
9
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 ...
0
votes
0
answers
13
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 ...
0
votes
0
answers
38
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>,
...
0
votes
1
answer
113
views
Custom RPC sized array parameters
I have custom RPC, which looks like so
#[rpc(client, server)]
pub trait SomeRpcApi {
#[method(name = "some_submitData")]
async fn submit_data(
&self,
id: u64,
...
0
votes
0
answers
58
views
--listen-addr /ip4/0.0.0.0/tcp/9944/ws breaks polkadot.js
I am trying to get my westend boot nodes to also serve polkadot.js
Following https://github.com/paritytech/polkadot/issues/6208, there is a recommendation [requirement?] to run polkadot with Node was ...
0
votes
0
answers
37
views
Property 'x' does not exist on type 'DecoratedRpc<"promise", RpcInterface>'
I have decorated custom RPC types for methods for polkadot-js-apps. I added them in ./packages/apps-config/src/api/spec/<chain-name>.ts, (then i also needed to add it into typesBundle.js, and ...
0
votes
0
answers
55
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 ...
0
votes
1
answer
113
views
RPC connection errors(rate limits?)
How to check the rate limits of concrete RPC?
It works until some time and then starts throwing an error. I suspect it's the rate limits
I connect to the remote node. For example wss://acala-rpc....