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
32 views

execute_block, initialize_block, apply_extrinsic, finalize_block, offchain_worker exists for struct `Executive` but its trait bound were not satisfied

I developed substrate parachain with custom pallets. Actually I wanna add OCW functionality to one of my pallets. After I updated runtime code and added CreateSignedTransaction implementation I tried ...
Artem Levchuk's user avatar
1 vote
0 answers
48 views

how can i achieve 10000 tps in layer zero polkadot based chain

I have my blockchain deployed on production . i want some addition in my chain. i want my chain to have 10000 tps .How can i achieve that in my current layer0 chain without using multiple parachains ....
Karanvir Singh's user avatar
4 votes
1 answer
60 views

Validation of Transactions Executed in on_finalised Function within the Hook

Will transactions executed within the on_finalised function inside the hook undergo validation by the validators?
Deepak Chaudhary's user avatar
1 vote
1 answer
48 views

Ensuring Priority for Key Transactions in a Substrate Chain

I'm currently working on a substrate chain and have implemented a pallet where off-chain workers submit price data of other chains. My requirement is for these prices to be updated by the workers ...
Matthew M's user avatar
0 votes
1 answer
133 views

Invalid transaction:1010 Invalid: Transaction has a bad signature

I have changed my default multisignature to EthereumSignature. But whenever i'm doing any transaction on metamask then it is working fine and whenever i'm manually signing the transaction with a ...
Arunjot Singh's user avatar
2 votes
0 answers
39 views

Proof-of-Work Substrate Chain with Multiple Validators

I'm working on a Proof-of-Work (POW) substrate chain. Assuming we have four validators, all of which have enabled on-chain workers (OCW), is it accurate to state that each validator's OCW fetches data ...
Deepak Chaudhary's user avatar
1 vote
1 answer
57 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
25 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
59 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
188 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
59 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
28 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
67 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
27 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
24 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
40 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
31 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
19 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
67 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
162 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,683
3 votes
1 answer
78 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
89 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
48 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
85 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
60 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
66 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
272 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?
vadersfather's user avatar
3 votes
1 answer
215 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
2 votes
1 answer
113 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
114 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
125 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
127 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
1 answer
31 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,322
2 votes
1 answer
255 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
77 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,322
2 votes
1 answer
45 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
  • 543
2 votes
2 answers
184 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
67 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
53 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
359 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
98 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,083
1 vote
1 answer
152 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
91 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
25 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,083
1 vote
1 answer
39 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,683
4 votes
1 answer
387 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
  • 475
1 vote
1 answer
73 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
87 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
86 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