Questions tagged [client]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

How to create different accounts in Substrate?

I would like to build a blockchain with Substrate where people can trade with products. They can log in in web, where they can see only their balances and products.I created private/public keypairs to ...
Vamosz's user avatar
  • 55
2 votes
2 answers

Is it possible to turn a Frontier node into an Ethereum client?

Suppose I start with a Frontier-based template node and want it to sync with a Geth full node, as if it was an Ethereum execution client. What are the minimal set of changes necessary to make this ...
afm's user avatar
  • 355
3 votes
1 answer

How to avoid double work when building with srtool

I'm integrating srtool into my CI build. As a result of the build, I aim to obtain the client and the runtime. I can compile the runtime with srtool action and run cargo build to get the client. But ...
Maksim Ramanenkau's user avatar
7 votes
0 answers

Why do clients have to hardcode the extra types in the registry?

Context: I'm experimenting with an H160-address based substrate and I'm doing it from scratch (it's not a moon* or frontier template fork). It's reasonably trivial to make changes to the substrate ...
Farcaller's user avatar
  • 148
2 votes
0 answers

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
2 votes
1 answer

What is happening between `Is collating: yes` and ` Local node identity is:...` or why is it taking so long time to restart syncing of a crashed node?

I'm trying to sync a parachain node from scratch with a client upgraded to polkadot0.9.37 I have experienced crashes and restarts after a few hours and with every subsequent restart it seems to take ...
Simson's user avatar
  • 1,166
1 vote
1 answer

When should an RPC be unsafe?

When making a new RPC/runtime-api endpoint, what criteria should you have in mind regarding making it safe/unsafe? For example, assume that a UI wants to fetch a large amount of data (a lot of keys in ...
kianenigma's user avatar
  • 2,719
3 votes
0 answers

Error importing blocks after upgrading to v0.9.32

After upgrading the node to v0.9.32 I started seeing this error message: 2022-11-11 14:03:44 💔 Error importing block 0x2062a73f1dee2fd35ad6ac25c641b08bf94cf6390b9fc7a8480d7b8ea9412eab: consensus ...
Jorrin Bruns's user avatar
1 vote
1 answer

How i implement Debug for trait object [closed]

I find out 1 piece of code in substrate pub struct IsValidator(Box<dyn Fn() -> bool + Send + Sync>); How can I implement Debug for IsValidator Struct
CocDap's user avatar
  • 658
5 votes
2 answers

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.
Mateusz Nowakowski's user avatar
3 votes
0 answers

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
3 votes
1 answer

RPC node encounter `Cannot create a runtime error=Other(\"runtime requires function imports which are not present on the host:` after upgrade

I got a problem with upgrading my chain I've upgraded my chain from version A (Client+runtime) to version B (Client+runtime). I remove some host functions in client version B because runtime version B ...
Daniel Lam's user avatar
8 votes
3 answers

Node startup message missing after upgrade to Polkadot v0.9.23

After upgrading to Polkadot v0.9.23 from v0.9.16, I am missing the default "start up" message (WS/RPC connections, hardware, para-id etc, see below) when initiating the node client, both for ...
0x5hmoo's user avatar
  • 189
5 votes
1 answer

What is unique about Substrate's transaction pool?

Every blockchain has different implementations of a transaction pool, which does the job of checking transaction validity before transactions are included by block authors. In Substrate it is possible ...
Sacha Lansky's user avatar
  • 2,610
12 votes
0 answers

How to receive P2P messages using sc-network-gossip

Overview I'm interested to understand how to use sc-network-gossip's GossipEngine to receive P2P messages, not just gossip messages. The motivation is that I would like to send specific peers specific ...
Drew Stone's user avatar
  • 1,164
1 vote
1 answer

Client testing - simulate construct_runtime! and to include specific pallet into test runtime

I have client which works in parallel with custom pallet through Api implementation. To do proper testing I have to implement pallet for runtime similarly how construct_runtime! does to be able to ...
Ivan Temchenko's user avatar
0 votes
1 answer

Client testing - Runtime trait implementation approach

When writing tests for client module I'm having troubles instantiating gadget for the client with the error: the trait module_primitives::ModuleApi<sp_runtime::generic::Block<sp_runtime::...
Ivan Temchenko's user avatar
4 votes
1 answer

How do `subxt` and `substrate-api-client` libraries differ?

I understand that there are two main Rust client libraries for Substrate: subxt substrate-api-client I've checked out the examples for both libraries and it seems to me that they are mostly the same....
Rtsne42's user avatar
  • 379
10 votes
1 answer

How to properly split logic between block verifier and block import?

I found it a bit confusing that part of the logic for block verification is in sc_consensus::import_queue::Verifier::verify() implementation and another part is in sc_consensus::block_import::...
nazar-pc's user avatar
  • 541