Questions tagged [signed-extensions]
The signed-extensions tag has no usage guidance.
30 questions
1
vote
0
answers
20
views
Is it computationally too expensive to verify a signature and perform 2 storage reads within a SignedExtension?
I'm working on a custom SignedExtension that needs to verify certain conditions as part of the transaction validation process (fn validate). The extension performs two key operations:
It verifies a ...
2
votes
1
answer
93
views
How to enable free execution for specific extrinsics using the SkipCheckIfFeeless
Context
I'm currently working on a faucet/claiming pallet that allows new users to claim a certain amount of tokens. We have some logic in place to gatekeep who can receive the tokens, and each user ...
1
vote
0
answers
39
views
Signed Extension validate len parameter
How is the len parameter of the Signed Extension validation function computed?
I tried computing the length with PolkadotJS by getting the length of the encoded call but that does not seem to be the ...
1
vote
1
answer
53
views
How do third party apps handle paying transaction fees for chains using `pallet-asset-tx-payment`
I found the pallet-asset-tx-payment pretty cool and am planning to add this in my runtime. But my concern is the SignedExtension. Adding the ChargeAssetTxPayment in the SignedExtra portion will make ...
3
votes
0
answers
82
views
Transaction fails when using Polkadot extension
We have a customized substrate chain currently running and we are facing some signature issues (repo).
This chain has custom types, custom header and an additional extension to check a parameter ...
3
votes
1
answer
94
views
How to automatically pass the value to custom SignedExtension
For now I have custom SignedExtension in my substrate node:
#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]
#[scale_info(skip_type_params(T))]
pub struct CheckAccount<T> {
...
3
votes
1
answer
116
views
What informations consist of a signature which is generated when siging a transaction payload offline?
From the wiki (https://wiki.polkadot.network/docs/build-transaction-construction),
import { createSignedTx } from "@substrate/txwrapper-polkadot";
// Example code, replace `signWithAlice` ...
1
vote
1
answer
290
views
how to pay transaction fee through custom token?
i am working on substrate i have created a custom token using pallet_assets,how can i configure the transaction_fee using the custom token i have seen the pallet_assets_transaction payment which say'...
3
votes
1
answer
67
views
How to build the browser extension with substrate?
Can we make browser extension with substrate and yes and how ?
can anyone please provide the resource to read about it ?
2
votes
1
answer
55
views
SignedExtension and nested calls
Does the SignedExtension (validate) get executed on a nested call (e.g. sudo.call, scheduler.schedule)? In other words, the call within the call.
2
votes
2
answers
91
views
CheckNonZeroSender
Why is CheckNonZeroSender a signed extension rather than part of the UncheckedExtrinsic::check() when checking the payload for a bad proof? What exactly does the non-zero check do? It appears to be ...
2
votes
1
answer
240
views
Informing polkadot/api about additional signed extensions
Polkadot/api has a way to detail signed extensions and I want to understand (so I can use it for our own custom signed extension) what the extrinsic and payload parameters map to.
Here's an example ...
4
votes
2
answers
237
views
Difference between SignedExtension default behavior vs. actual behavior (expand_outer_validate_unsigned)
We're trying to understand the signed transaction vs. unsigned transaction lifecycle, and what ensure_signed actually does for you.
What it seemed was, if you submitted an unsigned transaction to our ...
5
votes
2
answers
195
views
SignedExtension to mutate Origin
Please see edits 2 and beyond, as they reshape the question a lot.
TLDR: I need a way to mutate an origin for all but some specific calls so that it's dispatched as RawOrigin::Signed to pass ...
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 ...
0
votes
1
answer
120
views
How can I check origin in a SignedExtension?
How can I check the origin in a SignedExtension?
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 ...
3
votes
1
answer
134
views
Transaction Prioritization
My understanding is that the Transaction-Payment Pallet prioritizes transactions based on tip, weight and length of the transaction. ChargeTransactionPayment::get_priority uses this data to give ...
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 ...
3
votes
2
answers
117
views
How does one block specific accounts from calling extrinsics for a substrate pallet?
We want the ability to filter certain accounts from calling extrinsics in the democracy pallet. There are more details but basically we can't do this by reserving token balance or we would do that.
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
1
vote
1
answer
84
views
The era of Sign with no submission action is different than submit
I'm using a ed-25519 account, and first sign with no submission, and use the 「Signed transaction」to decode, the result(right pic) show the era Period is 0x40...
then I do a real submit, but the ...
3
votes
1
answer
66
views
Why signature diverse with same additon signed of SignedExtension?
I have a same call with same era,nonce,tip, and a same signer. the SignedPayload is construct by call and Extra(era,nonce,tip here), so the payload should be unchanged. but in polkadot.js I checked ...
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 ...