Skip to content

Commit

Permalink
chore: clean up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbinth committed Jan 18, 2024
1 parent 851652e commit c40cfd8
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 40 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ lto = true

[workspace.dependencies]
assembly = { package = "miden-assembly", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
miden-stdlib = { package = "miden-stdlib", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
miden-test-utils = { package = "miden-test-utils", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
miden-verifier = { package = "miden-verifier", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
vm-core = { package = "miden-core", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
vm-processor = { package = "miden-processor", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
8 changes: 2 additions & 6 deletions miden-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ std = ["assembly/std", "miden-objects/std", "miden-stdlib/std", "vm-processor/st
testing = ["miden-objects/testing"]

[dependencies]
assembly = { workspace = true }
miden-objects = { package = "miden-objects", path = "../objects", default-features = false }
miden-stdlib = { workspace = true }
miden-stdlib = { package = "miden-stdlib", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }

[dev-dependencies]
miden-objects = { package = "miden-objects", path = "../objects", default-features = false, features = [
"testing",
] }
miden-stdlib = { workspace = true }
miden-objects = { package = "miden-objects", path = "../objects", default-features = false, features = ["testing" ]}
mock = { package = "miden-mock", path = "../mock", default-features = false }
vm-processor = { workspace = true, features = ["internals"] }

Expand Down
2 changes: 1 addition & 1 deletion miden-lib/src/accounts/faucets/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use assembly::LibraryPath;
use miden_objects::{
accounts::{Account, AccountCode, AccountId, AccountStorage, AccountType, StorageSlotType},
assembly::LibraryPath,
assets::{AssetVault, TokenSymbol},
utils::{string::ToString, vec},
AccountError, Felt, StarkField, Word, ZERO,
Expand Down
5 changes: 4 additions & 1 deletion miden-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
#[cfg(not(feature = "std"))]
extern crate alloc;

use assembly::{utils::Deserializable, Library, LibraryNamespace, MaslLibrary, Version};
use miden_objects::{
assembly::{Library, LibraryNamespace, MaslLibrary, Version},
utils::serde::Deserializable,
};

mod auth;
pub use auth::AuthScheme;
Expand Down
4 changes: 2 additions & 2 deletions miden-lib/src/notes/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use assembly::ast::ProgramAst;
use miden_objects::{
accounts::AccountId, notes::NoteScript, Digest, Hasher, NoteError, Word, ZERO,
accounts::AccountId, assembly::ProgramAst, notes::NoteScript, Digest, Hasher, NoteError, Word,
ZERO,
};

use crate::transaction::TransactionKernel;
Expand Down
3 changes: 2 additions & 1 deletion miden-lib/src/transaction/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use assembly::{ast::ProgramAst, utils::DeserializationError, Assembler, AssemblyContext};
use miden_objects::{
accounts::AccountId,
assembly::{Assembler, AssemblyContext, ProgramAst},
transaction::{OutputNotes, TransactionOutputs},
utils::{
collections::{BTreeMap, Vec},
group_slice_elements,
serde::DeserializationError,
},
vm::{ProgramInfo, StackInputs, StackOutputs},
Digest, Felt, TransactionOutputError, Word,
Expand Down
3 changes: 1 addition & 2 deletions miden-tx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ rust-version = "1.67"
[features]
concurrent = ["miden-lib/concurrent", "miden-objects/concurrent", "miden-prover/concurrent", "std"]
default = ["std"]
std = ["miden-lib/std", "miden-objects/std", "miden-prover/std", "miden-verifier/std", "vm-core/std", "vm-processor/std"]
std = ["miden-lib/std", "miden-objects/std", "miden-prover/std", "miden-verifier/std", "vm-processor/std"]

[dependencies]
miden-lib = { package = "miden-lib", path = "../miden-lib", default-features = false }
miden-objects = { package = "miden-objects", path = "../objects", default-features = false }
miden-prover = { package = "miden-prover", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
miden-verifier = { workspace = true }
vm-core = { workspace = true }
vm-processor = { workspace = true }

[dev-dependencies]
Expand Down
3 changes: 1 addition & 2 deletions miden-tx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ use miden_objects::{
notes::{NoteId, NoteScript},
transaction::{ExecutedTransaction, PreparedTransaction},
utils::collections::BTreeMap,
vm::CodeBlock,
vm::{CodeBlock, Program},
AccountError, Digest,
};
use vm_core::Program;
use vm_processor::{ExecutionError, RecAdviceProvider};

mod compiler;
Expand Down
25 changes: 9 additions & 16 deletions miden-tx/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use mock::{
mock::{account::MockAccountType, notes::AssetPreservationStatus, transaction::mock_inputs},
utils::prepare_word,
};
use vm_core::utils::to_hex;
use vm_processor::MemAdviceProvider;

use super::{
Expand Down Expand Up @@ -100,18 +99,12 @@ fn test_transaction_result_account_delta() {
let removed_asset_3 = non_fungible_asset(ACCOUNT_ID_NON_FUNGIBLE_FAUCET_ON_CHAIN);
let removed_assets = [removed_asset_1, removed_asset_2, removed_asset_3];

let account_procedure_incr_nonce_mast_root = to_hex(
&data_store.account.code().procedures()[ACCOUNT_PROCEDURE_INCR_NONCE_PROC_IDX].as_bytes(),
)
.unwrap();
let account_procedure_set_code_mast_root = to_hex(
&data_store.account.code().procedures()[ACCOUNT_PROCEDURE_SET_CODE_PROC_IDX].as_bytes(),
)
.unwrap();
let account_procedure_set_item_mast_root = to_hex(
&data_store.account.code().procedures()[ACCOUNT_PROCEDURE_SET_ITEM_PROC_IDX].as_bytes(),
)
.unwrap();
let account_procedure_incr_nonce_mast_root =
&data_store.account.code().procedures()[ACCOUNT_PROCEDURE_INCR_NONCE_PROC_IDX].to_hex();
let account_procedure_set_code_mast_root =
&data_store.account.code().procedures()[ACCOUNT_PROCEDURE_SET_CODE_PROC_IDX].to_hex();
let account_procedure_set_item_mast_root =
&data_store.account.code().procedures()[ACCOUNT_PROCEDURE_SET_ITEM_PROC_IDX].to_hex();

let tx_script = format!(
"\
Expand All @@ -125,20 +118,20 @@ fn test_transaction_result_account_delta() {
push.0 movdn.5 push.0 movdn.5 push.0 movdn.5
# => [index, V', 0, 0, 0]
call.0x{account_procedure_set_item_mast_root}
call.{account_procedure_set_item_mast_root}
# => [R', V]
end
proc.set_code
call.0x{account_procedure_set_code_mast_root}
call.{account_procedure_set_code_mast_root}
# => [0, 0, 0, 0]
dropw
# => []
end
proc.incr_nonce
call.0x{account_procedure_incr_nonce_mast_root}
call.{account_procedure_incr_nonce_mast_root}
# => [0]
drop
Expand Down
2 changes: 1 addition & 1 deletion mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env_logger = { version = "0.10" }
hex = "0.4"
miden-lib = { path = "../miden-lib" }
miden-objects = { path = "../objects" , features = ["serde", "log", "testing"]}
miden-test-utils = { workspace = true }
miden-test-utils = { package = "miden-test-utils", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
postcard = { version = "1.0", features = [ "alloc" ] }
rand = { version = "0.8" }
rand_pcg = { version = "0.3", features = ["serde1"] }
Expand Down
6 changes: 2 additions & 4 deletions objects/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ assembly = { workspace = true }
log = { version = "0.4", optional = true }
miden-crypto = { git = "https://github.com/0xPolygonMiden/crypto", branch = "next", default-features = false }
miden-verifier = { workspace = true }
serde = { version = "1.0", optional = true, default-features = false, features = [
"derive",
] }
vm-core = { workspace = true }
serde = { version = "1.0", optional = true, default-features = false, features = ["derive"] }
vm-core = { package = "miden-core", git = "https://github.com/0xPolygonMiden/miden-vm.git", branch = "next", default-features = false }
vm-processor = { workspace = true }

[dev-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion objects/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ pub use vm_core::{Felt, FieldElement, StarkField, Word, EMPTY_WORD, ONE, WORD_SI
pub mod assembly {
pub use assembly::{
ast::{AstSerdeOptions, ModuleAst, ProgramAst},
Assembler, AssemblyContext, AssemblyError,
Assembler, AssemblyContext, AssemblyError, Library, LibraryNamespace, LibraryPath,
MaslLibrary, Version,
};
}

Expand Down

0 comments on commit c40cfd8

Please sign in to comment.