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

Mock signature verify #2952

Closed
wants to merge 3 commits into from
Closed

Mock signature verify #2952

wants to merge 3 commits into from

Conversation

xlc
Copy link
Contributor

@xlc xlc commented Oct 31, 2022

Closes #2948
On top of #2950. the additional diff is 20d9235

Not yet tested.
Will mark this ready once I successfully get it e2e working with AcalaNetwork/chopsticks#13

@xlc xlc requested a review from tomaka as a code owner October 31, 2022 09:10
@mergify
Copy link
Contributor

mergify bot commented Oct 31, 2022

⚠️ The sha of the head commit of this PR conflicts with #2950. Mergify cannot evaluate rules on this PR. ⚠️

@xlc xlc marked this pull request as draft October 31, 2022 09:11
@xlc xlc closed this Oct 31, 2022
@xlc xlc deleted the mock-signature-verify branch October 31, 2022 21:34
@xlc xlc restored the mock-signature-verify branch October 31, 2022 21:34
mergify bot added a commit that referenced this pull request Nov 1, 2022
cc @xlc 
After looking at #2952, I
thought that the approach in this PR is a better idea.

As shown in the changes to `runtime_host.rs` and
`read_only_runtime_host.rs`, you now have a new variant called
`SignatureVerification` that allows you to overwrite the verification if
you so desire.

As I was implemented this PR, I noticed that the implementation of
`ext_crypto_ecdsa_verify` loads the message from the first parameter,
which is actually the signature. Oops. This is fixed at the same time.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

Ability to provide alternative implementation of host functions
1 participant