-
Notifications
You must be signed in to change notification settings - Fork 140
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
Remove deprecated constant from the crypto contract #1447
Comments
Hi @tarakby , is this still relevant ? |
Hi @j1010001 , yep |
Hi @j1010001 , this is a very long technical debt. I'm putting it on your radar again |
@tarakby Could you please add some reasoning why this should be done? Given it is a breaking change, we would need to include it in the Stable Cadence release. So we need to get approval (FLIP) for it. |
As the linked PR mentions, the Flow protocol used to define two signature tags (one for transactions, one for all user applications). This Cadence contract used the second tag which was correct at that time. I believe a protocol FLIP was needed in Feb 2022 to deprecate the user tag, but updating Cadence is only a technical debt. I don't believe a FLIP is needed at this point because the decision was already taken and implemented by other tools. I also remember you mentioned that this contract should not be part of Cadence, so maybe stable Cadence could decide to not include it at all? |
Moving the
No additional work in the contract itself is required, we had already previously refactored it to be deployable like any other contract |
@tarakby Can you please open a separate issue for moving the |
I created #3135 for the contract migration task. Not sure if it's a breaking change though. |
Context
FVM updated the requirement about user signature tags to accept all tags (onflow/flow-go#2171). The user tag is deprecated (not a protocol constant anymore) and should not be used.
It is still hardcoded in the crypto contract to verify signatures (https://github.com/onflow/cadence/blob/49c7bc8/runtime/stdlib/contracts/crypto.cdc#L155)
The crypto contract API could also take a tag parameter, which would be a breaking change.
The contract is currently part of the Cadence code base. We can take this opportunity to move the contract out of Cadence and deploy it on both testnet and mainnet. This allows future contract updates to happen without a spork.
Definition of done:
verify
function and use it to verify each signature.(optional) move the contract and tests outside of Cadence(optional) deploy the new contract to testnet and mainnetThe text was updated successfully, but these errors were encountered: