All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
2 views

How to write test cases to validate if fees is paid?

I'm working on writing test cases for an extrinsic that conditionally bypasses transaction fees based on specific conditions. I need to verify whether the fees are paid or not for a given call. My ...
Deepak Chaudhary's user avatar
1 vote
2 answers
43 views

Should one use mutate or insert to update storage?

What should one use to update the values, mutate or insert? And why in algorithm point of view? <SimpleMap<T>>::insert(&user, entry); <SimpleMap<T>>::mutate(&user, |...
Amiya Behera's user avatar
0 votes
0 answers
16 views

How to limit xcm transfers to sudo account

I would like to limit xcm transfers to only the sudo account, aka only the sudo account should be able to call limited_teleport_assets and move tokens to the relaychain or other parachains. How would ...
dvcpull's user avatar
0 votes
0 answers
2 views

"overflows indirect symbol table" when compiling polkadot

Only happens when compiling the polkadot-sdk/polkadot with release profile using my macbook... Simplly cd polkadot-sdk/polkadot and cargo build --release, using latest rustc stable (1.83.0), gives the ...
Kailai's user avatar
  • 383
0 votes
0 answers
17 views

ERROR: Chain configuration not found in ink getting-started in cargo contract upload

I was trying the tutorial at https://use.ink/getting-started/deploy-your-contract#using-cargo-contract I have substrate node running in another terminal, I already had built the contract and have ...
geckos's user avatar
  • 101
0 votes
0 answers
16 views

Why is runtime's WASM maximum allocated memory hardcoded to 32MiB?

In sp-core it is defined the maximum memory that can be allocated by the runtime. The current max possible allocation is 32 MiB: // substrate/primitives/core/src/lib.rs (snip) /// The maximum number ...
gpestana's user avatar
  • 263
0 votes
0 answers
29 views

Error executing and verifying runtime benchmark: Execution aborted due to trap

I am trying to benchmark pallet_staking for my runtime. I am on an older substrate release branch. When I try to benchmark using the command. ./target/release/borderless benchmark pallet --chain dev -...
RRR's user avatar
  • 45
0 votes
1 answer
16 views

Can't find substrate-node-template

I'm new to substrate.I'm following the a tutorial on youtube https://www.youtube.com/watch?v=G897F8Gw1PM&list=PL5dTjWUk_cPYdb4j2RH8BHEAK3z_ZME1j&index=2 and the substrate docs to build a local ...
Deepu Harry's user avatar
0 votes
1 answer
19 views

Bad signature when CheckMetadataHash is enabled

Nodle has upgraded its testnet to 3.1.13-M which is built on top of polkadot-sdk 1.1.13. One of the motivations behind this upgrade was to allow Polkadot Generic App on Ledger to work with Nodle's ...
Alex Sed's user avatar
  • 590
0 votes
0 answers
29 views

Panic running benchmarking with `pallet_identity` due to sr25519 signature

I have included pallet_identity in my runtime, but when running benchmarks, I encountered a panic with the following message: Sr25519 not supported for EthereumSignature It makes sense because the ...
magecnion's user avatar
  • 384
0 votes
0 answers
6 views

Why does pallet-babe have a `MaxNominators` configuration?

Going through the pallet again for a project and I can see that it has a config item for MaxNominators which unsurprisingly has the following description: The maximum number of nominators for each ...
Purple_Turtle's user avatar
0 votes
1 answer
12 views

How to "inspect" AccountId20 keys?

Alith has Public Address: 0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac and Private Key: 0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133. Using subkey inspect I could not find a way to ...
Purple_Turtle's user avatar
0 votes
1 answer
14 views

Running some large computation

What will happen if I loop through 1000 or 10000 values in a vector. Will the transaction fail or block time will increase?
Amiya Behera's user avatar
0 votes
1 answer
14 views

Staking through proxy

I am working on a project at bittensor blockchain, where I have delegated my wallet to a proxy address allow proxy to perform staking ops on delegated wallets' behalf. But when I am trying to stake ...
Ishwar Parmar's user avatar
0 votes
0 answers
10 views

Substrate Tutorial

I would like to know when the tutorials will be updated with the new GitHub repositories. I started with substrate yesterday and I found this: "(Old) Substrate Developer Hub (ARCHIVED)" so ...
Nandorphis's user avatar
1 vote
0 answers
4 views

API-sidecar hangs after bad request

Has anyone ran into a issue where the api-sidecar hangs for a very long time ( > 15 secs)? This is potentially after a bad request: BadRequestError: The address xxx is not a stash address. We see ...
user5734's user avatar
0 votes
1 answer
36 views

Allocate extra WASM memory to generate large chainspecs

In some cases, generating a chainspec may overload the memory allocated by the WASM blob which results in an Requested allocation size is too large error: ❯ staking-node build-spec --disable-default-...
gpestana's user avatar
  • 263
0 votes
0 answers
8 views

Loading rocks db snapshots details

Goal: If I have a folder containing rocksdb snapshots, and I just want to load the database dump such that it can read the various pallet's state and constants. For the context I do not need the node ...
mrBovo_dev's user avatar
0 votes
1 answer
17 views

Can i use subxt to to get unapplied slashes or even slashes that have occured in a live chain?

I need to get the validators and their nominators who were slashed in a particular era on a live chain. I tried to get the unapplied slashes using the snippet below. But when doing so I get the ...
RRR's user avatar
  • 45
0 votes
1 answer
19 views

Block sync fail after Async backing

after upgrading the async backing runtime upgrade (at block 35), my local parachain can continue to generate the block. However, when I run another archive node by the binary that supports the async ...
Jay Pan's user avatar
  • 99
0 votes
0 answers
8 views

How can implement less frequent empty block and instant confirmation for transactions by modifying babe consensus?

async fn propose_with( self, inherent_data: InherentData, inherent_digests: Digest, deadline: time::Instant, block_size_limit: Option<usize>, ) -> ...
Mahavir Ganapati Dash's user avatar
1 vote
0 answers
12 views

How to store files in offchain worker and its hash in blockchain?

Can offchain worker be used for storing large files. I want to eliminate third party ipfs gateways for storing files. I need a code example for uploading and storing files in offchain worker and its ...
Amiya Behera's user avatar
0 votes
0 answers
12 views

Getting Core_version: Decode error

This is my first time using chopsticks. When I run npx @acala-network/chopsticks --config=./my_chain_config.yml I get the error Error: Error while calling Core_version: Decode at Block.call (rrr/my-...
RRR's user avatar
  • 45
1 vote
2 answers
53 views

try-runtime Report Zero Weight Despite Successful Migration Execution in Polkadot 1.0

We are currently using node-template based on Polkadot 1.0 and testing a storage migration with try-runtime. We've successfully conducted several migrations in the past, but this time we're ...
Sameh Farouk's user avatar
0 votes
1 answer
19 views

Latest zombienet and polkadot sdk parachain node produce only 3 blocks on parachain side

https://github.com/paritytech/polkadot-sdk/blob/717bbb24c40717e70d2e3b648bcd372559c71bd2/templates/parachain/README.md Latest zombienet and polkadot sdk parachain node produce only 3 blocks on ...
rust.dev's user avatar
  • 539
0 votes
1 answer
23 views

XCM Transactions - Polkadot to Asset Hub (Statemint)

I understood how to create a message to send some DOT from polkadot to asset hub. My main question is, how to track the whole flow of the transactions to be sure it succeeded? To contextualise, I have ...
Hugo Maitre's user avatar
1 vote
1 answer
11 views

Calculate proof size of a function that reads state

How would one calculate the proof size of a storage read? To give some more context. In our chain extension we have certain functions that do a storage read from the runtime. Now atm we charge weight ...
Daan van der Plas's user avatar
0 votes
0 answers
10 views

Modifying storage and calling extrinsics for overhead benchmark

I am trying to implement the Overhead benchmark command for our parachain Here is the code I have already: BenchmarkCmd::Overhead(cmd) => runner.sync_run(|config| { ...
mirind4's user avatar
  • 101
1 vote
1 answer
19 views

Dedot Flipper contract flip() operation not working

I am trying to work with the default flipper contract with react js based on the link: https://github.com/dedotdev/dedot. I am trying to follow the Submitting transactions section. First of all, I am ...
zubayr khalid's user avatar
1 vote
1 answer
25 views

Invalid JSON blob: unknown field `allianceMotion`

I am trying to generate raw json file but encounter with this error ./target/release/dip-consumer-node-template build-spec --chain plain-parachain-chainspec.json --disable-default-bootnode --raw > ...
go11li's user avatar
  • 1,253
4 votes
2 answers
70 views

Alternative to BlakeTwo256 for WASM Compatibility in a no_std Environment in Rust

I'm developing a Rust script that I need to convert to WebAssembly (WASM). In this script, I'm using the BlakeTwo256 hasher, which is imported from the sp_runtime crate. However, I'm unable to compile ...
Deepak Chaudhary's user avatar
1 vote
1 answer
16 views

What should be `Good Enough` requirement for Substrate based chain?

I am working on a Substrate based chain. I want to make sure my chain is up to par for Polkadot community. For example: my chain should use latest Polkadot SDK stable version. Are there other things, ...
Boleng's user avatar
  • 557
0 votes
0 answers
7 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
1 answer
18 views

Use pruning with snapshot

I want to use polkadot chain snapshot from https://snapshots.polkadot.io/ to restore my mainnet node, but my requirement is to keep state data for 100800 blocks, while in snapshot it is showing only ...
Jay Shah's user avatar
0 votes
0 answers
8 views

Decoding keyringPair’s encoded field for private key extraction [duplicate]

I'm working with the polkadot.js library and need to extract the private key from a KeyringPair object. Using pair.toJson(password), I obtain an object with an encoded field in base64. After decoding ...
poka's user avatar
  • 101
0 votes
1 answer
9 views

Substrate: How to call / import functions in the same pallet

Folders and file inside my pallet: rpc, runtime-api, src, tests, Cargo.toml Inside src/abc.rs: impl<T: Config> Pallet<T> { #[allow(clippy::indexing_slicing)] pub fn doAction(id: ...
Russo's user avatar
  • 1,195
0 votes
1 answer
14 views

How to check if Relay Chain has Async Backing enabled?

According to the Async backing guide, the relay chain needs to have async backing enabled, so I was wondering what is the easiest way to check if some active relay chain (Rococo or Zombienet relay) ...
NZT's user avatar
  • 43
0 votes
1 answer
14 views

Error: type ConsensusHook is not a member of trait cumulus_pallet_parachain_system::Config

When trying to upgrade Parachain for Asynchronous Backing compatibility following this guide: https://wiki.polkadot.network/docs/maintain-guides-async-backing I get the following error when compiling: ...
NZT's user avatar
  • 43
0 votes
0 answers
12 views

Substrate: function can be called only from offchain workers

i just made a pallet where there is a function callable from users, this function will save some input data inside a storageMap, then offchain worker take the input data, do some operations and should ...
Jacopo Mosconi's user avatar
0 votes
1 answer
36 views

In the Genesis Config, what does the `patch` key do?

When creating a genesis config, we have the ability to add a genesis.runtimeGenesis.patch. What is the main purpose of this patch and why would I use this rather than directly setting the ...
Shawn Tabrizi's user avatar
  • 16.2k
1 vote
0 answers
15 views

(Outdated Implementations) I'm working on paying block authors in Proof Of Authority (POA)

I'm currently developing a private Substrate-based blockchain and working on implementing a mechanism to pay block authors (validators) in a Proof of Authority (PoA) consensus. I've been following a ...
Asim Hayat's user avatar
0 votes
0 answers
3 views

Would it be possible to show historical on-chain storage state for a particular block number?

Is there any way to present historical on-chain storage state for a particular block number? I couldn't find way to do this. Can someone please help me to answer this?
Boleng's user avatar
  • 557
0 votes
1 answer
29 views

The browser displays the status of the validator

Why are some consensus nodes both active and waiting?
Yang Elden's user avatar
0 votes
0 answers
27 views

How can I enable the proof size recorder during runtime testing?

I am attempting to enable and utilize the proof_size recorder host function in the runtime, but I am stuck in the runtime testing. The default TestExternalities does not enable the recorder, so I ...
boundless-forest's user avatar
3 votes
1 answer
39 views

How to import big data into the runtime?

I am having a scenario where my chain is responsible for keeping records of airdrop accounts. Initially, all accounts have a zero balance. When I receive a list of accounts with the respective ...
Deepak Chaudhary's user avatar
0 votes
1 answer
24 views

How to enable js features in substrate?

I am trying to compile my substrate node but it is giving me the issue regarding js features: error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js&...
go11li's user avatar
  • 1,253
0 votes
0 answers
14 views

Getting Wrong ABI for the openbrush contracts

openbrush Library when I am building the openbrush examples i am getting wrong ABI for the input of all the functions that are in the libraray. Can anyone tell why it is happening. e.g. This is in ...
user26021116's user avatar
0 votes
0 answers
5 views

Getting `Input("rpc finalized_head failed.")` while running try-runtime

I am trying to verify runtime-upgrade through try-runtime against a live environment using below commands: cargo build --release --features try-runtime try-runtime --runtime ./target/release/wbuild/...
Boleng's user avatar
  • 557
0 votes
1 answer
9 views

Are there rpc calls to show the size / transaction types in the mempool?

Are there rpc calls to show the size / transaction types in the mempool? I've never seen any visualisation of the mempool for polkadot or substrate chains. Other chains seem to have visibility into ...
Squirrel's user avatar
  • 3,899
0 votes
0 answers
6 views

(OUTDATED) Looking for workaround for Parity Vault (Parity Signer) not supporting DOT people chain

Disregard, PR was published today... https://github.com/novasamatech/parity-signer/issues/812 we are looking to update our DOT sub IDs. We have been a long time Parity Vault (Parity Signer) user. ...
Sandi's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
104