Skip to main content

Questions tagged [transactions]

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

Filter by
Sorted by
Tagged with
16 votes
5 answers
1k views

Is there a good indexer for substrate chains (like the graph)?

If we want to ask lots of queries about chain state (for example users activity over time etc.) is there a recommended or de-facto way of doing it? Ethereum has 'the graph' for example as a high ...
Squirrel's user avatar
  • 3,849
10 votes
2 answers
293 views

Transaction rollback in Substrate

As we know transactions on Ethereum are atomic. If something throws, everything rolls back. Do we have something similar in Substrate? Or all changes I should manually revert?
Boris Ivanov's user avatar
10 votes
2 answers
666 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 ...
Dan Forbes's user avatar
9 votes
2 answers
1k 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....
Bruno's user avatar
  • 8,315
9 votes
1 answer
111 views

Can nonces be skipped in Polkadot/ Kusama

In Ethereum, clients must monitor for the successful progpagation of transactions (each with a nonce) in order to broadcast a new transaction (with a later nonce). If, due to low gas or some other ...
mork's user avatar
  • 141
9 votes
1 answer
128 views

Can an account's transactions be front-run on Polkadot? If so, how?

Is it possible to reliably monitor an account and receive information about a transaction of that account before the transaction is InBlock and then front-run that transaction by issuing a ...
mkl's user avatar
  • 344
9 votes
1 answer
250 views

Single node performance

I've a couple of questions: I'm running a the node-template on a machine that has 8 cores and 64GB of RAM and its using an SSD. I have some pallets working there and I'm using the python client to ...
andresvsm's user avatar
  • 1,114
8 votes
2 answers
458 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 ...
SANG HYUN RHEE's user avatar
8 votes
2 answers
702 views

Transactions lifecycle

I was wondering what is the process of a transaction being removed or dropped from a transaction pool. When a transaction is submitted to the network, It is validated by a node and then gossiped to ...
andresvsm's user avatar
  • 1,114
6 votes
2 answers
367 views

Get account transactions using Substrate API

I think Substrate API is really messy and difficult to understand. How could I get all the transactions for an account? And getting account by address is also counterintuitive: you need to make a ...
Holmes's user avatar
  • 63
6 votes
2 answers
693 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 ...
dominique's user avatar
  • 1,693
6 votes
1 answer
382 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
6 votes
1 answer
81 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 ...
dominique's user avatar
  • 1,693
6 votes
1 answer
343 views

Transaction pool extrinsic prioritization

Currently, the transaction pool in Astar network is full with a lot of unsigned EVM transactions, which cause user transactions sent without a tip to be stuck. We are currently researching a way to ...
Valentun's user avatar
  • 220
6 votes
2 answers
71 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
5 votes
2 answers
371 views

How to find how many transactions are pending from address to be added to block?

In my application, I need to fire multiple transactions from same address, and want to create statusCheck() function, which will let me know how many transactions of total are still pending to be ...
pravin k's user avatar
  • 111
5 votes
1 answer
290 views

What is unique about Substrate's transaction pool?

Every blockchain has different implementations of a transaction pool, which does the job of checking transaction validity before transactions are included by block authors. In Substrate it is possible ...
Sacha Lansky's user avatar
  • 2,640
5 votes
1 answer
205 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,693
5 votes
1 answer
127 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, ...
andresvsm's user avatar
  • 1,114
5 votes
2 answers
198 views

How to use Polkadot.js API for governance proxy call correctly?

I am trying to create a JS code to be able to vote using proxy account that has been given democracy permissions to stash account, so I would be able to vote using just my mobile phone instead of ...
hitchhooker's user avatar
5 votes
1 answer
346 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?
Ramsey - Decentration's user avatar
5 votes
0 answers
60 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
4 votes
1 answer
62 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
4 votes
1 answer
406 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
  • 523
4 votes
1 answer
224 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........
ratib90486's user avatar
4 votes
1 answer
278 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
4 votes
1 answer
197 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....
Yatusabes's user avatar
  • 776
4 votes
1 answer
130 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
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
4 votes
1 answer
505 views

How to check the status of a transaction (after sending)

I'm aware of using a callback in signAndSend or sign to verify if a transaction is finalized (like here: https://polkadot.js.org/docs/api/start/api.tx.subs/). Is there a way to do this after the ...
Michael Ramuta's user avatar
4 votes
1 answer
96 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 ...
Oleksandr Mykhailenko's user avatar
4 votes
1 answer
63 views

How can I intercept a transaction in pallet_balance?

In what way can I intercept a transfer in pallet_balance? For example, I would like to check that the user has an identity in pallet_identity before completing a transfer with pallet_balance.
Huy Duan Tran's user avatar
3 votes
2 answers
77 views

get object's state after a potential transaction

Is there a way in polkadot js api to be able to get the state of an object after a transaction if it is applied in the future? Is there a way in Substrate to apply a transaction(or its past ...
cocokick's user avatar
  • 165
3 votes
1 answer
231 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
3 votes
1 answer
112 views

How can one estimate the transaction throughput of a substrate chain?

I am interested in measuring/estimating the transaction throughput of my chain. How should I start?
Purple_Turtle's user avatar
3 votes
1 answer
98 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 ...
Justin Frevert's user avatar
3 votes
2 answers
153 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 ...
K. Lane's user avatar
  • 61
3 votes
1 answer
82 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
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.
olliecorbs's user avatar
3 votes
1 answer
77 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
Web3 Philosopher's user avatar
3 votes
1 answer
85 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
3 votes
1 answer
99 views

Signature getting rejected by node when submitting a balance transfer on Westend

I'm involved in a .NET substrate-based project and I started working towards an implementation for making balance transfers on Substrate. I would swear that I'm doing everything exactly the same way ...
georgiosd's user avatar
  • 277
3 votes
1 answer
476 views

Cannot sign with a locked key pair Error

I create my signer wallet as follows: const seed = bip39.mnemonicToSeedSync(WALLET_MNEMONIC, WALLET_PASSWORD); const privateKeyBuffer = bip32 .fromSeed(seed) .derivePath(`m/44'/434'/0'/0/0`)....
kamaci's user avatar
  • 161
3 votes
3 answers
153 views

Query node for full history of an account's extrinsic/transaction records

I'm trying to get transaction history (ie. transfers) using just the account id. From my understanding the only way this can be done is if you go through every single block and look up the transaction ...
Rachel's user avatar
  • 31
3 votes
1 answer
73 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
3 votes
2 answers
94 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
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
3 votes
0 answers
103 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 ?
Eric Segall's user avatar
2 votes
1 answer
120 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
2 votes
1 answer
286 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