Questions tagged [extrinsic]

Questions about runtime calls that can be submitted to the blockchain. a.k.a. Transaction, Dispatchable

Filter by
Sorted by
Tagged with
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 ...
akhil nichenametla's user avatar
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 {...
clst's user avatar
  • 11
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 ...
Mateusz Nowakowski's user avatar
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 ...
Tom's user avatar
  • 11
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 ...
salman01z's user avatar
  • 527
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 ...
akhil nichenametla's user avatar
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 ...
rvalle's user avatar
  • 45
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 ...
Yahor Tsaryk's user avatar
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<...
JoshOrndorff's user avatar
  • 1,125
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 ...
Aman's user avatar
  • 11
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,...
Bernardo Rodrigues's user avatar
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?
b0zero's user avatar
  • 501
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 ...
Karanvir Singh's user avatar
0 votes
1 answer
78 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 ...
kroos47's user avatar
  • 59
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&...
FedeC87p's user avatar
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 ...
Valentin Fernandez's user avatar
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 ...
klbrvik's user avatar
  • 91
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 ...
Dashelldot's user avatar
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 ...
UPENDRA SINGH's user avatar
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(...
0xD1x0n's user avatar
  • 119
2 votes
1 answer
46 views

Error with submitted preimage

I am attempting to note.preimage the following call data hash: ...
Paradox - ParaNodes.io's user avatar
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. ...
nathanwhit's user avatar
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 ...
Mexke's user avatar
  • 55
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? ...
Nahu's user avatar
  • 33
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 ...
dominique's user avatar
  • 1,633
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 ...
Alex Bean's user avatar
  • 5,364
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 ...
BlockBird's user avatar
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 ...
Tbaut's user avatar
  • 253
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 ...
Greg's user avatar
  • 51
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 ...
Leouarz's user avatar
  • 199
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 ...
Guest's user avatar
  • 43
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::...
khassanov's user avatar
  • 105
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 ...
Heindrick's user avatar
  • 183
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 ...
Yury Yukhananov's user avatar
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 ...
kim mcclymont's user avatar
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 ...
Akansha Banerjee's user avatar
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, ...
drhanlondon's user avatar
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 ...
Woodfish's user avatar
  • 111
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:...
grenade's user avatar
  • 476
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 ...
Niels Vistisen's user avatar
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 ...
Benjamin Gallois's user avatar
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` ...
drhanlondon's user avatar
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>...
jsdw's user avatar
  • 1,284
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 ...
dadzerlaze's user avatar
  • 1,073
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('...
Micha Roon's user avatar
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&...
Aramik M's user avatar
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. ...
Chralt's user avatar
  • 523
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?
Ruben G's user avatar
  • 333
3 votes
1 answer
69 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 ...
pjozvtg's user avatar
  • 75
1 vote
1 answer
103 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 ...
dadzerlaze's user avatar
  • 1,073