Skip to content

Commit

Permalink
fix: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
code0xff committed Oct 25, 2024
1 parent 1e669ba commit 923233f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions vendor/composable/vm-wasmi/src/host_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ where
>(&vm, message_hash_ptr as u32)?;
let signature = passthrough_out::<
WasmiVM<V, S>,
ConstantReadLimit<{ constants::EDCSA_SIGNATURE_LENGTH }>,
ConstantReadLimit<{ constants::ECDSA_SIGNATURE_LENGTH }>,
>(&vm, signature_ptr as u32)?;
let public_key = passthrough_out::<
WasmiVM<V, S>,
ConstantReadLimit<{ constants::MAX_LENGTH_EDCSA_PUBKEY_LENGTH }>,
ConstantReadLimit<{ constants::MAX_LENGTH_ECDSA_PUBKEY_LENGTH }>,
>(&vm, public_key_ptr as u32)?;

let result = vm.secp256k1_verify(&message_hash, &signature, &public_key)?;
Expand Down Expand Up @@ -313,7 +313,7 @@ where
>(&vm, message_hash_ptr as u32)?;
let signature = passthrough_out::<
WasmiVM<V, S>,
ConstantReadLimit<{ constants::EDCSA_SIGNATURE_LENGTH }>,
ConstantReadLimit<{ constants::ECDSA_SIGNATURE_LENGTH }>,
>(&vm, signature_ptr as u32)?;

if let Ok(pubkey) =
Expand Down
8 changes: 4 additions & 4 deletions vendor/composable/vm/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,10 @@ pub mod constants {
pub const MAX_LENGTH_ABORT: usize = 2 * MI;
/// Max length of a message hash
pub const MAX_LENGTH_MESSAGE_HASH: usize = 32;
/// Length of an edcsa signature
pub const EDCSA_SIGNATURE_LENGTH: usize = 64;
/// Max length for edcsa public key
pub const MAX_LENGTH_EDCSA_PUBKEY_LENGTH: usize = 65;
/// Length of an ecdsa signature
pub const ECDSA_SIGNATURE_LENGTH: usize = 64;
/// Max length for ecdsa public key
pub const MAX_LENGTH_ECDSA_PUBKEY_LENGTH: usize = 65;
/// Length of an eddsa public key
pub const EDDSA_PUBKEY_LENGTH: usize = 32;
}
Expand Down

0 comments on commit 923233f

Please sign in to comment.