Skip to main content

Questions tagged [signed-extensions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
10 votes
2 answers
665 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
5 votes
2 answers
191 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 ...
Gabe's user avatar
  • 115
4 votes
2 answers
222 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 ...
Shannon Wells'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
115 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. ...
Shannon Wells's user avatar
3 votes
1 answer
63 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 ...
zqhxuyuan's user avatar
  • 205
3 votes
1 answer
65 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 ?
Deepak Chaudhary's user avatar
3 votes
1 answer
125 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 ...
Yatusabes's user avatar
  • 776
3 votes
1 answer
90 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> { ...
Danylo Kyrieiev's user avatar
3 votes
1 answer
103 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` ...
drhanlondon's user avatar
3 votes
0 answers
74 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 ...
Leouarz's user avatar
  • 353
2 votes
2 answers
180 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
  • 776
2 votes
1 answer
87 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 ...
Just's user avatar
  • 23
2 votes
2 answers
86 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 ...
Robert La Ferla's user avatar
2 votes
1 answer
65 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,640
2 votes
1 answer
53 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.
Daan van der Plas's user avatar
2 votes
1 answer
217 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 ...
Wil W's user avatar
  • 433
1 vote
1 answer
197 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
  • 776
1 vote
1 answer
148 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
  • 776
1 vote
1 answer
52 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 ...
Jitterbug's user avatar
  • 219
1 vote
1 answer
283 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'...
Amit Kumar Yadav's user avatar
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 ...
zqhxuyuan's user avatar
  • 205
1 vote
1 answer
60 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
  • 776
1 vote
1 answer
91 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
  • 776
1 vote
1 answer
116 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
  • 776
1 vote
0 answers
37 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 ...
Yatusabes's user avatar
  • 776
0 votes
1 answer
117 views

How can I check origin in a SignedExtension?

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