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

Fix transaction extension for tuple of tuples or other nested structure. #7023

Closed
wants to merge 2 commits into from

Conversation

gui1117
Copy link
Contributor

@gui1117 gui1117 commented Jan 1, 2025

This PR introduce a new method in the TransactionExtension trait: fn validate_pipeline.
This method is similar as fn validate but with 3 arguments for implication:

  • inherited_tx_implication: The implication not part of the transaction extensions. E.g. the call and the version of the transaction.
  • inherited_tx_ext_explicit_implication: The explicit implications of the transaction extensions in the pipeline.
  • inherited_tx_ext_implicit_implication: The implicit implications of the transaction extensions in the pipeline.

This allows tuple to forward implication correctly, making (A, B, C) equivalent to (A, (B, C)).

I think this is better than having tuple compiling but still breaking user interface silently.

An alternative would be #6571 : a new struct that allow to have long pipeline. But people using tuple would still make the implication order broken.

@gui1117
Copy link
Contributor Author

gui1117 commented Jan 1, 2025

/cmd prdoc --audience runtime_dev runtime_user

@gui1117 gui1117 added the T17-primitives Changes to primitives that are not covered by any other label. label Jan 1, 2025
@gui1117
Copy link
Contributor Author

gui1117 commented Jan 1, 2025

I think a better solution is to bound like a Implication trait to implication so it can be separated into parts.

I will do

@gui1117 gui1117 closed this Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T17-primitives Changes to primitives that are not covered by any other label.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant