All Questions
4,583
questions
3
votes
1
answer
24
views
Facing issue in adding offchain worker
I'm using pow substrate chain. But After adding offchain worker in the pallet and runtime, chain doesn't produce block. But the same code is working on the freshly node template, after running this ...
0
votes
0
answers
15
views
Getting Mnemonic/Seed Phrase from JSON backups
I have a password-protected digital backup of an account using the JSON file from the Polkadot.JS extension.
How do I get the mnemonic/seed phrase from this file so that I can back it up on paper? ...
0
votes
1
answer
12
views
Iterating on a storage from Offchain Worker Concerns
I have a StorageMap named PublicKeyToMsaId which has around 300K inserted items and I want to iterate on all of those keys-values in offchain-worker to create a reverse map in offchain storage.
To ...
0
votes
1
answer
15
views
What is the signing context chosen by PolkadotJS API?
In the verification of a schnorrkel sr25519 signature, there is a signing context which takes an arbitrary string/bytes.
What is the signing context used in the PolkadotJS Extension?
Is it something ...
0
votes
0
answers
13
views
generate types from chain does not work. Documentation is not clear
I dont think typegen is working as expected per documentation, by following the provided example and adapting it to my parachain.
`
Found 244 errors in 5 files.
Errors Files
5 src/interfaces/augment-...
1
vote
1
answer
51
views
jsonrpc method `payment_queryInfo` is being deprecated
I saw this polkadot API document: https://polkadot.js.org/docs/substrate/rpc/#payment
and it mentioned that the payment_queryInfo is deprecated and should use api.call.transactionPaymentApi.queryInfo ...
0
votes
1
answer
55
views
What are the risks of panicking inside an extrinsic call?
Let's imagine the following extrinsic.
#[pallet::call_index(1)]
#[pallet::weight(T::WeightInfo::might_panic_extrinsic())]
pub fn might_panic_extrinsic(origin: OriginFor<T>) -> DispatchResult {...
1
vote
1
answer
233
views
What is chain decimal?
I saw token decimal has different value like 12, 10, 6 in different substrate chain, What exactly it means and what is the use of it?
1
vote
0
answers
12
views
Why does in polkadot and most other chain xcm pallet the XcmExecution filter is set deny all instructions
// ...but they must match our filter, which rejects all.
type XcmExecuteFilter = Nothing; // == Deny All
1
vote
0
answers
11
views
How To Find The Slash Index?
My question is: When there is a deferred slash waiting to be applied, how do you find the INDEX for that slash? The council can propose a motion to cancel the deferred slash. That form requires the ...
0
votes
0
answers
17
views
How to interact between a smart contract written in Solidity from substrate pallet?
Can it be possible to interact solidity smart contract from substrate pallet?
0
votes
0
answers
7
views
Kusama 1.2 - How to associate stash accounts with host via RPC/JS/shell
this key previously worked with Kusama until the recent metadata update (with beefy key)
const keys = await api.query.session.nextKeys(address.address);
const keysHex = keys.toHex();
const result = ...
1
vote
1
answer
25
views
How to migrate events from the frame_system pallet?
I am trying to migrate the events storage value of the frame_system pallet, this is required because the EventRecord is now a generic over RuntimeEvent instead of Event, but I am not sure of how to ...
0
votes
1
answer
33
views
How to sign with private key(Not secret key) that was created by "RFC-8032"(described below contents) on offline?
Backgrounds
I am working on "ASTAR" parachain scene(TestNet: Shibuya).
I can sign message(unsigned-transaction) on offline environment and then broadcast signed-messaged(signed-transaction).
...
0
votes
1
answer
30
views
How to parse a raw signature from PolkadotJS in Substrate runtime
The Polkadot claims pallet verifies and extracts an ethereum address from an EcdsaSignature. Is there a similar implementation for doing this with an Sr25519Signature signed by a wallet using ...
1
vote
1
answer
14
views
Does adding a property to the end of a struct require a storage migration?
Does adding a property to the end of a struct used in a storagemap require a storage migration?
1
vote
1
answer
22
views
try_mutate compared to getting & setting
As I understand transactional storage, an error result from an extrinsic reverts any state changes by default (assuming no without_transactional macros or suchlike).
Some feel that because of this, ...
4
votes
0
answers
68
views
Genesis Sync and History: Are Archive Nodes Indispensable?
I've been exploring the intricacies of node types in Polkadot and other Substrate-based networks and came across a scenario that has left me curious. I understand that full nodes and archive nodes ...
0
votes
1
answer
30
views
Limit and Offset for for storage entries and keys
Following the docs for polkadot js storage we are getting entries and keys from the chain. Is there a way to use limit and offset to implement paging. Any ideas?
1
vote
1
answer
36
views
Imported pallet and got "use codec::alloc::vec;"
I work on a pallet with interior dispatch mutability where I need to make calls cancel_as_multi and as_multi and after importing contracts pallet, compiler forces me to change contracts pallet. But I ...
3
votes
0
answers
32
views
Integrating External Data into Blockchain: Can Validators Fetch and Incorporate API-sourced Data?
Is it feasible for validators to retrieve information from external APIs, particularly news data, and seamlessly incorporate it into the blockchain?
2
votes
1
answer
51
views
Do Polkadot Nodes Not Maintain the Complete Chain History?
I'm using Polkadot version 1.3.0-7c9fd83805c. When syncing a node with the command:
➜ ~ polkadot --tmp
I've encountered an error preventing me from retrieving the genesis block:
-32000: Client error:...
3
votes
0
answers
46
views
"Not Requested Block Data" synching a parachain node
I am facing an issue with syncing new nodes to the bootnodes of my parachain on Kusama. The bootnodes were synced using the following commands:
For fast sync: binary --chain <parachainchain> -- ...
1
vote
0
answers
43
views
When doing transaction my total issuance got deducted
I am currently working on incorporating a transaction fee logic where the block reward for a validator is intended to be shared between the validator and its nominator. However, I am encountering an ...
1
vote
0
answers
18
views
I am having issues with implementing swap fees on transfer for DEX
Below is my lib.rs file for the token contract and it uses the Cardinal Cryptography PSP22 sample at https://github.com/Cardinal-Cryptography/PSP22
I am trying to implement swap for the transfer taxes ...
1
vote
1
answer
34
views
Build a test node without exposing Alice account
I need to build and run a substrate node in a such way that polkadot.js.org/apps will not display Alice, Bob etc at accounts page. I tried to remove all mentioning of Alice, Bob etc. from the rust ...
1
vote
1
answer
16
views
BlockNumber and Balance Arithmetic
I am implementing subscriptions, paid for with balance, rated per block, and the duration measured in block numbers.
I am finding it very difficult, in general, to perform arithmetic that take both ...
2
votes
0
answers
14
views
when will `‘Balances::transfer' will be removed` take into effect on main-net?
In this link Balances::transfer will be removed it say 'transfer' is deprecated.
I have experienced this change on test-net and fixed my Dapp after got failure report.
But when does it take into ...
2
votes
1
answer
55
views
How to fetch data through api?
I want to fetch the data through an api in our chain. More specifically, I have an api which gives me the latest news. How can i implement this in our substrate chain?
can we have any doc or resources ...
0
votes
1
answer
22
views
What is the use case for inherent transactions?
Just for curiosity!
In what conditions we can use Inherent transactions?
Thanks
1
vote
0
answers
14
views
How can I add logs to the runtime for debugging since `--execution native` has been removed?
The node always uses on-chain wasm for execution. How can I add new logs to debug the production chain?
1
vote
2
answers
31
views
How to print / output from within async tokio test
I am writing a new test and when I run this code, the println's do not output in the terminal.
#[tokio::test]
async fn can_fetch_child_keys() {
if std::option_env!("TEST_WS").is_none() {
...
1
vote
1
answer
22
views
Westend Bond TX failed with unclear reason
Would you please help me to understand why failed my bond tX
https://westend.subscan.io/extrinsic/0x70e6193b601e5e0f96cb201f5d0ead98ee752fa1a024b6b2462d7f80a8415032
My extrinsic:
signedExtrinsic {
...
1
vote
0
answers
9
views
What happens to smart contracts when breaking changes are introduced to ink?
I've seen breaking changes mentioned in this issue for upgrading set_code_hash.
This got me thinking, what happens to existing contracts when a breaking change to ink is introduced?
For example, we're ...
3
votes
0
answers
126
views
Unable to fully utilize block capacity when performing load testing
I'm currently running load tests on my local parachain which includes Frontier integration for EVM compatibility. During these tests, I'm sending thousands of transactions via the RPC endpoint. ...
1
vote
1
answer
48
views
UnexpectedReponse in XCM when using ReportTransactStatus
I'm having issues when using the ReportTransactStatus in my XCM message as it gives me a UnexpectedResponse in my origin Parachain.
How can I register the matching query in the origin, so when the ...
3
votes
2
answers
23
views
Is there any way to extract "method" and "params" of unchecked extrinsic using ScaleCode/TypeInfo traits?
I'm wondering if there is any way to extract information about method and parameter of Extrinsic(Unchecked/CheckedExtrinsic) using TypeInfo and Scale codec.
In polkadotJs there is toString method on ...
1
vote
0
answers
34
views
Substrate account abstraction
I'm interested in learning about account abstraction in Substrate using Ink!. As far as I understand, smart contracts in Substrate cannot store keys or sign transactions.
However, I came across this ...
1
vote
0
answers
27
views
I want to clone a stable coin project in Rust but having a lot of errors
I am facing too much errors when I clone this project, I want to create a stable coin in substrate I found this repository https://github.com/1010adigupta/ink-Stable-Coin
But after installing rust ...
1
vote
1
answer
20
views
What is a concrete use case for cumulus's ability to return custom head data
This question is about cumulus PR https://github.com/paritytech/cumulus/pull/825. What is an example of when I would want to use custom head data.
The PR description itself says:
This can be for ...
0
votes
0
answers
12
views
How do I predict an address given a salt in python?
I have python code that does deploy a few ink! contracts that depend on each other. In order to do this in a batch call, I want to predict the contract address given the salt.
How would I do this, ...
1
vote
0
answers
20
views
No Block production with multiple nodes / AURA
I have a solo-chain with PoA consensus, MILLISECS_PER_BLOCK of 1000, 5MB of MAX_BLOCK_SIZE, and 400ms of MAXIMUM_BLOCK_WEIGHT. The chain produces and finalizes blocks when there's a single authoring ...
1
vote
0
answers
37
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 ...
2
votes
0
answers
52
views
Costs and Payment for Runtime Upgrades in Parachains
I'm currently working with Substrate parachains and have question that I'm hoping to get clarity on:
Payment for Runtime Upgrade Execution: In a parachain context, when a runtime upgrade (an extrinsic)...
1
vote
1
answer
16
views
Scheduler version
I have added a Scheduler into my pallet, I'm following referenda pallet as model.
I have written some tests, and the scheduler functionality is working.
However, I have noticed that in my unit tests ...
0
votes
1
answer
29
views
XcmError::TooExpensive When trasfering fungible assets between statemine & trappist parachains with rococo relay chain (limitedReservedTransferAssets)
I'm trying to test transfer of fungible assets from Statemine to Trappist with Rococo relay chain to integrate assets to my custom parachain. First of all, I tried to repeat the steps shown in the ...
2
votes
1
answer
26
views
Using ReportTransactStatus in XCM give me a unroutable error
I am getting an 'Unroutable' error when setting an Error Handler using ReportTransactStatus in my XCM Message.
I am using the polkadot-v1.0.0, at V3 of XCM.
match send_xcm::<T::XcmSender>(
(...
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 ...
1
vote
0
answers
36
views
`Corrupted state at` after upgrade from 0.9.39 to 0.9.43
I have the following error in the logs:
2023-11-20 11:47:02 Corrupted state at `[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, ...