diff --git a/Cargo.lock b/Cargo.lock index 7a97bfe3..08994878 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -330,15 +330,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -620,9 +620,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "45bcde016d64c21da4be18b655631e5ab6d3107607e71a73a9f53eb48aae23fb" dependencies = [ "jobserver", "libc", @@ -1345,9 +1345,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1788,7 +1788,7 @@ dependencies = [ [[package]] name = "miden-lib" version = "0.6.0" -source = "git+https://github.com/0xPolygonMiden/miden-base.git?branch=next#76a6635593ca168eda4517061ee0b4b845ad1c0f" +source = "git+https://github.com/0xPolygonMiden/miden-base.git?branch=next#c1fe049db8c512d14b749a5a2e3b22001fd10b5a" dependencies = [ "miden-assembly", "miden-objects", @@ -1979,7 +1979,7 @@ dependencies = [ [[package]] name = "miden-objects" version = "0.6.0" -source = "git+https://github.com/0xPolygonMiden/miden-base.git?branch=next#76a6635593ca168eda4517061ee0b4b845ad1c0f" +source = "git+https://github.com/0xPolygonMiden/miden-base.git?branch=next#c1fe049db8c512d14b749a5a2e3b22001fd10b5a" dependencies = [ "miden-assembly", "miden-core", @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "miden-tx" version = "0.6.0" -source = "git+https://github.com/0xPolygonMiden/miden-base.git?branch=next#76a6635593ca168eda4517061ee0b4b845ad1c0f" +source = "git+https://github.com/0xPolygonMiden/miden-base.git?branch=next#c1fe049db8c512d14b749a5a2e3b22001fd10b5a" dependencies = [ "miden-lib", "miden-objects", @@ -3327,9 +3327,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" dependencies = [ "indexmap 2.5.0", "serde", @@ -3608,9 +3608,9 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] diff --git a/bin/faucet/src/client.rs b/bin/faucet/src/client.rs index 595709b5..2d2a7686 100644 --- a/bin/faucet/src/client.rs +++ b/bin/faucet/src/client.rs @@ -29,6 +29,7 @@ use miden_tx::{ use rand::{rngs::StdRng, thread_rng, Rng}; use rand_chacha::{rand_core::SeedableRng, ChaCha20Rng}; use tonic::transport::Channel; +use tracing::{error, info}; use crate::{config::FaucetConfig, errors::FaucetError}; @@ -113,9 +114,10 @@ impl FaucetClient { .executor .execute_transaction(self.id, 0, &[], transaction_args) .map_err(|err| { + error!("{err}"); FaucetError::InternalServerError(format!("Failed to execute transaction: {}", err)) })?; - + Ok((executed_tx, output_note)) } diff --git a/bin/faucet/src/config.rs b/bin/faucet/src/config.rs index e19eafa2..16ce094e 100644 --- a/bin/faucet/src/config.rs +++ b/bin/faucet/src/config.rs @@ -1,7 +1,4 @@ -use std::{ - fmt::{Display, Formatter}, - path::PathBuf, -}; +use std::fmt::{Display, Formatter}; use miden_node_utils::config::{Endpoint, DEFAULT_FAUCET_SERVER_PORT, DEFAULT_NODE_RPC_PORT}; use serde::{Deserialize, Serialize}; @@ -18,8 +15,6 @@ pub struct FaucetConfig { pub node_url: String, /// Timeout for RPC requests in milliseconds pub timeout_ms: u64, - /// Location to store database files - pub database_filepath: PathBuf, /// Possible options on the amount of asset that should be dispersed on each faucet request pub asset_amount_options: Vec, /// Token symbol of the generated fungible asset @@ -39,8 +34,8 @@ impl FaucetConfig { impl Display for FaucetConfig { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.write_fmt(format_args!( - "{{ endpoint: \"{}\", database_filepath: {:?}, asset_amount_options: {:?}, token_symbol: {}, decimals: {}, max_supply: {} }}", - self.endpoint, self.database_filepath, self.asset_amount_options, self.token_symbol, self.decimals, self.max_supply + "{{ endpoint: \"{}\", asset_amount_options: {:?}, token_symbol: {}, decimals: {}, max_supply: {} }}", + self.endpoint, self.asset_amount_options, self.token_symbol, self.decimals, self.max_supply )) } } @@ -51,7 +46,6 @@ impl Default for FaucetConfig { endpoint: Endpoint::localhost(DEFAULT_FAUCET_SERVER_PORT), node_url: Endpoint::localhost(DEFAULT_NODE_RPC_PORT).to_string(), timeout_ms: 10000, - database_filepath: PathBuf::from("store.sqlite3"), asset_amount_options: vec![100, 500, 1000], token_symbol: "POL".to_string(), decimals: 8, diff --git a/config/miden-faucet.toml b/config/miden-faucet.toml index 514ed98a..a9fdc142 100644 --- a/config/miden-faucet.toml +++ b/config/miden-faucet.toml @@ -1,5 +1,4 @@ endpoint = { host = "localhost", port = 8080 } -database_filepath = "store.sqlite3" node_url = "http://localhost:57291" timeout_ms = 10000 diff --git a/crates/store/src/db/tests.rs b/crates/store/src/db/tests.rs index dad6eaac..f33d258b 100644 --- a/crates/store/src/db/tests.rs +++ b/crates/store/src/db/tests.rs @@ -990,5 +990,5 @@ pub fn mock_account_code() -> AccountCode { add end "; - AccountCode::compile(account_code, TransactionKernel::assembler()).unwrap() + AccountCode::compile(account_code, TransactionKernel::assembler(), false).unwrap() }