Questions tagged [transactions]

Questions about transactions, including signed and unsigned extrinsics, transaction formats, transaction pools and constructing transactions.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

`<Runtime as TaggedTransactionQueue<Block>>::validate_transaction()` vs `frame_system::Config::BaseCallFilter` for checking for a valid transaction

When is it appropriate to use <Runtime as TaggedTransactionQueue<Block>>::validate_transaction() to check if a transaction is valid (and reject a transaction if it is invalid) and when is ...
6 votes
1 answer
101 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 ...
  • 303
1 vote
1 answer
48 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 ...
1 vote
1 answer
19 views

how to replace api.rpc.payment.queryInfo in polkadotjs now that it is deprecated?

In https://github.com/polkadot-js/api/releases/tag/v9.8.2 api.rpc.payment.queryInfo is marked as deprecated but how can you build a transaction through polkadotjs without using it?
0 votes
0 answers
9 views

Issue with TransactionPaymentApi_query_info and no code upgrades

We have recently investigated an issue with our Westend node when building a transaction before signing. I believe related to this pull https://github.com/paritytech/substrate/pull/12633#issuecomment-...
0 votes
1 answer
27 views

How to use transaction dependency tags (provides/requires)?

I could not find much information/documentation on how to use the provides/requires tags (TransactionTag) Can someone please provide an example? The tag is a vector of bytes. Should I assume these ...
0 votes
1 answer
18 views

what is the blockImport equivalent for transactions?

how do i check a transaction before it gets added to the transaction pool, kind of like BlockImport but for transactions that are coming from outside(from other validators or clients)?
1 vote
1 answer
27 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,148
3 votes
1 answer
125 views

How the transaction payment pallet handles transaction fee of every extrinsic?

I was doing some experiments with Substrate Node Template. I found that for every extrinsic, user is charged with some fee. I explored https://github.com/paritytech/substrate/blob/master/frame/...
  • 67
1 vote
1 answer
52 views

Why does ImOnline use ValidateUnsigned over SignedExtension?

From ValidateUnsigned: Note that any checks done here are only used for determining the validity of the transaction for the transaction pool. During block execution phase one need to perform the same ...
0 votes
1 answer
18 views

Is it possible to gossip inherents?

Inherent transactions can only be inserted into a block by the block authoring node that calls them. Typically, this type of transaction is not gossiped to other nodes or stored in the transaction ...
2 votes
1 answer
43 views

collect tx fees from a pallet

Is there a way to send tx fees of a pallet to an account? Like transactions fees of pallet X is send to an account. We can split the global tx fees between treasury and other but we want to do it as a ...
  • 242
0 votes
2 answers
31 views

Create a signed transaction using a signature and unsigned_transaction

I have two functions. The first function: Generates payload of unsigned_transaction: The second function: Needs to generate a signed transaction, using unsigned_transaction and signature. Process: ...
1 vote
1 answer
124 views

How i implement Debug for trait object [closed]

I find out 1 piece of code in substrate pub struct IsValidator(Box<dyn Fn() -> bool + Send + Sync>); How can I implement Debug for IsValidator Struct
  • 354
1 vote
1 answer
26 views

why does pre-dispatch in SignedExtension require you to call validate?

I am trying to understand how to develop an attack vector for when the pre-dispatch function leaves out the same checks in the validate function. Can you please help me understand what the attack ...
  • 642
0 votes
1 answer
80 views

How can I check origin in a SignedExtension?

How can I check the origin in a SignedExtension?
  • 642
0 votes
2 answers
74 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 ...
  • 642
2 votes
1 answer
82 views

No Extrinsics/Transactions are validating and getting added to the block successfully

Extrinsic transactions are sent to the validation pool, set to ready state and then broadcasted. After this, they are re-submitted to the validation pool until it reaches its validity period (...
1 vote
2 answers
30 views

Monitoring transfers and keep transfer alive

we are trying to integrate polkadot support for our exchange. Currently we want to monitor the blockchain and see if any of our address receive deposits, I am currently doing this by checking the ...
  • 11
-1 votes
1 answer
32 views

Staking:How to build and send a staking transaction? can you give me a example?

How to build and send a staking transaction? What steps and rpc should be used ? which steps is difference between building a balance thansfer ?
  • 55
1 vote
1 answer
23 views

How to use as_derivative function found in the Utility pallet?

I found the as_derivative() function call in the FRAME Utility pallet which suggests that I can use it to call a function from address_A on behalf of address_B, provided that address_B was made as a ...
0 votes
2 answers
82 views

Collect some transfer fees before any transaction

I want to collect some transfer fee besides base, weight, length fee before user makes a transaction. Like if the base + weight + length fee = 0.1 And For every transaction I want to add additional 0....
0 votes
1 answer
144 views

RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash) ... failed on weight: u64

Recently when I want to submit a transaction I receive the following failure alert, I had similar issue while getting a tx paymentInfo, which is resolved by upgrading apis, but while submitting a tx ...
  • 427
3 votes
1 answer
53 views

How to query the max extrinsic weight over rpc?

How do i query over rpc the maximum weight for normal extrinsics as defined in frame_system here: https://github.com/paritytech/substrate/blob/master/frame/system/src/limits.rs#L99-L122
1 vote
1 answer
22 views

How to preflight / preview a transaction?

Is there a way to preflight/preview a transaction before the actual signAndSend? I would like to know if a transaction would fail before letting user submit the transaction and prevent user losing gas....
2 votes
1 answer
59 views

Questions on transaction mortality

In the source code where transaction mortality is defined, the comments say: Create a new era based on a period (which should be a power of two between 4 and 65536 inclusive) and a block number on ...
  • 817
1 vote
1 answer
16 views

Signed Extensions AdditionalSigned associated type

When reading about Signed Extensions in the transaction-format post it states that AdditionalSigned can be used to to handle any additional data to go into the signed payload. This makes it possible ...
  • 642
3 votes
1 answer
93 views

Substrate weight limits and block production

Block weight is divided between 3 different types of transaction classes: mandatory operation normal Each type has a max_total. The max_total is used so that any one type does not dominate the block....
  • 642
0 votes
1 answer
86 views

Polkadot transaction fees weight based vs. gas model e.g. Ethereum

I have been reading about Polkadot transaction fees (https://wiki.polkadot.network/docs/learn-transaction-fees) and understand at a high level the weight-based model, and that this is calculated prior ...
1 vote
2 answers
56 views

Testing transaction fee movements

I am attempting to build some tests that initiate and validate transaction fee movements. The problem is that I seem unable to initiate transaction fees in a mock runtime at all. I suspect I am ...
  • 31
0 votes
0 answers
24 views

Transactions in a one-way synhronized node

Assume you submit a transaction to a Full Node which is configured incorrectly such that it can forward transactions but does not receive back results, e.g. it is working one-way Full Node x-> ...
  • 83
1 vote
1 answer
46 views

How to query transaction details by using the transaction hash on polkadot by using python

Is there something equivalent to w3.eth.getTransaction(txHash), for Substrate based chains using python?
5 votes
1 answer
245 views

How do you burn transaction fees?

For a transaction fee implementation, i would like to burn 40% of transaction fees, send 30% to treasury and 30% to collators. Which pallet do can i use to do this?
1 vote
1 answer
63 views

Substrate call raw transaction

I created a custom function in a custom RPC call to send a raw transaction : fn send_raw_transaction(&self, bytes: Bytes) -> FutureResult<TxHash<P>> { let slice = &bytes....
  • 81
0 votes
1 answer
34 views

EVM transaction gas fees not added to the treasury

I've implemented a POA EVM-Compatible chain using the Frontier node template on branch polkadot-v0.9.22. I've Implemented a DealWithFees struct and let some part of fees be added to a treasury i've ...
1 vote
0 answers
28 views

How do pallet and consensus model/algorithm/infrastructure work together?

Hi guys I am new to blockchain and susbtrate, so these questions would be stupid to you...But I really need some help here... How does substrate ensure anything has been done inside the pallet will ...
1 vote
1 answer
43 views

How to make TransferAll transaction with txwrapper?

We want transfer the entire transferable balance with txwrapper-core. Is there a guide for this? (ex. The value needs to be empty). We make the transaction with txwrapper-core and broadcast it with ...
  • 435
0 votes
2 answers
39 views

SignedExtension Transaction Pool Deduplication

How do I remove duplications of transactions from the transaction pool? I noticed some return a tag in a signed SignedExtension TransactionValidity provides field. However, it is not clear to me how ...
  • 642
2 votes
2 answers
104 views

feeless transactions unsigned vs signed extension

I also notice that implementing feeless transaction are recommended on stack-exchange using an unsigned transactions. Why is it better to implement feeless transactions with an unsigned transaction ...
  • 642
1 vote
1 answer
66 views

Unsigned Transactions vs Signed Extensions

It seems that I can use a signed extension anywhere I can use an unsigned transaction. Can you please explain why I would implement one over the other? How does the transaction lifecycle differ? The ...
  • 642
0 votes
1 answer
35 views

"system:ExtrinsicFailed" error when submitting transactions

I'm trying to call the setName method of nicks pallet: However, when I run click "Signed" I get the error on the right, which is: system:ExtrinsicFailed [{"Module":{"index&...
1 vote
0 answers
11 views

How do i know that from which parachain/app, a particular transaction belongs/coming from? (based on below informatino)

Looking at transaction information i want to know from which parachain it's coming ex : app.parallel.finance, astar, kapex etc etc. { specVersion: "", transactionVersion: "", ...
  • 111
1 vote
0 answers
68 views

Is it possible to make a transaction with my own account?

I'm currently trying to make a transaction using subxt tool. I could generate tx with test sr25519 keyring (Alice, Bob, ...), but I'm not sure I can do this with my account on rococo testnet. I made ...
  • 41
4 votes
1 answer
69 views

How many transactions with equal priority can be imported in one block?

I've been having the problem of transactions not being imported at the same block in a local network. When submitting one transaction from three nodes in a local network at the same time, those ...
2 votes
1 answer
52 views

Are transaction always submitted to non-validator nodes?

Reading the Polkadot docs, I've run into the following statement: Validators should only run the Polkadot binary, and they should not listen on any port other than the configured p2p port. So far, ...
  • 957
0 votes
1 answer
28 views

GSRPC: Check transaction failed?

Context: We are using GSRPC for interacting with a Polkadot Node. We are sending transactions using SubmitAndWatchExtrinsic. Question: How can I detect if the transaction failed? Note: I am aware ...
  • 1
1 vote
1 answer
39 views

Cannot map Enum JSON, unable to find 'aUSD' in token in api.tx.currencies.transfer

I'm trying to transfer aUSD test token from one wallet to another on my dapp using Polkadot.js wallet. Sender's wallet is connected to Mandala TC7 test. I read this at Acala's site and I'm trying to ...
3 votes
1 answer
54 views

Can't get transaction hash from signAndSend of Polkadot.js

I'm new and I'm trying to get the transaction hash but I'm only getting undefined. I used this tutorial and this and below is my code. const txHash = await polkadot.tx.balances .transfer('5F1pZe........
3 votes
0 answers
77 views

Using Custom assets for transaction fees [duplicate]

I am trying to create some custom assets using pallet_assets and I want to pay the transaction fees for some extrinsics using the created custom asset. How can I achieve so ?
0 votes
1 answer
86 views

Get Transactions from wallet address in polkadot.js/api

I want to know how I can get list of transactions and transactions info for specific wallet address in polkadot.js/api, especially for kusama. const provider = new WsProvider("wss://kusama-rpc....