feat(interpreter-data)!: allow only deterministic signature algorithms (#734)

Some public signature algorithms require a RNG, but it is not
available in certain environments like smartcontracts.
This commit is contained in:
Ivan Boldyrev
2023-11-02 18:43:35 +04:00
committed by GitHub
parent 55da7a64aa
commit 15ce40a1cd
20 changed files with 243 additions and 35 deletions

View File

@ -18,6 +18,7 @@ air-test-utils = { version = "0.12.1", path = "../air-lib/test-utils" }
aquavm-air-parser = { version = "0.10.0", path = "../air-lib/air-parser" }
itertools = "0.10.5"
fluence-keypair = "0.10.1"
strum = { version="0.24.1", features=["derive"] }
nom = "7.1.3"
nom_locate = "4.1.0"

View File

@ -22,7 +22,6 @@ use crate::{
services::{services_to_call_service_closure, MarineServiceHandle, NetworkServices},
};
use air_interpreter_signatures::KeyPair;
use air_test_utils::{
key_utils::derive_dummy_keypair,
test_runner::{
@ -30,6 +29,7 @@ use air_test_utils::{
},
RawAVMOutcome,
};
use fluence_keypair::KeyPair;
use std::{borrow::Borrow, cell::RefCell, collections::HashMap, hash::Hash, ops::Deref, rc::Rc};
@ -86,7 +86,7 @@ pub struct Peer<R> {
}
impl<R: AirRunner> Peer<R> {
pub fn new(keypair: KeyPair, services: Rc<[MarineServiceHandle]>) -> Self {
pub fn new(keypair: impl Into<KeyPair>, services: Rc<[MarineServiceHandle]>) -> Self {
let call_service = services_to_call_service_closure(services);
let runner = create_avm_with_key::<R>(keypair, call_service);