Questions tagged [extrinsic]
Questions about runtime calls that can be submitted to the blockchain. a.k.a. Transaction, Dispatchable
122
questions
2
votes
1
answer
19
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 ...
2
votes
1
answer
74
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
...
1
vote
1
answer
17
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
14
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
134
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
29
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
23
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:...
3
votes
0
answers
41
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 ...
2
votes
1
answer
33
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 ...
2
votes
1
answer
78
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
41
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>...
2
votes
3
answers
40
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
24
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('...
2
votes
1
answer
36
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&...
3
votes
1
answer
43
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
27
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
28
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 ...
0
votes
1
answer
45
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 ...
2
votes
0
answers
55
views
Fuzzing Polkadot produces Invalid Signature after chaos is injected
I'm using Polkadot version 0.9.37-08b1c09ca46, across 4 Nodes - Alice, Bob, Charlie, Dave, in a local testnet environment. I have a period of network chaos applied, and then moments of stabilized '...
3
votes
1
answer
73
views
Serialisation of Extrinsic objects
Generating transaction via ApiPromise through api.tx.xxx method generated a SubmittableExtrinsicFunction object. Which has a toJSON() function that return what I would call a raw transaction.
Is there ...
2
votes
1
answer
52
views
calling extrinsics from ink!
How to call arbitrary pallet extrinsic from ink! ? Is there a universal approach to do that?
I'd like to engage governance's features into my ink! smart contract.
0
votes
1
answer
43
views
How to create an unsigned extrinsic in outer-node
In substrate-node-template, is there a way that I can use to create an extrinsic in outer-node?
I want to specifically create an unsigned extrinsic for a specific pallet call and I found this struct ...
1
vote
2
answers
111
views
Update Runtime sudo transaction exhausted (Substrate)
I am trying to reimplement one of the Substrate tutorials:
https://docs.substrate.io/tutorials/get-started/upgrade-a-running-network/
But I am stuck with an issue - where it says to do Scheduler -> ...
0
votes
0
answers
26
views
How can I select a keypair from my keyring and prompt a password for signing transactions?
As the title says, I'm trying to be able to select a keypair from my keyring prompt for a password then sign a transaction and submit to the tx pool.
How should I use the ui-keyring and keyring to ...
1
vote
1
answer
63
views
Custom ChargeTransactionPayment type for extrinsics
if the type for extrinsic verification pub struct ChargeTransactionPayment<T: Config> has been changed on a chain, how do we update the polkadot.js API to use the new types? Suppose the type has ...
1
vote
1
answer
24
views
How to get the call `authorize_upgrade` from `cumulus_pallet_parachain_system` inside another pallet?
I would like to schedule the dispatch call authorize_upgrade inside a custom pallet. For this I need the call enum variant of the cumulus_pallet_parachain_system pallet. How can I get this? Via the ...
0
votes
0
answers
21
views
PostDispatch: Report Actual Weight but Charge Different Fee
Given the following extrinsic
#[pallet::weight(<T as Config>::WeightInfo::foo(*hint))]
fn foo(hint: u32) {
let real = get_real();
if real > hint {
return <Error<T>>::...
1
vote
2
answers
72
views
Cant get extrinsic error from balances.sendTransfer extrinsic in polkadotJSAPI
I am doing error handling in an app using polkadotJSAPI 7.13.1
There are two ways to fetch info if an extrinsic suceeds or fails, the first one is via dispatchError in signAndSend like so
...
0
votes
1
answer
92
views
Extracting error from system.ExtrinsicFailed
I have a call to an extrinsic (in a Typescript/RxJS client) that is failing but I want to be able to catch the error that the extrinsic is throwing and not just that it failed.
const chainEvents: ...
1
vote
1
answer
135
views
Is it possible to submit an extrinsic using rpc?
Could it be possible to submit and extrinsic using JSON-RPC methods.
Say submit a balance_transfer along with its parameters using curl or postman as a JSON-RPC
6
votes
1
answer
184
views
Calculating actual weights for extrinsics
I have a substrate pallet with a number of extrinsics, some simple, some more complex. Depending on the chain state and the input variables, the amount of computation and the number of DB reads for ...
1
vote
1
answer
75
views
how to transform OpaqueExtrinsic to get the variables within the transaciton?
im writing a custom BlockImport and i need to decode the transactions within the block,as we know a transaction is simply a pallet method call for example store_value(value), but at the point where im ...
2
votes
1
answer
47
views
why are complexity parameter or accounts seeding unnecessary for benchmarking transfers?
I am trying to understand why there is no complexity parameter on transfer benchmarks.
The substrate benchmarks documentation states:
For benchmarks, you want to execute the most computationally ...
0
votes
1
answer
14
views
Unexpected Events from parainherit(enter) extrinsic
Can anyone explain why this module call parainherent(enter) ended up emitting a BatchCompleted and a couple ItemCompleted events? I'm unable to find any similar cases in westend.
1
vote
1
answer
31
views
Why was the same transaction executed twice?
The following 2 extrinsics :
10995944-2
10996284-2
were included in the blockchain, that shows that a transaction with exact same input parameters including the signature was executed twice. Why did ...
1
vote
1
answer
19
views
Why transactions with same arguments in one case they have same hash but in another case they have a different one?
These 2 extrinsics :
10996284-2
10995944-2
have the same
Sender Account (From)
Destination Account (To)
Nonce
Amount
Transaction Hash
I would like to know the reason why this happened because I am ...
3
votes
1
answer
46
views
How to annotate extrinsic as non transactional?
it looks like that in version of 28 polkadot was change that extrinsics are by default transactional.
Before that we used attribute #[transactional] for specific extrinsic in order to have ...
0
votes
1
answer
65
views
Get Block hash from transfer in polkadot.js/api
I created kusama transfer function using polkadot.js/api.
I followed https://polkadot.js.org/docs/api/examples/promise/make-transfer.
I can get extrinsic hash from above. I want to get extrinsic ...
1
vote
1
answer
75
views
H256 to_string() function does not return complete string
I have a H256 value which is an extrinsic returned hash
0x8d19a2e575d583b8812418c71be304f16a978cfac2bfad54afcad824cb4d3471
but when i convert this to String using .to_string()
it does not return ...
1
vote
1
answer
43
views
How to determine which account sent an extrinsic from substrate block data?
Could anyone help me understand how one reads from a substrate chain the account that sent an extrinsic?
For example take this Kusama xcmpallet.reserve_transfer_assets extrinsic sent by address ...
0
votes
1
answer
24
views
Signed bytes from Schnorrkel library throws Bad Signature error
Hey i have some call data which is similar to this.
I am signing it using schnorrkel libaray function function. as secret.sign_simple(&[], msg) where secret is a Keypair and msg is in bytes.
Then ...
1
vote
2
answers
62
views
Is it possible to pattern match on the runtime call enum inside a pallet?
I have a pallet that can be used to dispatch other calls to the runtime and it's defined as
internal_call : Box<<T as Config>::Call>
Given that Call is just an enum, I want to check if ...
5
votes
1
answer
78
views
Removing randomness-collective-flip pallet from runtime
We recently tried to remove pallet-randomness-collective-flip from our runtime. This pallet has been in our runtime since it was created as it was included in the template-node-runtime, but we never ...
1
vote
1
answer
38
views
Split extrinsic execution across multiple blocks
Is it possible to split the execution of an extrinsic into several continuous blocks?
Looking at this post, it is possible to create migrations, but I was wondering if the same can be applied to an ...
0
votes
0
answers
32
views
Do extrinsic respect changes to storage due on call?
I have pretty simple extrinsic code which stores data to substrate storage hashmap and tries to load it after from another nested function. But result looks like nothing stored.
In pseudo:
storage[&...
0
votes
2
answers
75
views
what happens if I leave out ensure_signed from extrinsic?
What are the attack vectors of leaving out ensured_signed in
one of my extrinsic?
It seems that SignedExtensions already checks if the transactions are signed. When I try to submit an unsigned ...
0
votes
1
answer
54
views
Decoding extrinsic hex into readable form in Rust
I am running the substrate-dev node. Made a transaction using Polkadot-explorer. After fetching the block using subxt I am getting extrinsic hex as:
...
2
votes
1
answer
62
views
how to run custom block validation logic when importing a block?
I am trying to execute some logic whenever a block is received, specifically i want to create custom transactions validation of a received block.
can someone provide a clear example (simple code) on ...
2
votes
1
answer
58
views
Sending extrinsic fails when signed payload goes over 256 bytes
This makes absolutely no sense, but maybe someone has a good suggestion.
We wrote our own client implementation to send extrinsics to a Substrate chain and it has been working fine, until just today, ...
1
vote
1
answer
36
views
What's the difference between `transaction_version` and `EXTRINSIC_FORMAT_VERSION`?
Substrate has the concept of a transaction_version and an EXTRINSIC_FORMAT_VERSION. What are these used for and when are they changed?