Implemented seal_ecdsa_recovery function in the contract pallet (#9686)

* Implemented `seal_ecdsa_recovery` function in the contract pallet.
Added benchmark and unit test.

* Run `cargo fmt`

* Skip fmt for slices

* Changes according comments in pull request.

* Fix build without `unstable-interface` feature

* Applied suggestion from the review

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Changed RecoveryFailed to EcdsaRecoverFailed

* Manually updated weights.rs

* Apply suggestions from code review

Co-authored-by: Michael Müller <mich@elmueller.net>

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Michael Müller <mich@elmueller.net>
This commit is contained in:
GreenBaneling | Supercolony
2021-09-10 14:30:56 +03:00
committed by GitHub
parent 110ba540ec
commit a36e881783
13 changed files with 985 additions and 654 deletions
+5 -2
View File
@@ -27,8 +27,9 @@ smallvec = { version = "1", default-features = false, features = [
wasmi-validation = { version = "0.4", default-features = false }
# Only used in benchmarking to generate random contract code
rand = { version = "0.8", optional = true, default-features = false }
rand_pcg = { version = "0.3", optional = true }
libsecp256k1 = { version = "0.3.5", optional = true, default-features = false, features = ["hmac"] }
rand = { version = "0.7.3", optional = true, default-features = false }
rand_pcg = { version = "0.2", optional = true }
# Substrate Dependencies
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
@@ -73,9 +74,11 @@ std = [
"pallet-contracts-proc-macro/full",
"log/std",
"rand/std",
"libsecp256k1/std",
]
runtime-benchmarks = [
"frame-benchmarking",
"libsecp256k1",
"rand",
"rand_pcg",
"unstable-interface",