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
-1 votes
0 answers
8 views

When parsing extrasic, which friend has encountered this error? Unknown type index: 7

When parsing extrasic, which friend has encountered this error? Unknown type index: 7 I'm reading block hash 0x218e12a375a282bc41299809c723ee846de4fe7699fe16b09a77a1d1f3bd1b83 when parsing the ...
user avatar
  • 47
1 vote
1 answer
24 views

Substrate - Generating Transaction History of a Wallet

How can I generate transaction history of a wallet? I was able to run substrate-archive alongside polkadot and a template node in archive node. I stored onto postgres: state_traces, blocks, extrinsics,...
user avatar
1 vote
0 answers
33 views

KSM DOT Extrinsic difference?

Does anyone know that is there a difference between DOT / KSM / Westend transactions? Context: A common send/transfer transaction... I can generate same pk and address for Dot and KSm and WST chains ...
user avatar
  • 21
0 votes
1 answer
11 views

How do I generate an extrinsic proof that encodes the actual extrinsic for which the proof was generated

0 I am trying to generate an extrinsic proof that can in turn be used to generate a partial trie and then extract the actual extrinsic for which the proof was generated from the trie, but I've not ...
user avatar
5 votes
1 answer
24 views

When using pallet-assets in another pallet: how to make pallet-assets calls private?

I'm using pallet-assets for my pallet, let's say custom-assets. In custom_assets::transfer I make some additional business logic and call pallet_assets::transfer. I want to make pallet_assets calls ...
user avatar
  • 51
0 votes
0 answers
10 views

Is it expected that Offchain Workers do not have access to the DispatchResultWithPostInfo return when calling extrinsics?

I have an offchain worker which does various things offline and then calls an online extrinsic. Here's the line where I call the extrinsic from the offchain worker: let result = signer....
user avatar
1 vote
1 answer
27 views

Clarity on storage read/write caching

I came across the following substrate recipe Cache Multiple Calls that explains how we can cache multiple reads by cloning the value or copying. Is this still a valid recipe? My understanding is that ...
user avatar
  • 207
2 votes
1 answer
21 views

How can I set the max byte size extrinsic/transaction?

I will like to play with limiting the max size of transactions? I cannot find in substrate where those configurations go.
user avatar
  • 207
4 votes
2 answers
178 views

Why could we find the same transaction hash in 3 different blocks?

We found that this transaction 0xf35238b1ef440e2a04576c8264ca8288100091a3d4c71069f0336c72078f366b was included into the following three different blocks : 10219793 10219254 10218427 Could you ...
user avatar
  • 599
2 votes
1 answer
17 views

Do benchmarks consider cached reads?

When running benchmarks do the result consider that multiple reads to the same value per block are cached as mentioned in the documentation referenced below? If caching is not considered in the ...
user avatar
  • 207
0 votes
1 answer
32 views

How to create and sign a transaction by myself

I am developing the tool to create and sign a transaction, but I find nothing about the format of a transaction before signing. Could you please help me to find out the document about this issue. ...
user avatar
  • 13
0 votes
1 answer
44 views

Get a byte size of single extrinsic/transaction

I am trying to calculate how many transactions can fit into a single block. I have a block limit of 5mb. How can i learn the byte size of a single submitted transaction so i can estimate how many ...
user avatar
2 votes
1 answer
34 views

How to create custom origin that executes abritrary code on transactions

How can I create a custom origin that executes some arbitrary logic on any transaction? The use case here is some identity check that fails a transaction, if the check fails. In addition, I want to ...
user avatar
1 vote
1 answer
57 views

High transaction throughput - single acccount

I'm using subxt with the aim to handle bursts of transactions concurrently through a single account. I understand the nonce must be incremented, however I'm unsure of the exact lifecycle of a tx and ...
user avatar
  • 11
0 votes
2 answers
24 views

Substrate Pallet::Call, unpack the Pallet:Call's content

In default Substrate-Node-Template I want to make some actions inside validate_transaction function which is located in runtime/src/lib.rs: fn validate_transaction( source: ...
user avatar
4 votes
2 answers
155 views

Is a transaction an extrinsic?

I often see the two words used interchangeably. This has led me to read the docs: Extrinsics fall into three categories: inherents, signed transactions, and unsigned transactions. https://docs....
user avatar
  • 2,870
3 votes
2 answers
57 views

Why unsigned extrinsics? [closed]

Q1. What is the existence of Unsigned extrinsics for? I have read about it here: https://docs.substrate.io/v3/concepts/extrinsics But it still does not really make sense to me why it exists in ...
user avatar
5 votes
1 answer
79 views

With subxt how can I subscribe to watch extrinsics?

There's some great examples of how to use subxt to listen to all events. Polkadot-js events screen seem to show events grouped by the extrinsic that created them. Can I do the same in rust? (if not ...
user avatar
  • 2,432
4 votes
1 answer
53 views

Calculate extrinsincs root

I'm trying to calculate extrinsic root from the given extrinsics in the block and compare it with extrinsics root in the header. The result is not the same. Here is an example for block 10030907 in ...
user avatar
  • 155
3 votes
1 answer
109 views

What is the difference between the extrinsics utility.batch() and utility.batchAll()?

I would like to batch several extrinsic calls into one transactions, but I am not sure if I should use utility.batch() or utility.batchAll(). What is the difference?
user avatar
  • 2,870
0 votes
1 answer
40 views

How to Determine Transaction Interface

In Substrate code, there is logic to determine the way in which extrinsics should be submitted to the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api....
user avatar
1 vote
1 answer
45 views

What's the Substrate's equivalent of receipts in Ethereum?

I want to check if a given extrinsic is executed successfully or not from a light client inside the enclave (aka Intel SGX). I am importing new blocks, iterating over the extrinsics I am interested in,...
user avatar
1 vote
1 answer
40 views

Transaction hash when call extrinsic

Is there any way I can get the state of the extrinsic when I initiate the call before the block is finalized? Thanks
user avatar
6 votes
1 answer
51 views

How can I get a deeper / lower level insight into how my transaction is processed with sidecar?

How can I see in more detail what operations are executed when my transaction is submitted ? If there is a way to see all operations/extrinsics/calls that happened in a specific block then that could ...
user avatar
  • 599
3 votes
2 answers
78 views

Getting extrinsic data with the transaction hash

I've successfully submitted the extrinsic RPC call and got a JSON response { "jsonrpc": "2.0", "result": "...
user avatar
1 vote
1 answer
38 views

How to provide unchecked weight to a call using Polkadot.js?

Unfortunately, I could not find how to add unchecked weight to a call via Polkadot.js, e.g. within signAndSend or when preparing the unsigned extrinsic. Even in the cookbook example for runtime ...
user avatar
5 votes
1 answer
32 views

fee economics around remark

From looking at the source code, it looks like system pallet's remark extrinsic has null weight. Even though remarks don't add anything in terms of block execution, one could argue it's still having ...
user avatar
4 votes
2 answers
41 views

What extrinsics when executed, would need an epoch or an era change to see effects?

For example, I executed a increaseValidatorCount (additional 1) extrinsic using sudo and I am still seeing blocks finalized with one validator. Does this imply I have to wait until next epoch or era ...
user avatar
9 votes
2 answers
113 views

Generating an extrinsic call for a custom pallet

I'm trying to generate an extrinsic offline based on this example. It worked, but the signed transaction is different. Call Data As you can see in the output the Call Hash is the same. Signed ...
user avatar
5 votes
1 answer
44 views

how can I purge all pending extrinsics in the transaction pool

I suspect that an extrinsic caused the block production to stall. It's status remains at "broadcast" and no new blocks will be produced. To be sure I'd like to remove it from the tx pool on ...
user avatar
  • 343
9 votes
2 answers
52 views

Do all extrinsic fees have to be paid when using utility.batch?

Some extrinsics allow fees to not be paid if they execute properly (Ex: council.vote if it is the first vote of that account on the given proposal). What happens when those extrinsics are included ...
user avatar
  • 526
3 votes
1 answer
46 views

How to compute the fees of a block

Having a block with all the extrinsics/events, what code should I write (preferably using polkadotJs) to compute the total amount of fees paid?
user avatar
  • 526
5 votes
1 answer
89 views

Decode extrinsic on substrate side

hello is there a way to decode this kind of extrinsic on substrate side without polkadotJs : extrinsics: [0402000b935b2a697f01, ...
user avatar
  • 49
2 votes
1 answer
38 views

When to use `compact` on extrinsic arguments?

I keep seeing #[pallet::compact] on some extrinsic arguments like here on the pallet-assets/mint definition: pub fn mint( origin: OriginFor<T>, #[pallet::compact] id: T::...
user avatar
0 votes
1 answer
47 views

To get the extrinsic data from the extrinsic Hash

When I submit a transation using the polakdot-js-api I get that the transaction is included in block number and I also receive the extrinsic hash ```*Tx included at block hash ...
user avatar
  • 15
2 votes
1 answer
42 views

Is there a way to know what event it is without decoding the encoded extinsisc?

We are manually decoding the encoded extrinsic. [ex 0x510284.. -> TransactionInfo{value=AccountID{address=14pT17...)] It was confirmed that polkadot-js is well decoded through the toHuman method ...
user avatar
  • 415
3 votes
1 answer
31 views

How to obtain extrinsic hash

PolkadotJS explorer provides a hash value for every extrinsic (see marked screenshot) but the extrinsics list from block data (block.extrinsics) does not explicitly provide one. How is this value ...
user avatar
  • 325
6 votes
2 answers
75 views

What are the Steps for Encoding an Extrinsic in Substrate?

Substrate introduces some unique concepts such as unsigned transactions and signed extensions. What are the steps for encoding an extrinsic in Substrate? What are the specific details that relate to ...
user avatar
1 vote
1 answer
47 views

How to solve 'Invalid transaction version'?

use std::any::Any; use std::io; use subxt::*; use subxt::{ClientBuilder,DefaultConfig, DefaultExtra}; use subxt::codec::Decode; use crate::sp_runtime::OpaqueExtrinsic; use sp_runtime::{ generic::{ ...
user avatar
  • 415
3 votes
1 answer
67 views

Where do the transaction fees go to?

Whenever I submit an extrinsic, there's a small transaction fee applied to the sender. Where does it go to?
user avatar
3 votes
2 answers
51 views

What format is the block timestamp?

I'm using @polkadot-js to decode extrinsic data. The following method call returns a timestamp at a specific block, but I don't know how to parse this. I tried assuming that it's a unix timestamp in ...
user avatar
  • 133
3 votes
2 answers
47 views

Do changes revert when an Extrinsic errors?

I have an Extrinsic which modifies some storage variables and then returns either Err or Ok. Will it revert the changes when I return Err? How can I make sure that it only commits to changes when I ...
user avatar
5 votes
2 answers
151 views

How to decode extrinsic at json-RPC call's data(byte code)

I call json-RPC through the terminal and get the data as below. extrinsics is raw byte, but I'm using polkadot-js(SCALE codec?) to decode it. But I don't know which method to call. "block": ...
user avatar
  • 415
3 votes
1 answer
42 views

Correlate events with extrinsics in a utility.batch call in Polkadot

In Polkadot and Kusama emitted module events has the phase property so we can correlate them with the extrinsic that triggered that event but I can not do the same when the extrinsic is included in a ...
user avatar
9 votes
6 answers
150 views

How to call extrinsic functions externally from rust?

I need to call extrinsic functions, for example utility -> batch(calls) or utility -> batchAll(calls). Which library do I need to use for this? I can't find those examples in the web.
user avatar
  • 91