Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a transaction extension version #99

Merged
merged 7 commits into from
Jul 23, 2024

Conversation

bkchr
Copy link
Contributor

@bkchr bkchr commented Jul 3, 2024

This RFC proposes to introduce a transaction extensions version. It is proposed to piggyback on RFC84 to not require a new extrinsic format version. With this RFC it will be possible to change the transaction extensions without breaking the extrinsic format of a chain and thus, staying backwards compatible.

bkchr added 2 commits July 3, 2024 15:47
This RFC proposes to introduce a transaction extensions version. It is proposed to piggyback on [RFC84](paritytech/polkadot-sdk#2415) to not require a new extrinsic format version. With this RFC it will be possible to change the transaction extensions without breaking the extrinsic format of a chain and thus, staying backwards compatible.
Copy link
Contributor

@muharem muharem left a comment

Choose a reason for hiding this comment

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

If there is a new version, the client still has to support it, and the tx with old version and extension set is invalid for the runtime.
Thus the version only helps a client to prepare in advance for the new extension set.
I think the same can be achieved by a client with a chain's metadata, since it contains the list of extensions identifiers.
What am I missing?

@bkchr
Copy link
Contributor Author

bkchr commented Jul 3, 2024

If there is a new version, the client still has to support it, and the tx with old version and extension set is invalid for the runtime.

No. The runtime would basically introduce code like this:

match extension_version {
   1 => (Ext1),
   2 => (Ext1, Ext2),
}

(highly simplified :P)

Then the runtime can decode correctly using the correct set of extensions.

I think the same can be achieved by a client with a chain's metadata, since it contains the list of extensions identifiers.
What am I missing?

If you for example introduce a new transaction extension that the client doesn't know, it can not encode the correct transaction.

@muharem
Copy link
Contributor

muharem commented Jul 3, 2024

@bkchr make sense to me. runtime basically will support at least a previous version for some time if there is no security concern. may be worth mentioning this in the RFC.

@bkchr
Copy link
Contributor Author

bkchr commented Jul 3, 2024

may be worth mentioning this in the RFC.

@muharem added a sentence. Do you think this is enough or should I add more details?

Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

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

Looks good. Just naming nits.

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@bkchr
Copy link
Contributor Author

bkchr commented Jul 18, 2024

/rfc propose

@paritytech-rfc-bot
Copy link
Contributor

Hey @bkchr, here is a link you can use to create the referendum aiming to approve this RFC number 0099.

Instructions
  1. Open the link.

  2. Switch to the Submission tab.

  1. Adjust the transaction if needed (for example, the proposal Origin).

  2. Submit the Transaction


It is based on commit hash ed7f6784fd498648fd5ec51b55569f1661a47157.

The proposed remark text is: RFC_APPROVE(0099,7a44a11883527adcccc8bcbe09c7d1a27cdd816118fb9dae1ca56a0f593eeead).

@bkchr
Copy link
Contributor Author

bkchr commented Jul 18, 2024

/rfc propose

@paritytech-rfc-bot
Copy link
Contributor

Hey @bkchr, here is a link you can use to create the referendum aiming to approve this RFC number 0099.

Instructions
  1. Open the link.

  2. Switch to the Submission tab.

  1. Adjust the transaction if needed (for example, the proposal Origin).

  2. Submit the Transaction


It is based on commit hash 03fdf39991a1da18835fc3ae2cf4ce849d47e74b.

The proposed remark text is: RFC_APPROVE(0099,5459271b6b59d0c9337c12e0b631da8a2bd5f58e4eee91894c2a2b12eeb860d5).

Copy link

Voting for this referenda is ongoing.

Vote for it here

Copy link

PR can be merged.

Write the following command to trigger the bot

/rfc process 0x5cc6611824cd9f2da84db94f15d931476598834f0f073f0618c795f78ee815f8

@shawntabrizi
Copy link
Member

/rfc process 0x5cc6611824cd9f2da84db94f15d931476598834f0f073f0618c795f78ee815f8

@paritytech-rfc-bot paritytech-rfc-bot bot merged commit e26c3d6 into main Jul 23, 2024
@paritytech-rfc-bot
Copy link
Contributor

The on-chain referendum has approved the RFC.

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

Successfully merging this pull request may close these issues.

8 participants