File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ and this project adheres to
9
9
### Added
10
10
11
11
- cosmwasm-vm: Add ` secp256r1_verify ` and ` secp256r1_recover_pubkey ` imports for
12
- ECDSA signature verification over secp256r1. ([ #1983 ] , [ #2057 ] )
12
+ ECDSA signature verification over secp256r1. ([ #1983 ] , [ #2057 ] , [ # 2058 ] )
13
13
- cosmwasm-vm: Add metrics for the pinned memory cache ([ #2059 ] )
14
14
15
15
[ #1983 ] : https://github.com/CosmWasm/cosmwasm/pull/1983
16
16
[ #2057 ] : https://github.com/CosmWasm/cosmwasm/pull/2057
17
+ [ #2058 ] : https://github.com/CosmWasm/cosmwasm/pull/2058
17
18
18
19
### Changed
19
20
Original file line number Diff line number Diff line change @@ -165,19 +165,33 @@ pub trait Api {
165
165
recovery_param : u8 ,
166
166
) -> Result < Vec < u8 > , RecoverPubkeyError > ;
167
167
168
+ #[ allow( unused_variables) ]
168
169
fn secp256r1_verify (
169
170
& self ,
170
171
message_hash : & [ u8 ] ,
171
172
signature : & [ u8 ] ,
172
173
public_key : & [ u8 ] ,
173
- ) -> Result < bool , VerificationError > ;
174
+ ) -> Result < bool , VerificationError > {
175
+ // Support for secp256r1 is added in 2.1, i.e. we can't add a compile time requirement for new function.
176
+ // Any implementation of the Api trait which does not implement this function but tries to call it will
177
+ // panic at runtime. We don't assume such cases exist.
178
+ // See also https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-default-item
179
+ unimplemented ! ( )
180
+ }
174
181
182
+ #[ allow( unused_variables) ]
175
183
fn secp256r1_recover_pubkey (
176
184
& self ,
177
185
message_hash : & [ u8 ] ,
178
186
signature : & [ u8 ] ,
179
187
recovery_param : u8 ,
180
- ) -> Result < Vec < u8 > , RecoverPubkeyError > ;
188
+ ) -> Result < Vec < u8 > , RecoverPubkeyError > {
189
+ // Support for secp256r1 was added in 2.1, i.e. we can't add a compile time requirement for new function.
190
+ // Any implementation of the Api trait which does not implement this function but tries to call it will
191
+ // panic at runtime. We don't assume such cases exist.
192
+ // See also https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-default-item
193
+ unimplemented ! ( )
194
+ }
181
195
182
196
fn ed25519_verify (
183
197
& self ,
You can’t perform that action at this time.
0 commit comments