Questions tagged [client]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
58 views

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
61 views

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
38 views

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
81 views

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

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
44 views

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
116 views

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
893 views

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
117 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
3 votes
0 answers
66 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
3 votes
1 answer
251 views

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
194 views

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
279 views

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
204 views

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
38 views

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
48 views

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
136 views

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
91 views

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