From f3d649eb672211a6ae51e8178e3b44c41617eadd Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Tue, 10 Dec 2024 17:29:29 +0100 Subject: [PATCH] fix: no-std build and regenerate kernel errors --- miden-lib/src/errors/tx_kernel_errors.rs | 2 +- miden-tx/src/testing/executor.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/miden-lib/src/errors/tx_kernel_errors.rs b/miden-lib/src/errors/tx_kernel_errors.rs index 3085e9ad0..a9a21de96 100644 --- a/miden-lib/src/errors/tx_kernel_errors.rs +++ b/miden-lib/src/errors/tx_kernel_errors.rs @@ -151,7 +151,7 @@ pub const TX_KERNEL_ERRORS: [(u32, &str); 87] = [ (ERR_FUNGIBLE_ASSET_DISTRIBUTE_WOULD_CAUSE_MAX_SUPPLY_TO_BE_EXCEEDED, "Distribute would cause the maximum supply to be exceeded"), (ERR_FUNGIBLE_ASSET_FAUCET_IS_NOT_ORIGIN, "The origin of the fungible asset is not this faucet"), (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_ONE_MUST_BE_ZERO, "Malformed fungible asset: ASSET[1] must be 0"), - (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_THREE_MUST_BE_FUNGIBLE_FAUCET_ID, "Malformed fungible asset: ASSET[3] must be a valide fungible faucet id"), + (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_THREE_MUST_BE_FUNGIBLE_FAUCET_ID, "Malformed fungible asset: ASSET[3] must be a valid fungible faucet id"), (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_TWO_MUST_BE_ZERO, "Malformed fungible asset: ASSET[2] must be 0"), (ERR_FUNGIBLE_ASSET_FORMAT_ELEMENT_ZERO_MUST_BE_WITHIN_LIMITS, "Malformed fungible asset: ASSET[0] exceeds the maximum allowed amount"), (ERR_FUNGIBLE_ASSET_PROVIDED_FAUCET_ID_IS_INVALID, "Failed to build the fungible asset because the provided faucet id is not from a fungible faucet"), diff --git a/miden-tx/src/testing/executor.rs b/miden-tx/src/testing/executor.rs index 6b4685eb1..9f54b4af2 100644 --- a/miden-tx/src/testing/executor.rs +++ b/miden-tx/src/testing/executor.rs @@ -1,7 +1,6 @@ use miden_lib::transaction::TransactionKernel; use vm_processor::{ - AdviceInputs, AdviceProvider, DefaultHost, ExecutionError, Host, Process, ProcessState, - Program, StackInputs, + AdviceInputs, AdviceProvider, DefaultHost, ExecutionError, Host, Process, Program, StackInputs, }; // MOCK CODE EXECUTOR @@ -51,7 +50,10 @@ impl CodeExecutor { #[cfg(feature = "std")] if execution_result.is_err() { - std::println!("execute program failed at clock cycle {}", process.clk()); + std::println!( + "execute program failed at clock cycle {}", + vm_processor::ProcessState::clk(&process) + ); } execution_result.map(|_| process)