-
Notifications
You must be signed in to change notification settings - Fork 6
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
Investigate Extrinsic Signing Issue for LAOS Metadata Version 15 #710
Comments
Dani has a Telegram room with Telegram |
Hi @asiniscalchi, Talisman engineering team here - thanks for following up on this. Please keep us up to date. |
Hi @chidg I’ve been investigating this issue, and I’ve found that it is not intentional for the Actually, I have a question: when you mention signing on LAOS with metadata V15, what exactly do you mean? Our metadata is V14, or am I mistaken? |
Hey @magecnion! I recommend giving this post a quick read for an overview on the v15 format: https://forum.polkadot.network/t/stablising-v15-metadata/2819 The It seems that the v15 format introduces some extrinsic type information that for v14 would have been hardcoded into the client library: paritytech/substrate#12929 I guess for Laos there may be something inconsistent between the extrinsic signature type as encoded into the metadata, and the code which verifies submitted signatures? And perhaps this inconsistency wouldn’t have been noticed before when for v14 the client had to assume some details for the signature type. |
The Laos signature type |
Whereas it seems Moonbeam have their own |
Good observations @alecdwm. We use a previous version of Frontier that doesn't actually implement We recently updated our dependencies to a newer version, in which Frontier does include the previously mentioned implementation |
Oh whoops - 66 bytes is the
Hey @magecnion! Here's the extrinsic signature type in the v15 metadata for Laos in prod:
[
{
"id": 406,
"type": {
"path": ["fp_account", "EthereumSignature"],
"params": [],
"def": { "composite": { "fields": [{ "name": null, "type": 407, "typeName": "ecdsa::Signature", "docs": [] }] } },
"docs": []
}
},
{
"id": 407,
"type": {
"path": ["sp_core", "ecdsa", "Signature"],
"params": [],
"def": { "composite": { "fields": [{ "name": null, "type": 408, "typeName": "[u8; 65]", "docs": [] }] } },
"docs": []
}
},
{ "id": 408, "type": { "path": [], "params": [], "def": { "array": { "len": 65, "type": 2 } }, "docs": [] } }
] Versus the extrinsic signature type in that new metadata: [
{
"id": 442,
"type": {
"path": ["fp_account", "EthereumSignature"],
"def": { "composite": { "fields": [{ "type": 443, "typeName": "ecdsa::Signature" }] } }
}
},
{ "id": 443, "type": { "def": { "array": { "len": 65, "type": 2 } } } }
]
Happy to test it out though - is the new runtime deployed anywhere e.g. on a testnet? |
No dice! Still getting the same error in prod: Although I'll admit that I'm more confused than ever as to why Here's Moonbeam's v15 metadata for the extrinsic signature type, for comparison: [
{
"id": 187,
"type": {
"path": ["account", "EthereumSignature"],
"params": [],
"def": { "composite": { "fields": [{ "name": null, "type": 188, "typeName": "ecdsa::Signature", "docs": [] }] } },
"docs": []
}
},
{
"id": 188,
"type": {
"path": ["sp_core", "ecdsa", "Signature"],
"params": [],
"def": {
"composite": {
"fields": [{ "name": null, "type": 189, "typeName": "[u8; SIGNATURE_SERIALIZED_SIZE]", "docs": [] }]
}
},
"docs": []
}
},
{ "id": 189, "type": { "path": [], "params": [], "def": { "array": { "len": 65, "type": 2 } }, "docs": [] } }
] It looks the same as Laos to me 🤔 |
@alecdwm, could you test this out on the testnet that has the new runtime with the upgraded dependencies? This is the endpoint: |
@magecnion Same error on |
@alecdwm, I'll look into it further and let you know. Is there a script I can use to test the same scenario as yours? |
I'll set one up and get back to you asap! Edit: |
Hey @magecnion, I'm pretty sure we also set the signature type in Talisman:
That being said, there's still some differences between this how example codebase and Talisman are creating the extrinsic. |
@alecdwm any updates? I'm happy to help if needed; otherwise, I will close this issue. Feel free to reopen it when you find something that could clarify the problem. |
Hey! I think it's cool to close it for now. |
As a developer working on the LAOS project,
I want to investigate the discrepancy in the extrinsic signing process related to metadata version 15,
so that we can determine if the current behavior is intentional or if adjustments are needed to ensure compatibility with various wallets.
Description
Talisman has reported an issue where, when signing on LAOS with metadata version 15, Polkadot.js adds a 'type' prefix byte to the signature by default because the
ExtrinsicSignature
type on LAOS is anEnum
. This behavior differs from other chains such as Moonbeam. The relevant code can be found here: ExtrinsicPayload.ts.Talisman has to maintain a flag in their chaindata repository to specify
withType: false
for LAOS to handle this issue. This workaround is acceptable if necessary, but it would be preferable to avoid it if the current implementation is unintentional.Acceptance Criteria
Additional Information
References
The text was updated successfully, but these errors were encountered: