Skip to content

Commit

Permalink
fix: no-std build and regenerate kernel errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Dec 10, 2024
1 parent 0bc8329 commit f3d649e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion miden-lib/src/errors/tx_kernel_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
8 changes: 5 additions & 3 deletions miden-tx/src/testing/executor.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -51,7 +50,10 @@ impl<H: Host> CodeExecutor<H> {

#[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)
Expand Down

0 comments on commit f3d649e

Please sign in to comment.