Questions tagged [transactions]
Questions about transactions, including signed and unsigned extrinsics, transaction formats, transaction pools and constructing transactions.
142 questions
1
vote
1
answer
20
views
How to Prevent Total Issuance Reduction After the Transactions in a Substrate Chain?
In my Substrate solo chain, the total issuance starts at 80,000,000,100,000,000,000,000,000. After the first transaction, it drops to 80,000,000,099,999,999,729,766,850.
I understand this could be ...
0
votes
0
answers
10
views
Signing transaction payload with private key
The question is how to sign a transaction payload with a private key and send it to the chain. We are compiling an extrinsic:
const keyring = new Keyring({ type: "ed25519" });
const ...
1
vote
1
answer
19
views
Ensuring Accurate Extrinsic IDs for Asset Transfers on AssetHub
I'm submitting asset transfer transactions on AssetHub using the submit and watch method. Immediately after submitting a transaction, I retrieve the block hash in which it was supposedly included. I ...
1
vote
0
answers
28
views
How to solve this invalid block issue after sending a Transaction?
I'm experiencing a strange issue: occasionally, I get an invalid block error after trying to submit an extrinsic in my node. I created a script that runs 300 transfer transactions sequentially, ...
1
vote
0
answers
49
views
Invalid transaction & Transaction has a bad signature
I'm trying to adjust my implementation to the recent runtime changes
CheckMetadataHash. I added the mode in the transaction and both the metadatahash and the mode parameter in the payload that is sign ...
0
votes
0
answers
10
views
same extrinsic hash but different transaction and transaction broadcast issue
Is it possible for different transactions to have the same txid? My address on Polkadot is
https://polkadot.subscan.io/account/16iAvH56VJWsZDU2cRZUPY9RPRcf5pvmB93PfpJ6fDx5Wvdq?tab=transfer
. Among ...
0
votes
1
answer
33
views
KSM, WND transfer transaction fail, but DOT success
I used the same program, the same fullnode version, and the same Substrate API sidecar version to submit transfer transactions for DOT, KSM, and WND. Only DOT was successful. Two months ago, DOT, KSM, ...
0
votes
1
answer
16
views
how to create multising account using polkadot extrinsics?
I have been working with multsig wallets i am able to create account using polkadot ui and use it to sign transaction, but i am not able to create account using extrinsics can you please tell how to ...
3
votes
1
answer
71
views
Substrate node not propagating transactions
So we have a very strange bug that is happening when sending transaction to a substrate (crust node in this instance). We are sending signed transaction to a crust node via polkadot.js as such:
const ...
1
vote
1
answer
28
views
How to integrate Subxt with frontier?
I want the transaction to be happen through subxt on frontier node template.
I'm getting this error in this process:
Metadata error: The generated code is not compatible with the node
How to solve ...
0
votes
1
answer
49
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 ...
1
vote
0
answers
56
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 ....
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?
1
vote
1
answer
55
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 ...
0
votes
1
answer
252
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 ...
2
votes
0
answers
46
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 ...
1
vote
1
answer
68
views
What is the use case for inherent transactions?
Just for curiosity!
In what conditions we can use Inherent transactions?
Thanks
5
votes
0
answers
62
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 ...
1
vote
1
answer
233
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?
1
vote
1
answer
71
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 ...
0
votes
0
answers
29
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 ...
3
votes
1
answer
92
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 ...
0
votes
1
answer
32
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 ...
1
vote
2
answers
43
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(...
3
votes
0
answers
32
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 ...
3
votes
1
answer
75
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 ...
5
votes
1
answer
233
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 ...
3
votes
1
answer
85
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....
2
votes
1
answer
97
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 ...
2
votes
1
answer
54
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 ...
3
votes
2
answers
104
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? ...
4
votes
1
answer
64
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 ...
6
votes
2
answers
74
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.
...
4
votes
1
answer
292
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, ...
1
vote
1
answer
37
views
How to disable "tips" with Aura?
How can transaction tips be disabled or configured (say, limited) with Aura consensus?
3
votes
1
answer
259
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 ...
2
votes
1
answer
132
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/...
1
vote
1
answer
133
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 ...
4
votes
1
answer
134
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 ...
3
votes
2
answers
128
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.
0
votes
1
answer
39
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 ...
2
votes
1
answer
301
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 ...
2
votes
1
answer
82
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 ...
2
votes
1
answer
49
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 ...
2
votes
2
answers
198
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 ...
1
vote
1
answer
72
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-...
1
vote
1
answer
55
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
408
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 ...
1
vote
1
answer
99
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'...
1
vote
1
answer
166
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?