Skip to main content

All Questions

Filter by
Sorted by
Tagged with
10 votes
2 answers
696 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
3 votes
1 answer
102 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
2 votes
2 answers
188 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 ...
Yatusabes's user avatar
  • 788
2 votes
1 answer
67 views

How does the `TaggedTransactionQueue` runtime API know what parts of the encoded call to check?

The transaction pool regularly calls the validate_unsigned function of the SignedExtension trait to check transaction validity against current state. This trait then gets used to implement custom ...
Sacha Lansky's user avatar
  • 2,650
1 vote
1 answer
208 views

Pre-dispatch Error

I took a look at the check-weight SignedExtention to see what happens when a block is full. It appears that it returns an error InvalidTransaction::ExhaustsResources. It think it puts it back into the ...
Yatusabes's user avatar
  • 788
1 vote
1 answer
153 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 ...
Yatusabes's user avatar
  • 788
1 vote
1 answer
63 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
  • 788
1 vote
1 answer
103 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 ...
Yatusabes's user avatar
  • 788
1 vote
1 answer
120 views

Transaction pool and Signed Extension Pre dispatch

My understanding is that when a transaction arrives it gets validated against all signed extensions. If the transaction is valid it then moves into the ready queue or future queue depending on the ...
Yatusabes's user avatar
  • 788
0 votes
1 answer
120 views

How can I check origin in a SignedExtension?

How can I check the origin in a SignedExtension?
Yatusabes's user avatar
  • 788
0 votes
2 answers
94 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 ...
Yatusabes's user avatar
  • 788
0 votes
2 answers
120 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 ...
Yatusabes's user avatar
  • 788