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

Change for RFC-0078: Merkleized Metadata #1585

Merged
merged 5 commits into from
Sep 9, 2024

Conversation

GuiGou12358
Copy link
Contributor

Add new fields (mode + metadata_hash) when submitting a transaction.
These fields have been included by RFC78 for signed extension.

  • mode: Included in the extrinsic. The mode is either 0 which means to not include the metadata_hash in the signed data or the mode is 1 to include the metadata_hash in V1.
  • metadata_hash: Included in the signed data. Depending on the mode the value is either None or Some(metadata_hash).

More information here: https://polkadot-fellows.github.io/RFCs/approved/0078-merkleized-metadata.html#inclusion-in-an-extrinsic

);
let extra = (era, Compact(nonce), Compact(tip));
let extra = (era, Compact(nonce), Compact(tip), mode);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this backward compatible?

Copy link
Contributor Author

@GuiGou12358 GuiGou12358 Sep 2, 2024

Choose a reason for hiding this comment

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

The current version doesn't work anymore with the polkadot-felowship upgrade. To check, you can run the test with --ignored and --test-threads=1 options. The tests will fail on Shibuya. We also fail to connect
to Shiden and Astar.
This pr fixes the issue.
So it is not backward compatible with the previous nodes but I assume all nodes will be upgraded or are already upgraded (Shiden and Astar have been upgraded).

Copy link
Collaborator

Choose a reason for hiding this comment

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

So it is not backward compatible with the previous nodes but I assume all nodes will be upgraded or are already upgraded (Shiden and Astar have been upgraded).

Sounds OK to me.

@h4x3rotab
Copy link
Contributor

Thank you so much! Does this PR also include the universal Ledger app support?

@GuiGou12358
Copy link
Contributor Author

Thank you so much! Does this PR also include the universal Ledger app support?

Indeed mode and metadata_hash have been added to the extrinsic or in the signed data for this purpose.
But the feature is not enabled yet on Astar. For the time being, the mode is always 0 and metadata_hash is always None.

@kvinwang kvinwang merged commit 5e59e74 into Phala-Network:master Sep 9, 2024
8 checks passed
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.

3 participants