Skip to content

Conversation

Klapeyron
Copy link
Contributor

@Klapeyron Klapeyron commented Aug 12, 2025

Description

This PR migrates SignedExtensions to TransactionExtensions.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages.
  • The size limit of 400 LOC isn't needlessly exceeded
  • The PR refers to a JIRA ticket (if one exists)
  • New tests are added if needed and existing tests are updated.
  • New code is documented and existing documentation is updated.
  • Relevant logging and metrics added
  • Any changes are noted in the changelog.md for affected crate
  • Self-reviewed the diff

@Klapeyron Klapeyron self-assigned this Aug 12, 2025
@Klapeyron Klapeyron force-pushed the transaction_extension_migration branch 2 times, most recently from 00667e8 to 336c081 Compare August 12, 2025 08:29
@Klapeyron Klapeyron marked this pull request as ready for review August 12, 2025 08:57
Copy link
Contributor

@AmbientTea AmbientTea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide some context for these changes and why we need them?

@Klapeyron Klapeyron force-pushed the transaction_extension_migration branch from 336c081 to f2ddb3c Compare August 12, 2025 18:52
@Klapeyron
Copy link
Contributor Author

It is a building block for possible features we may implement around this functionality. In the past, SignedExtensions didn't had a notion of a weight, so by design had to be cheap in execution. Now it is changing, so we can write custom extensions that may add additional data to the extrinsics and perform additional computation while transaction is in the transaction queue, for instance modify origin that will be used to dispatch this extrinsic.
Out of already implemented extensions are for instance options to pay for transaction fees with custom tokens,not paying for dispatch for certain origins or converting ethereum transactions to substrate ones etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants