Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/miden-objects/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ pub mod utils {
pub mod vm {
pub use miden_verifier::ExecutionProof;
pub use vm_core::{AdviceMap, Program, ProgramInfo, sys_events::SystemEvent};
pub use vm_processor::{AdviceInputs, RowIndex, StackInputs, StackOutputs};
pub use vm_processor::{AdviceInputs, FutureMaybeSend, RowIndex, StackInputs, StackOutputs};
}
4 changes: 2 additions & 2 deletions crates/miden-testing/src/tx_context/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use miden_tx::{
};
use rand_chacha::ChaCha20Rng;
use vm_processor::{
AdviceInputs, AsyncHostFuture, ExecutionError, MastForest, MastForestStore, Process, Word,
AdviceInputs, ExecutionError, FutureMaybeSend, MastForest, MastForestStore, Process, Word,
};

use crate::{MockHost, executor::CodeExecutor, tx_context::builder::MockAuthenticator};
Expand Down Expand Up @@ -190,7 +190,7 @@ impl DataStore for TransactionContext {
&self,
account_id: AccountId,
_ref_blocks: BTreeSet<BlockNumber>,
) -> impl AsyncHostFuture<
) -> impl FutureMaybeSend<
Result<(Account, Option<Word>, BlockHeader, PartialBlockchain), DataStoreError>,
> {
assert_eq!(account_id, self.account().id());
Expand Down
10 changes: 5 additions & 5 deletions crates/miden-tx/src/auth/tx_authenticator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use miden_objects::{
};
use rand::Rng;
use tokio::sync::RwLock;
use vm_processor::AsyncHostFuture;
use vm_processor::FutureMaybeSend;

use super::signatures::get_falcon_signature;
use crate::errors::AuthenticationError;
Expand Down Expand Up @@ -91,7 +91,7 @@ pub trait TransactionAuthenticator {
&self,
pub_key: Word,
signing_inputs: &SigningInputs,
) -> impl AsyncHostFuture<Result<Vec<Felt>, AuthenticationError>>;
) -> impl FutureMaybeSend<Result<Vec<Felt>, AuthenticationError>>;
}

/// A placeholder type for the generic trait bound of `TransactionAuthenticator<'_,'_,_,T>`
Expand All @@ -110,7 +110,7 @@ impl TransactionAuthenticator for UnreachableAuth {
&self,
_pub_key: Word,
_signing_inputs: &SigningInputs,
) -> impl AsyncHostFuture<Result<Vec<Felt>, AuthenticationError>> {
) -> impl FutureMaybeSend<Result<Vec<Felt>, AuthenticationError>> {
async { unreachable!("Type `UnreachableAuth` must not be instantiated") }
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ impl<R: Rng + Send + Sync> TransactionAuthenticator for BasicAuthenticator<R> {
&self,
pub_key: Word,
signing_inputs: &SigningInputs,
) -> impl AsyncHostFuture<Result<Vec<Felt>, AuthenticationError>> {
) -> impl FutureMaybeSend<Result<Vec<Felt>, AuthenticationError>> {
let message = signing_inputs.to_commitment();

async move {
Expand Down Expand Up @@ -196,7 +196,7 @@ impl TransactionAuthenticator for () {
&self,
_pub_key: Word,
_signing_inputs: &SigningInputs,
) -> impl AsyncHostFuture<Result<Vec<Felt>, AuthenticationError>> {
) -> impl FutureMaybeSend<Result<Vec<Felt>, AuthenticationError>> {
async {
Err(AuthenticationError::RejectedSignature(
"default authenticator cannot provide signatures".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions crates/miden-tx/src/executor/data_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use miden_objects::{
block::{BlockHeader, BlockNumber},
transaction::PartialBlockchain,
};
use vm_processor::{AsyncHostFuture, MastForestStore, Word};
use vm_processor::{FutureMaybeSend, MastForestStore, Word};

use crate::DataStoreError;

Expand All @@ -32,7 +32,7 @@ pub trait DataStore: MastForestStore {
&self,
account_id: AccountId,
ref_blocks: BTreeSet<BlockNumber>,
) -> impl AsyncHostFuture<
) -> impl FutureMaybeSend<
Result<(Account, Option<Word>, BlockHeader, PartialBlockchain), DataStoreError>,
>;
}
10 changes: 5 additions & 5 deletions crates/miden-tx/src/executor/exec_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use miden_objects::{
transaction::{InputNote, InputNotes, OutputNote},
};
use vm_processor::{
AdviceMutation, AsyncHost, AsyncHostFuture, BaseHost, EventError, MastForest, MastForestStore,
AdviceMutation, AsyncHost, BaseHost, EventError, FutureMaybeSend, MastForest, MastForestStore,
ProcessState,
};

Expand All @@ -25,9 +25,9 @@ use crate::{
host::{ScriptMastForestStore, TransactionBaseHost, TransactionProgress},
};

/// The transaction executor host is responsible for handling [`AsyncHost`] requests made by the
/// transaction kernel during execution. In particular, it responds to signature generation requests
/// by forwarding the request to the contained [`TransactionAuthenticator`].
/// The transaction executor host is responsible for handling [`FutureMaybeSend`] requests made by
/// the transaction kernel during execution. In particular, it responds to signature generation
/// requests by forwarding the request to the contained [`TransactionAuthenticator`].
///
/// Transaction hosts are created on a per-transaction basis. That is, a transaction host is meant
/// to support execution of a single transaction and is discarded after the transaction finishes
Expand Down Expand Up @@ -217,7 +217,7 @@ where
&mut self,
process: &ProcessState,
event_id: u32,
) -> impl AsyncHostFuture<Result<Vec<AdviceMutation>, EventError>> {
) -> impl FutureMaybeSend<Result<Vec<AdviceMutation>, EventError>> {
// TODO: Eventually, refactor this to let TransactionEvent contain the data directly, which
// should be cleaner.
let event_handling_result = TransactionEvent::try_from(event_id)
Expand Down
Loading