Questions tagged [transactions]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

What is the use case for inherent transactions?

Just for curiosity! In what conditions we can use Inherent transactions? Thanks
Deepak Chaudhary'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
5 votes
0 answers
51 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
1 vote
1 answer
111 views

How to calculate TPS for a substrate based chain?

Let's say we have a 2 node network with PoA as consensus. In that case how to calculate TPS of this chain specifically?
Immanuel John's user avatar
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
0 votes
0 answers
25 views

How can one design and implement a fee rule?

I hope you are doing well! How can one design and implement a fee rule on a substrate-based blockchain that is contingent on the transaction payment value? I would like to create this fee rule based ...
Zacksys ME's user avatar
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
0 votes
1 answer
19 views

westend network try to send transfer transaction but fail

my westend account is 5G7NsFf3MqwEKSbuo52d2Y9RaaiMQ3akXzSWpSvgUYq3ZEsm. it shows I have 0.02 WND, and I try to use Balances.transfer or transfer_allow_death 0.0035 WND to another account. So I send ...
Bomax Chen's user avatar
0 votes
0 answers
16 views

batchall.sign throws TypeError: Cannot read properties of undefined (reading 'specVersion')

Trying to form a batchAll command that carries out 2 activities: Deposit 1 GLMR from wallet1 to wallet2 Cancel tokens' delegation revoke When I try to sign the batch with wallet1 (batchAllExtrinsic....
J B's user avatar
  • 1
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
3 votes
0 answers
29 views

ink dapp asking to sign transactions everytime i reload

so i am building a dapp with ink it has messages to get data and put data and on FE when i logged in with the polkadot-js extension wallet everytime i reload the page it asks me to sign the ...
rahul's user avatar
  • 133
0 votes
0 answers
14 views

Unit testing an extrinsic submitted by an Offchain Worker?

As far as I could understand so far there is no a "normal" way to test extrinsics submitted by an Offchain Worker, rather a substitute transaction pool is involved. However it is possible to ...
Yury Yukhananov's user avatar
3 votes
1 answer
55 views

Transaction lifecycle substrate, Polkadot

I'm learning about transaction lifecycle in substrate docs, I saw the diagram but I don't understand the flow operation of this diagram. Please, let's explain the flow operation of the transaction ...
Dung Nguyen's user avatar
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
71 views

Problem deploying smart contract on rococo

I have been following the public documentation of polkadot API to deploy contract: https://polkadot.js.org/docs/api-contract/start/code but I'm getting error Uncaught (in promise) TypeError: code.tx....
Nikola Bozin's user avatar
2 votes
1 answer
58 views

AccountId in offchain worker

I'm working on Substrate based project. In the project, each blockchain validator has an offchain worker. author_insertKey() is used to set up a key so the offchain worker can sign transactions. Each ...
Maksim Ramanenkau's user avatar
2 votes
1 answer
39 views

Are Transaction Pool and Transaction Queue the same thing?

Was going through documentation of Substrate. I came across transaction lifecycle. https://docs.substrate.io/learn/transaction-lifecycle/ I'm confused about one line it which says "The ...
Arjun's user avatar
  • 317
3 votes
2 answers
57 views

Simulate transaction before sending

So lets say I have an unsigned transaction. Is there any way I can simulate the transaction without actually sending it to the chain to see if the transaction will fail or if it will be succesfull? ...
Tadej Vengust's user avatar
4 votes
1 answer
54 views

Are on_idle hooks transactional?

Trying to call a function marked as #[require_transactional] from on_idle() hook triggers the error Err : Transactional(NoLayer). I realise the transactional macro is optional for extrinsics and the ...
nexot14640's user avatar
6 votes
2 answers
62 views

Efficiently limit NFT transfers to members of a group

What is/are the preferred approach/es (crates, pallets, etc.) to efficiently limiting NFT transfers to members of a group? Here efficiently refers to the resources consumed to execute the transfer. ...
Begley Brothers Inc'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
1 vote
1 answer
36 views

How to disable "tips" with Aura?

How can transaction tips be disabled or configured (say, limited) with Aura consensus?
lovelikelando's user avatar
3 votes
1 answer
158 views

How to make rawTransaction? and Can I get some guide or reference about offchain sign?

[Question] How can I make raw-transaction(unsigned-transaction) with essential parameter(fromAddress, toAddress, value, nonce, fee etc)? I want to know low-level algorithm. What kind of Cryptography ...
지상범's user avatar
0 votes
0 answers
25 views

A question about the dot browser display

Will all types of transactions for which the user receives a dot amount be displayed on this browser page https://polkadot.subscan.io/account/*? Are there any transaction types that are not displayed, ...
Rose's user avatar
  • 305
1 vote
1 answer
95 views

Creating offline transaction for parachains

From my research of how to generate and sign transactions offline I found docs: https://wiki.polkadot.network/docs/build-transaction-construction citing txwrapper-core: https://github.com/paritytech/...
Tadej Vengust's user avatar
1 vote
1 answer
88 views

How to get the payload from a polkadot-js transaction

I'm wondering what are the possible ways to extract the payload from a polkadot-js transaction. So far the only way seems to be to define a custom signer that implements the Signer interface and then ...
Hamid's user avatar
  • 101
4 votes
1 answer
104 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 ...
Tadej Vengust's user avatar
3 votes
2 answers
120 views

Is there anyway to tell if a transaction was submitted by a light client on a substrate blockchain?

Interested in calculating the number of transactions submitted by type of node. Ie seeing how many transactions are originating from light clients vs full-nodes.
olliecorbs's user avatar
0 votes
0 answers
19 views

How to apply a custom transaction fee to specific accounts for a given number of blocks?

For example, if you have built a custom Substrate-based chain and added Substrate pallets to enable on-chain governance (i.e. pallet_democracy, pallet_referenda). How would you apply a custom ...
Luke Schoen's user avatar
  • 2,292
0 votes
1 answer
29 views

How to split the overall transaction fees associated with an on-chain proposal that passes amongst its creator and voters?

If you have built a custom Substrate-based chain and added Substrate pallets to enable on-chain governance (i.e. pallet_democracy, pallet_referenda). How would you split the costs between participants ...
Luke Schoen's user avatar
  • 2,292
2 votes
1 answer
206 views

Best practices for generating and monitoring transactions

So I am building a service that will be creating high amount of transactions on different substrate base chains. The infrastructure I have in mind is having microservices that will generate ...
Tadej Vengust's user avatar
2 votes
1 answer
70 views

How to reduce spam risk if tx fees are paid with exotic assets instead of native tokens and tx fee overpayment refunds are in native tokens?

This pull request appears to expose arbitrage and spam opportunities, as it proposes to modify the Substrate frame DEX pallet to allow users to use an exotic asset for transaction fees instead of the ...
Luke Schoen's user avatar
  • 2,292
2 votes
1 answer
41 views

What is the intended purpose of `sudo_as` from the sudo pallet?

I ask myself, why this extrinsic (https://github.com/paritytech/substrate/blob/e9b0facf70eeb08032cc7e83548c62f0b4a24bb1/frame/sudo/src/lib.rs#L224-L263) exists? I mean the sudo key could execute any ...
Chralt's user avatar
  • 503
1 vote
2 answers
137 views

How To Adjust The Fees On A Running Substrate Chain?

Fees for transactions in our test net are too high and we would like to adjust them to be some factor lower across the board. Is there a simple way to do that using a call from the Polkadot.js apps ...
KathrynColleen's user avatar
1 vote
1 answer
59 views

Transaction fees withdraw/deposit in

I made transactions on a simple EVM DEX contract. I initially called the approve method which only triggered balances.withdraw event. I understand that this event is triggered as calling this write-...
Bukks's user avatar
  • 304
1 vote
1 answer
46 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 ...
aang114's user avatar
  • 43
6 votes
1 answer
290 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 ...
jpataylor's user avatar
  • 321
1 vote
1 answer
90 views

how to transform OpaqueExtrinsic to get the variables within the transaciton?

I'm 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 I'...
dadzerlaze's user avatar
  • 1,073
1 vote
1 answer
123 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?
Luker501's user avatar
0 votes
1 answer
77 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 ...
Robert La Ferla's user avatar
1 vote
1 answer
24 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)?
dadzerlaze's user avatar
  • 1,073
1 vote
1 answer
38 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 ...
dominique's user avatar
  • 1,633
4 votes
1 answer
351 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/...
Boleng's user avatar
  • 413
1 vote
1 answer
68 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 ...
Purple_Turtle's user avatar
1 vote
1 answer
67 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 ...
Purple_Turtle's user avatar
2 votes
1 answer
73 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 ...
Dubs's user avatar
  • 294
0 votes
2 answers
211 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: ...
Rusty Pythonic Script's user avatar
1 vote
1 answer
749 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
CocDap's user avatar
  • 616
1 vote
1 answer
43 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 ...
Yatusabes's user avatar
  • 766
0 votes
1 answer
112 views

How can I check origin in a SignedExtension?

How can I check the origin in a SignedExtension?
Yatusabes's user avatar
  • 766