Questions tagged [extrinsic]
Questions about runtime calls that can be submitted to the blockchain. a.k.a. Transaction, Dispatchable
153
questions
0
votes
0
answers
4
views
WS transport error: i/o error: Broken pipe (os error 32); terminate connection
I am submitting an unsigned extrinsic using subxt crate in rust.
I have a simple u64 number inside StorageValue called Nonce which keeps track of number of transactions submitted (needed for ...
1
vote
1
answer
63
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 {...
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 ...
0
votes
0
answers
21
views
What is the reason for this unexpected transaction ordering
My understanding is that transaction priority and therefore the ordering in the block is determined by the fee and tip paid.
I have noticed a number of times that transactions with the highest total ...
2
votes
1
answer
28
views
Allow specific accounts to make extrinsic calls
In our case, validators are providing multiple different services and I want to restrict them from un-staking or making unbound calls until they have completed the job.
I can set a BaseCall filter to ...
0
votes
1
answer
21
views
subxt: How to submit pallet_session::set_keys() extrinsic?
I have generated the session keys using the author.rotateKeys() RPC call. The keys are of type Vec<u8> and the length is 128 bytes.
I am trying to call the set_keys() method from pallet_session ...
1
vote
1
answer
18
views
Extrinsic with BalanceOf<T> and UI
Many Substrate pallets extrinsics take a Balance type, for example balances->transfer or bounties->create.
The Polkadot/substrate Development UI somehow detects that it is a Token related field ...
5
votes
0
answers
52
views
Is there any good way to keep an intermediate state for an operation between several transactions/blocks in a BABE/GRANDPA-based chain?
I know that the best practices suggest designing transactions (pallet calls) in a way that executes the operation atomically and doesn't keep any intermediate states. This guarantees, that in case a ...
5
votes
1
answer
71
views
Extrinsics In Genesis Block
All the Substrate-based chains that I know of have no transactions in the genesis block.
The genesis block is the same data structure as all other blocks and therefore does have a body and a Vec<...
1
vote
1
answer
52
views
List all balance changes of an account on a Substrate-based chain
My goal is to list all balance changes for an account on a Substrate-based chain like Acala.
I assumed that on Substrate-based chains all incoming and outgoing values to and from an account would be ...
4
votes
0
answers
26
views
extrinsics from same account result in underutilized blockspace
I'm sending multiple extrinsics from the same account. The nonce is increased before a new extrinsic is sent, and all extrinsics are sent as immortal.
My goal is to fill the blocks as much as possible,...
0
votes
1
answer
30
views
Does ExtrinsicBaseWeight apply even when we return 0 weight from extrinsic?
If we return Weight::zero() for an extrinsic that returns DispatchResultWithPostInfo, does that mean that we discard extrinsic base weight which is included for every transaction?
1
vote
1
answer
40
views
polkadot explorer getting stuck while using utility and sudo pallet from extrinsics
I am trying to do a runtime upgrade of my blockchain that is layer 0 chain running on version polkado-v0.9.36 . I also have (ethereum virtual machine integrated to it ).
When I do runtime upgrade ...
0
votes
1
answer
79
views
If a transaction is created using subxt/polkadot-js and how to sign it using any crypto libraries and send it again using subxt/polkadot-js
I'm trying to create a poc to separate out the signing of transactions from the libraries such as subxt or polkadot-js. I was trying subxt and schnorrkel libs to create partial signed transaction and ...
1
vote
1
answer
86
views
Get Extrinsic Hash from author_submitAndWatchExtrinsic
I'm launching an author_submitAndWatchExtrinsic and would like to get the Tx Hash as well:
{"jsonrpc":"2.0","id":9,"method":"author_submitAndWatchExtrinsic&...
1
vote
0
answers
54
views
Batch signed transactions
I need to execute some list of signed extrinsics in order, but because of the randomness that can exist in the transaction pool I have no way to actually ensure that they will execute in the proper ...
4
votes
1
answer
71
views
How to create signed extrinsic in outer node?
What is idiomatic way to submit signed extrinsic in outer node?
Is it using BasicPool and submit_local? Would Rust example at the bottom be be good approach? If it is how to:
properly choose period ...
3
votes
1
answer
59
views
Get the raw hex from substrate
I'm trying to get the raw value of the transaction without using the websocket.
For now I'm using a WebSocket for my application and I am in the process of removing it, I could find everything I ...
1
vote
1
answer
74
views
I'm struggling to understand the concept of runtime calls, RPC calls, and extrinsics in Substrate
Can someone please explain these concepts in a simplified manner and highlight their key distinctions? I would greatly appreciate any help in clarifying these concepts.
I'm relatively new to Substrate ...
1
vote
2
answers
38
views
Sending native token in loop not running
Please explain why the following occurs
When this method is called, the tokens are equally divided and distributed to the user. (as expected)
All user balances get updated with the new amounts.
#[ink(...
2
votes
1
answer
46
views
Error with submitted preimage
I am attempting to note.preimage the following call data hash:
...
7
votes
0
answers
70
views
Pallet session: What is the purpose of the `proof` argument on the `set_keys` extrinsic?
The set_keys extrinsic in pallet_session has a second argument proof, which seems to be intended as an ownership proof of the keys.
Looking at the body, there is a call to ownership_proof_is_valid.
...
4
votes
3
answers
49
views
How to independently check in which block extrinsic got included?
The standard way to track extrinsics is:
api.tx.balances
.transfer(recipient, 123)
.signAndSend(sender, ({ status, events }) => {
if (status.isInBlock) {
// here we know that our tx ...
3
votes
1
answer
68
views
Safe way to remove an extrinsic
I was looking at removing some extrinsics from my pallet and wanted to know the safe way of going about it.
Can/should I reuse the call_index?
How will historic transaction data be impacted?
...
5
votes
1
answer
99
views
Era of Mortal Extrinsic - How to set `period`, `phase` and `current` arguments
I am trying to define the Era of a mortal transaction in two ways :
Manually
Meaning I am not using the mortal function and I have to input the correct values for Periodand Phase myself which are the ...
3
votes
1
answer
51
views
Error Metadata(IncompatibleCodegen) - subxt
I was executing a transaction using Alice account to make a sudo call in local Rococo Network
let alice = PairSigner::new(AccountKeyring::Alice.pair())
I am trying to change it to use my own account ...
3
votes
0
answers
37
views
Unified Accounts
We have followed the comets of moonBeam and implemented Unified Accounts. Now we're facing issues while adding session keys for aura, grandpa and I'm online.
we're using this method for Aura and ...
6
votes
0
answers
67
views
Decompose complex types in JS
My overall goal is to build a generic extrinsic builder, just like the extrinsic tab from polkadot-js/apps. This code is very old and very hard to decipher unfortunately and I couldn't find any doc ...
4
votes
1
answer
35
views
Pool overloading in benchmark
I am working on substrate and trying to benchmark my node. I'm sending unsigned extrinsics to the pool and implemented the ValidateUnsigned trait where I add priority, longevity, provide and require ...
2
votes
2
answers
43
views
How to ensure a call is the first to execute in a block?
As the title mention, I would like to know what would be the best way to ensure that an extrinsic can be executed only if it's the first call in the block (ignoring timestamp).
It also need to work ...
4
votes
1
answer
44
views
Change state from a task
I have a asynchronous task running in service.spawn_essential_task(task).
Which does some stuff and wants to write data in storage. How can i achieve this?
Changing state by making runtime_apis to ...
6
votes
2
answers
209
views
Any purpose to add #[transactional] attribute to an extrinsic?
Could you help me to understand if there is any special purpose to add a #[transactional] attribute to an extrinsic?
For instance, in pallet-uniques there is a call buy_item tagged with frame_support::...
3
votes
1
answer
31
views
Get extrinsic fee using Polkadot.js/api
I want to get extrinsic fee using polkadot.js/api.
I am checking kusama chain.
https://kusama.subscan.io/extrinsic/17981827-3
I need to get 0.00053835621 fee from above extrinsic. Which api can I use ...
3
votes
1
answer
148
views
How to encode an extrinsic for RPC from a web client?
I need to programmatically pack an extrinsic for an RPC, I believe I'm looking for the following front-end functionality:
extract relevant indices from the Metadata
fill the extrinsic parameters
...
4
votes
1
answer
33
views
Why doesn't getMetadata show my callable methods as extrinsics in Substrate-node-template
When running Substrate-node-template - basically the Kitties - and with a callable eg create_kitty() as a dispatchableResult in the call pallet, what I assume to be an extrinsic in the metadata, this ...
0
votes
0
answers
19
views
how to make an extrinsic that allows election commission (author+validator) to upload the encoded candidate list to the blockchain
I am trying to make a substrate solo blockchain for the election voting using homomorphic encryption scheme use case.
Till now, I have created a permissioned blockchain, used the node authorization ...
4
votes
1
answer
236
views
Sign a transaction offline for Westend testnet and verification of the transaction
Could Polkadot experts execute the code below and advise me on the questions, please?
You just need to replace the code by your own Westend accounts and nonce.
import { construct, getRegistry, ...
2
votes
1
answer
54
views
Polkadot-JS not calling my contract properly
I used PolkadotJS to call a contract, when i did, it logged the status "in block", Turns out it never makes any state change. I used contracts-ui it worked, but with JS? Never. What can be ...
1
vote
1
answer
41
views
how do you cancel a parachain proposal or referendum?
what specific extrinsic(s) should be run by a technical committee member in order to initiate the cancellation procedure for a running referendum?
the polkadot wiki states this is possible here: https:...
5
votes
0
answers
127
views
Subxt call to custom pallet method returning `wasm 'unreachable'` - (`TaggedTransactionQueue_validate_transaction`)
So I am trying to submit extrinsics to a running parachain node using subxt, but encounter a Codec error.
The parachain is based on the substrate-parachain-template, the relay chain is compiled ...
3
votes
1
answer
52
views
Benchmark failing extrinsics
Is there a way to benchmark an extrinsic whose expected behavior is to trigger an error?
I stumbled on a project where we have two instances of the same pallet. Instance1 will proceed normally for a ...
3
votes
1
answer
93
views
What informations consist of a signature which is generated when siging a transaction payload offline?
From the wiki (https://wiki.polkadot.network/docs/build-transaction-construction),
import { createSignedTx } from "@substrate/txwrapper-polkadot";
// Example code, replace `signWithAlice` ...
3
votes
1
answer
64
views
When will I stop receiving TransactionStatus updates for a transaction submitted via author_submitAndWatchExtrinsic?
If I submit a transaction via "author_submitAndWatchExtrinsic", I start getting back TransactionStatus updates, which look like one of these:
pub enum TransactionStatus<Hash, BlockHash>...
3
votes
3
answers
65
views
why blocks could contain failed transaction
After building and running substrate-node-template i started the local node with --dev flag :
./target/release/node-template --dev
i opened https://polkadot.js.org/apps/#/extrinsics and selected the ...
2
votes
1
answer
54
views
create service-endpoint in Kilt DID
I would like to add a service-endpoint to my Kilt DID, using the Javascript SDK.
I have created a full DID and am trying to add the service-endpoint like so:
const extrinsic = api.createType('...
3
votes
1
answer
56
views
Implications of invalid encoded extrinsic calls
We are seeing the following error whenever an invalidly encoded but properly signed extrinsic is submitted in our substrate based chain.
{
"jsonrpc": "2.0",
"error&...
4
votes
1
answer
66
views
How to iterate a large `StorageMap` over multiple extrinsic calls?
Hey valuable Substrate community,
I am running into the problem that I need to iterate over an unbounded StorageMap. So I need an IterationLimit and use an extrinsic which gets called multiple times.
...
1
vote
1
answer
36
views
Extrinsic lifetime
How can I get the lifetime of an extrinsic?. There is a way to estimate the lifetime of the extrinsics per chain?
3
votes
1
answer
70
views
Should events be taken into account if their extrinsic fails?
If the System.ExtrinsicFailed event was emitted within a given extrinsic, does it mean that all other events that were also emitted within it can be considered invalid and should not be taken into ...
1
vote
1
answer
104
views
Transaction pool error: Too low priority (0 > 0)
im trying to submit multiple unsigned extrinsics to the transaction pool but an Error is returned which says:
Transaction pool error: Too low priority (0 > 0)
i thought this might be related to ...