diff --git a/Cargo.toml b/Cargo.toml index 49c2bda401..a59104a408 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ members = [ "contracts/stake", "contracts/transfer", - "execution-core", + "core", "wallet-core", "rusk-prover", @@ -33,7 +33,7 @@ resolver = "2" [workspace.dependencies] # Workspace internal dependencies dusk-consensus = { version = "0.1.1-rc.3", path = "./consensus/" } -execution-core = { version = "0.1.0", path = "./execution-core/" } +dusk-core = { version = "0.1.0", path = "./core/" } node = { version = "0.1.0", path = "./node/" } node-data = { version = "0.1.0", path = "./node-data/" } rusk-abi = { version = "0.13.0-rc.0", path = "./rusk-abi/", default-features = false } diff --git a/Makefile b/Makefile index cfbadb88b2..93ae39d6a8 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ contracts: ## Execute the test for all contracts test: keys wasm ## Run the tests $(MAKE) -C ./rusk-abi/ $@ - $(MAKE) -C ./execution-core/ $@ + $(MAKE) -C ./core/ $@ $(MAKE) state $(MAKE) -j1 -C ./contracts $@ $(MAKE) -C ./rusk-recovery $@ @@ -36,7 +36,7 @@ test: keys wasm ## Run the tests $(MAKE) -C ./rusk-wallet/ $@ clippy: ## Run clippy - $(MAKE) -C ./execution-core/ $@ + $(MAKE) -C ./core/ $@ $(MAKE) -j1 -C ./contracts $@ $(MAKE) -C ./rusk-abi $@ $(MAKE) -C ./rusk-profile $@ @@ -50,7 +50,7 @@ clippy: ## Run clippy $(MAKE) -C ./rusk-wallet/ $@ doc: ## Run doc gen - $(MAKE) -C ./execution-core/ $@ + $(MAKE) -C ./core/ $@ $(MAKE) -C ./consensus $@ $(MAKE) -j1 -C ./contracts $@ $(MAKE) -C ./node $@ diff --git a/consensus/Cargo.toml b/consensus/Cargo.toml index d02382b141..302f8dc9c4 100644 --- a/consensus/Cargo.toml +++ b/consensus/Cargo.toml @@ -22,7 +22,7 @@ dusk-bytes = { workspace = true } async-trait = { workspace = true } anyhow = { workspace = true } node-data = { workspace = true } -execution-core = { workspace = true, features = ["parallel"] } +dusk-core = { workspace = true, features = ["parallel"] } dusk-merkle = { workspace = true, features = ["size_32"] } thiserror = { workspace = true } diff --git a/consensus/src/aggregator.rs b/consensus/src/aggregator.rs index 85ce5e2218..a2532cae93 100644 --- a/consensus/src/aggregator.rs +++ b/consensus/src/aggregator.rs @@ -8,7 +8,7 @@ use std::collections::{BTreeMap, HashMap}; use std::fmt; use dusk_bytes::Serializable; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ Error as BlsSigError, MultisigSignature as BlsMultisigSignature, }; use node_data::bls::{PublicKey, PublicKeyBytes}; @@ -235,7 +235,7 @@ mod tests { use std::collections::HashMap; use dusk_bytes::DeserializableSlice; - use execution_core::signatures::bls::{ + use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; use hex::FromHex; diff --git a/consensus/src/commons.rs b/consensus/src/commons.rs index 5dc108b817..05514ba046 100644 --- a/consensus/src/commons.rs +++ b/consensus/src/commons.rs @@ -10,7 +10,7 @@ use std::collections::HashMap; use std::time::Duration; -use execution_core::signatures::bls::SecretKey as BlsSecretKey; +use dusk_core::signatures::bls::SecretKey as BlsSecretKey; use node_data::bls::PublicKey; use node_data::ledger::*; use node_data::message::{ diff --git a/consensus/src/errors.rs b/consensus/src/errors.rs index 0e9881cb61..fa9c7af511 100644 --- a/consensus/src/errors.rs +++ b/consensus/src/errors.rs @@ -6,7 +6,7 @@ use std::io; -use execution_core::signatures::bls::Error as BlsSigError; +use dusk_core::signatures::bls::Error as BlsSigError; use node_data::bls::PublicKeyBytes; use node_data::ledger::{Hash, InvalidFault}; use node_data::message::payload::{RatificationResult, Vote}; diff --git a/consensus/src/quorum/verifiers.rs b/consensus/src/quorum/verifiers.rs index 93ed63554e..e5c2821f77 100644 --- a/consensus/src/quorum/verifiers.rs +++ b/consensus/src/quorum/verifiers.rs @@ -5,7 +5,7 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use dusk_bytes::Serializable as BytesSerializable; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ MultisigPublicKey as BlsMultisigPublicKey, MultisigSignature as BlsMultisigSignature, }; diff --git a/consensus/src/user/provisioners.rs b/consensus/src/user/provisioners.rs index ed4b354652..871b5f5b1b 100644 --- a/consensus/src/user/provisioners.rs +++ b/consensus/src/user/provisioners.rs @@ -7,8 +7,8 @@ use std::collections::BTreeMap; use std::mem; -use execution_core::dusk; -use execution_core::stake::MINIMUM_STAKE; +use dusk_core::dusk; +use dusk_core::stake::MINIMUM_STAKE; use node_data::bls::{PublicKey, PublicKeyBytes}; use node_data::ledger::Seed; use node_data::StepName; diff --git a/consensus/src/user/sortition.rs b/consensus/src/user/sortition.rs index ec46c57cdd..c2b284fe48 100644 --- a/consensus/src/user/sortition.rs +++ b/consensus/src/user/sortition.rs @@ -95,7 +95,7 @@ pub fn generate_sortition_score( mod tests { use dusk_bytes::DeserializableSlice; - use execution_core::signatures::bls::{ + use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; use node_data::ledger::Seed; diff --git a/contracts/alice/Cargo.toml b/contracts/alice/Cargo.toml index 4e0da468a5..e1dbde594f 100644 --- a/contracts/alice/Cargo.toml +++ b/contracts/alice/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -execution-core = { workspace = true } +dusk-core = { workspace = true } rusk-abi = { workspace = true, features = ["abi", "dlmalloc"] } diff --git a/contracts/alice/src/state.rs b/contracts/alice/src/state.rs index b5ef260ae2..9da38bd2d8 100644 --- a/contracts/alice/src/state.rs +++ b/contracts/alice/src/state.rs @@ -4,7 +4,7 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -use execution_core::transfer::{ +use dusk_core::transfer::{ withdraw::Withdraw, ContractToAccount, ContractToContract, TRANSFER_CONTRACT, }; diff --git a/contracts/bob/Cargo.toml b/contracts/bob/Cargo.toml index 9423a6d150..b040a7bedb 100644 --- a/contracts/bob/Cargo.toml +++ b/contracts/bob/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -execution-core = { workspace = true } +dusk-core = { workspace = true } rusk-abi = { workspace = true, features = ["abi", "dlmalloc"] } rkyv = { workspace = true, features = ["size_32"] } bytecheck = { workspace = true } diff --git a/contracts/bob/src/state.rs b/contracts/bob/src/state.rs index cf1e37d6c8..b13df7e5f2 100644 --- a/contracts/bob/src/state.rs +++ b/contracts/bob/src/state.rs @@ -8,7 +8,7 @@ extern crate alloc; use alloc::string::String; use bytecheck::CheckBytes; use dusk_bytes::Serializable; -use execution_core::{ +use dusk_core::{ signatures::bls::{PublicKey as BlsPublicKey, Signature as BlsSignature}, transfer::ReceiveFromContract, ContractId, diff --git a/contracts/charlie/Cargo.toml b/contracts/charlie/Cargo.toml index 97a6341487..5bc64d5469 100644 --- a/contracts/charlie/Cargo.toml +++ b/contracts/charlie/Cargo.toml @@ -8,6 +8,6 @@ description = "A proxy staking contract used to test delegation and intermediary crate-type = ["cdylib", "rlib"] [dependencies] -execution-core = { workspace = true } +dusk-core = { workspace = true } rusk-abi = { workspace = true, features = ["abi", "dlmalloc"] } rkyv = { workspace = true, features = ["size_32"] } diff --git a/contracts/charlie/src/lib.rs b/contracts/charlie/src/lib.rs index ad0a0f05cd..0d9811fbed 100644 --- a/contracts/charlie/src/lib.rs +++ b/contracts/charlie/src/lib.rs @@ -7,7 +7,7 @@ #![no_std] mod state; -use execution_core::transfer::TRANSFER_CONTRACT; +use dusk_core::transfer::TRANSFER_CONTRACT; use state::Charlie; #[no_mangle] diff --git a/contracts/charlie/src/state.rs b/contracts/charlie/src/state.rs index 1c6078aa33..6948156520 100644 --- a/contracts/charlie/src/state.rs +++ b/contracts/charlie/src/state.rs @@ -6,10 +6,8 @@ extern crate alloc; -use execution_core::stake::{ - Stake, Withdraw, WithdrawToContract, STAKE_CONTRACT, -}; -use execution_core::transfer::{ +use dusk_core::stake::{Stake, Withdraw, WithdrawToContract, STAKE_CONTRACT}; +use dusk_core::transfer::{ withdraw::Withdraw as TransferWithdraw, ContractToContract, ReceiveFromContract, TRANSFER_CONTRACT, }; diff --git a/contracts/host_fn/Cargo.toml b/contracts/host_fn/Cargo.toml index d5ea3cca7b..1a19cfa0bd 100644 --- a/contracts/host_fn/Cargo.toml +++ b/contracts/host_fn/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -execution-core = { workspace = true } +dusk-core = { workspace = true } dusk-bytes = { workspace = true } rusk-abi = { workspace = true, features = ["abi", "dlmalloc"]} diff --git a/contracts/host_fn/src/lib.rs b/contracts/host_fn/src/lib.rs index 973eb9685c..7c9a2f0fc3 100644 --- a/contracts/host_fn/src/lib.rs +++ b/contracts/host_fn/src/lib.rs @@ -12,7 +12,7 @@ extern crate alloc; use alloc::vec::Vec; use dusk_bytes::Serializable; -use execution_core::{ +use dusk_core::{ signatures::{ bls::{ MultisigSignature, PublicKey as BlsPublicKey, diff --git a/contracts/stake/Cargo.toml b/contracts/stake/Cargo.toml index dfda44fbbd..6462ab39e5 100644 --- a/contracts/stake/Cargo.toml +++ b/contracts/stake/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -execution-core = { workspace = true } +dusk-core = { workspace = true } dusk-bytes = { workspace = true } rkyv = { workspace = true, features = ["size_32"] } @@ -16,7 +16,7 @@ rusk-abi = { workspace = true, features = ["abi", "dlmalloc"] } [dev-dependencies] rusk-abi = { workspace = true, features = ["host"] } -execution-core = { workspace = true, features = ["zk"] } +dusk-core = { workspace = true, features = ["zk"] } rusk-prover = { workspace = true } wallet-core = { workspace = true } rand = { workspace = true } diff --git a/contracts/stake/benches/get_provisioners.rs b/contracts/stake/benches/get_provisioners.rs index 100ba698b2..99187bb0e7 100644 --- a/contracts/stake/benches/get_provisioners.rs +++ b/contracts/stake/benches/get_provisioners.rs @@ -5,7 +5,7 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use criterion::{criterion_group, criterion_main, Criterion}; -use execution_core::{ +use dusk_core::{ stake::{StakeData, STAKE_CONTRACT}, transfer::TRANSFER_CONTRACT, BlsPublicKey, BlsSecretKey, diff --git a/contracts/stake/src/lib.rs b/contracts/stake/src/lib.rs index dd38a86d15..e148b7ad99 100644 --- a/contracts/stake/src/lib.rs +++ b/contracts/stake/src/lib.rs @@ -12,7 +12,7 @@ extern crate alloc; -use execution_core::transfer::TRANSFER_CONTRACT; +use dusk_core::transfer::TRANSFER_CONTRACT; mod state; use state::StakeState; diff --git a/contracts/stake/src/state.rs b/contracts/stake/src/state.rs index 4cddaef655..3dc9171a3a 100644 --- a/contracts/stake/src/state.rs +++ b/contracts/stake/src/state.rs @@ -11,7 +11,7 @@ use core::cmp::min; use dusk_bytes::Serializable; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as BlsPublicKey, stake::{ next_epoch, Reward, SlashEvent, Stake, StakeAmount, StakeData, diff --git a/contracts/stake/tests/common/assert.rs b/contracts/stake/tests/common/assert.rs index a2a6cd9a81..53414d2632 100644 --- a/contracts/stake/tests/common/assert.rs +++ b/contracts/stake/tests/common/assert.rs @@ -5,13 +5,13 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use dusk_bytes::Serializable; -use execution_core::signatures::bls::PublicKey as BlsPublicKey; -use execution_core::stake::{ +use dusk_core::signatures::bls::PublicKey as BlsPublicKey; +use dusk_core::stake::{ Reward, SlashEvent, StakeData, StakeEvent, STAKE_CONTRACT, }; -use execution_core::transfer::moonlight::AccountData; -use execution_core::transfer::TRANSFER_CONTRACT; -use execution_core::Event; +use dusk_core::transfer::moonlight::AccountData; +use dusk_core::transfer::TRANSFER_CONTRACT; +use dusk_core::Event; use rkyv::{check_archived_root, Deserialize, Infallible}; use rusk_abi::Session; diff --git a/contracts/stake/tests/common/init.rs b/contracts/stake/tests/common/init.rs index 3c5872a3dd..6a89b735fc 100644 --- a/contracts/stake/tests/common/init.rs +++ b/contracts/stake/tests/common/init.rs @@ -4,12 +4,12 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -use execution_core::stake::STAKE_CONTRACT; -use execution_core::transfer::{ +use dusk_core::stake::STAKE_CONTRACT; +use dusk_core::transfer::{ phoenix::{Note, PublicKey as PhoenixPublicKey}, TRANSFER_CONTRACT, }; -use execution_core::JubJubScalar; +use dusk_core::JubJubScalar; use ff::Field; use rand::{CryptoRng, RngCore}; use rusk_abi::{ContractData, Session, VM}; diff --git a/contracts/stake/tests/common/utils.rs b/contracts/stake/tests/common/utils.rs index 584a1bf37b..d76d540ce4 100644 --- a/contracts/stake/tests/common/utils.rs +++ b/contracts/stake/tests/common/utils.rs @@ -6,15 +6,14 @@ use std::sync::mpsc; -use execution_core::transfer::data::TransactionData; -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::data::TransactionData; +use dusk_core::transfer::phoenix::{ Note, NoteLeaf, NoteOpening, NoteTreeItem, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, Transaction as PhoenixTransaction, ViewKey as PhoenixViewKey, }; -use execution_core::transfer::{Transaction, TRANSFER_CONTRACT}; -use execution_core::LUX; -use execution_core::{BlsScalar, ContractError}; +use dusk_core::transfer::{Transaction, TRANSFER_CONTRACT}; +use dusk_core::{BlsScalar, ContractError, LUX}; use rand::rngs::StdRng; use rusk_abi::{CallReceipt, PiecrustError, Session}; use rusk_prover::LocalProver; diff --git a/contracts/stake/tests/events.rs b/contracts/stake/tests/events.rs index ea1702d012..3e6e809d47 100644 --- a/contracts/stake/tests/events.rs +++ b/contracts/stake/tests/events.rs @@ -10,7 +10,7 @@ use common::assert::assert_slash_event; use rand::rngs::StdRng; use rand::SeedableRng; -use execution_core::{ +use dusk_core::{ dusk, signatures::bls::{PublicKey as BlsPublicKey, SecretKey as BlsSecretKey}, stake::{ diff --git a/contracts/stake/tests/partial_stake.rs b/contracts/stake/tests/partial_stake.rs index 6dcff4f22e..8629d0fab8 100644 --- a/contracts/stake/tests/partial_stake.rs +++ b/contracts/stake/tests/partial_stake.rs @@ -4,12 +4,12 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -use execution_core::dusk; -use execution_core::signatures::bls::{ +use dusk_core::dusk; +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; -use execution_core::stake::{Reward, RewardReason, EPOCH, STAKE_CONTRACT}; -use execution_core::transfer::TRANSFER_CONTRACT; +use dusk_core::stake::{Reward, RewardReason, EPOCH, STAKE_CONTRACT}; +use dusk_core::transfer::TRANSFER_CONTRACT; use rand::rngs::StdRng; use rand::SeedableRng; use rusk_abi::{ContractData, PiecrustError, Session, VM}; diff --git a/contracts/stake/tests/stake.rs b/contracts/stake/tests/stake.rs index 265405499d..1af234b93b 100644 --- a/contracts/stake/tests/stake.rs +++ b/contracts/stake/tests/stake.rs @@ -6,27 +6,25 @@ pub mod common; +use dusk_core::signatures::bls::{ + PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, +}; +use dusk_core::stake::{ + Reward, RewardReason, Stake, Withdraw as StakeWithdraw, STAKE_CONTRACT, +}; +use dusk_core::transfer::data::ContractCall; +use dusk_core::transfer::phoenix::{ + PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, + ViewKey as PhoenixViewKey, +}; +use dusk_core::transfer::withdraw::{ + Withdraw, WithdrawReceiver, WithdrawReplayToken, +}; +use dusk_core::{dusk, JubJubScalar}; use ff::Field; use rand::rngs::StdRng; use rand::SeedableRng; -use execution_core::{ - dusk, - signatures::bls::{PublicKey as BlsPublicKey, SecretKey as BlsSecretKey}, - stake::{ - Reward, RewardReason, Stake, Withdraw as StakeWithdraw, STAKE_CONTRACT, - }, - transfer::{ - data::ContractCall, - phoenix::{ - PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, - ViewKey as PhoenixViewKey, - }, - withdraw::{Withdraw, WithdrawReceiver, WithdrawReplayToken}, - }, - JubJubScalar, -}; - use crate::common::assert::{ assert_reward_event, assert_stake, assert_stake_event, }; diff --git a/contracts/transfer/Cargo.toml b/contracts/transfer/Cargo.toml index 1a64e8a680..c7064c23c4 100644 --- a/contracts/transfer/Cargo.toml +++ b/contracts/transfer/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -execution-core = { workspace = true } +dusk-core = { workspace = true } ringbuffer = { workspace = true } [target.'cfg(target_family = "wasm")'.dependencies] diff --git a/contracts/transfer/src/error.rs b/contracts/transfer/src/error.rs index bba46564d1..9da4e7c7f0 100644 --- a/contracts/transfer/src/error.rs +++ b/contracts/transfer/src/error.rs @@ -5,11 +5,11 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use core::fmt; -use execution_core::Error as ExecutionError; +use dusk_core::Error as ExecutionError; #[derive(Debug, Clone)] pub enum Error { - /// Wrapper of execution-core error type. + /// Wrapper of dusk-core error type. Execution(ExecutionError), /// A contract balance is not sufficient for the requested withdrawal NotEnoughBalance, diff --git a/contracts/transfer/src/lib.rs b/contracts/transfer/src/lib.rs index 03dfdc1871..5c089b0e8f 100644 --- a/contracts/transfer/src/lib.rs +++ b/contracts/transfer/src/lib.rs @@ -18,7 +18,7 @@ mod transitory; mod tree; mod verifier_data; -use execution_core::stake::STAKE_CONTRACT; +use dusk_core::stake::STAKE_CONTRACT; use state::TransferState; static mut STATE: TransferState = TransferState::new(); diff --git a/contracts/transfer/src/state.rs b/contracts/transfer/src/state.rs index b2873503be..2069e003d9 100644 --- a/contracts/transfer/src/state.rs +++ b/contracts/transfer/src/state.rs @@ -12,11 +12,11 @@ use alloc::collections::btree_map::Entry; use alloc::collections::{BTreeMap, BTreeSet}; use alloc::vec::Vec; -use execution_core::stake::EPOCH; -use execution_core::transfer::MINT_CONTRACT_TOPIC; +use dusk_core::stake::EPOCH; +use dusk_core::transfer::MINT_CONTRACT_TOPIC; use ringbuffer::{ConstGenericRingBuffer, RingBuffer}; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as AccountPublicKey, stake::STAKE_CONTRACT, transfer::{ diff --git a/contracts/transfer/src/transitory.rs b/contracts/transfer/src/transitory.rs index 259eb83165..60158e2506 100644 --- a/contracts/transfer/src/transitory.rs +++ b/contracts/transfer/src/transitory.rs @@ -16,7 +16,7 @@ use core::ptr::{self, addr_of_mut}; use alloc::vec::Vec; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as AccountPublicKey, transfer::{ moonlight::Transaction as MoonlightTransaction, diff --git a/contracts/transfer/src/tree.rs b/contracts/transfer/src/tree.rs index 44b05ecc70..2f063d893a 100644 --- a/contracts/transfer/src/tree.rs +++ b/contracts/transfer/src/tree.rs @@ -6,7 +6,7 @@ use alloc::vec::Vec; -use execution_core::{ +use dusk_core::{ transfer::phoenix::{Note, NoteLeaf, NoteOpening, NoteTreeItem, NotesTree}, BlsScalar, }; diff --git a/contracts/transfer/tests/common/utils.rs b/contracts/transfer/tests/common/utils.rs index 44847090c5..aabab59197 100644 --- a/contracts/transfer/tests/common/utils.rs +++ b/contracts/transfer/tests/common/utils.rs @@ -6,13 +6,11 @@ use std::sync::mpsc; -use execution_core::signatures::bls::PublicKey as AccountPublicKey; -use execution_core::transfer::moonlight::AccountData; -use execution_core::transfer::phoenix::{ - Note, NoteLeaf, ViewKey as PhoenixViewKey, -}; -use execution_core::transfer::{Transaction, TRANSFER_CONTRACT}; -use execution_core::{BlsScalar, ContractError, ContractId}; +use dusk_core::signatures::bls::PublicKey as AccountPublicKey; +use dusk_core::transfer::moonlight::AccountData; +use dusk_core::transfer::phoenix::{Note, NoteLeaf, ViewKey as PhoenixViewKey}; +use dusk_core::transfer::{Transaction, TRANSFER_CONTRACT}; +use dusk_core::{BlsScalar, ContractError, ContractId}; use rusk_abi::{CallReceipt, PiecrustError, Session}; const GAS_LIMIT: u64 = 0x10_000_000; diff --git a/contracts/transfer/tests/moonlight.rs b/contracts/transfer/tests/moonlight.rs index fe9827e796..574fc1300c 100644 --- a/contracts/transfer/tests/moonlight.rs +++ b/contracts/transfer/tests/moonlight.rs @@ -15,23 +15,22 @@ use ff::Field; use rand::rngs::StdRng; use rand::SeedableRng; -use execution_core::{ - dusk, - signatures::bls::{ - PublicKey as AccountPublicKey, SecretKey as AccountSecretKey, - }, - transfer::{ - data::{ContractCall, TransactionData}, - moonlight::Transaction as MoonlightTransaction, - phoenix::{ - Note, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, - ViewKey as PhoenixViewKey, - }, - withdraw::{Withdraw, WithdrawReceiver, WithdrawReplayToken}, - ContractToAccount, ContractToContract, TRANSFER_CONTRACT, - }, - BlsScalar, ContractError, ContractId, JubJubScalar, LUX, +use dusk_core::signatures::bls::{ + PublicKey as AccountPublicKey, SecretKey as AccountSecretKey, }; +use dusk_core::transfer::data::{ContractCall, TransactionData}; +use dusk_core::transfer::moonlight::Transaction as MoonlightTransaction; +use dusk_core::transfer::phoenix::{ + Note, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, + ViewKey as PhoenixViewKey, +}; +use dusk_core::transfer::withdraw::{ + Withdraw, WithdrawReceiver, WithdrawReplayToken, +}; +use dusk_core::transfer::{ + ContractToAccount, ContractToContract, TRANSFER_CONTRACT, +}; +use dusk_core::{dusk, ContractError, ContractId, JubJubScalar, LUX}; use rusk_abi::{ContractData, Session}; const MOONLIGHT_GENESIS_VALUE: u64 = dusk(1_000.0); diff --git a/contracts/transfer/tests/phoenix.rs b/contracts/transfer/tests/phoenix.rs index 38e85e5260..7882126bd2 100644 --- a/contracts/transfer/tests/phoenix.rs +++ b/contracts/transfer/tests/phoenix.rs @@ -19,7 +19,7 @@ use ff::Field; use rand::rngs::StdRng; use rand::{CryptoRng, RngCore, SeedableRng}; -use execution_core::{ +use dusk_core::{ dusk, signatures::bls::{ PublicKey as AccountPublicKey, SecretKey as AccountSecretKey, diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md new file mode 100644 index 0000000000..f5de121c82 --- /dev/null +++ b/core/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Add types, type-alias, functionality, re-exports and modules to interact with dusk-network + + + diff --git a/execution-core/Cargo.toml b/core/Cargo.toml similarity index 98% rename from execution-core/Cargo.toml rename to core/Cargo.toml index 9243deca2d..307dcfb216 100644 --- a/execution-core/Cargo.toml +++ b/core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "execution-core" +name = "dusk-core" version = "0.1.0" edition = "2021" diff --git a/execution-core/Makefile b/core/Makefile similarity index 100% rename from execution-core/Makefile rename to core/Makefile diff --git a/execution-core/src/dusk.rs b/core/src/dusk.rs similarity index 100% rename from execution-core/src/dusk.rs rename to core/src/dusk.rs diff --git a/execution-core/src/error.rs b/core/src/error.rs similarity index 97% rename from execution-core/src/error.rs rename to core/src/error.rs index e4dd4a1598..d4e5bfcd65 100644 --- a/execution-core/src/error.rs +++ b/core/src/error.rs @@ -4,12 +4,12 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -//! Error-type for execution-core. +//! Error-type for dusk-core. use alloc::string::String; use core::fmt; -/// The execution-core error type. +/// The dusk-core error type. #[derive(Debug, Clone, PartialEq)] pub enum Error { /// There is not sufficient balance to cover the transaction costs. diff --git a/execution-core/src/lib.rs b/core/src/lib.rs similarity index 100% rename from execution-core/src/lib.rs rename to core/src/lib.rs diff --git a/execution-core/src/stake.rs b/core/src/stake.rs similarity index 100% rename from execution-core/src/stake.rs rename to core/src/stake.rs diff --git a/execution-core/src/transfer.rs b/core/src/transfer.rs similarity index 100% rename from execution-core/src/transfer.rs rename to core/src/transfer.rs diff --git a/execution-core/src/transfer/data.rs b/core/src/transfer/data.rs similarity index 100% rename from execution-core/src/transfer/data.rs rename to core/src/transfer/data.rs diff --git a/execution-core/src/transfer/moonlight.rs b/core/src/transfer/moonlight.rs similarity index 100% rename from execution-core/src/transfer/moonlight.rs rename to core/src/transfer/moonlight.rs diff --git a/execution-core/src/transfer/phoenix.rs b/core/src/transfer/phoenix.rs similarity index 100% rename from execution-core/src/transfer/phoenix.rs rename to core/src/transfer/phoenix.rs diff --git a/execution-core/src/transfer/withdraw.rs b/core/src/transfer/withdraw.rs similarity index 100% rename from execution-core/src/transfer/withdraw.rs rename to core/src/transfer/withdraw.rs diff --git a/execution-core/tests/serialization.rs b/core/tests/serialization.rs similarity index 97% rename from execution-core/tests/serialization.rs rename to core/tests/serialization.rs index 4c4bb8626c..e1644f0d2f 100644 --- a/execution-core/tests/serialization.rs +++ b/core/tests/serialization.rs @@ -4,18 +4,18 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as AccountPublicKey, SecretKey as AccountSecretKey, }; -use execution_core::transfer::data::{ +use dusk_core::transfer::data::{ ContractBytecode, ContractCall, ContractDeploy, TransactionData, }; -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::phoenix::{ Note, NoteTreeItem, NotesTree, Prove, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, TxCircuitVec, }; -use execution_core::transfer::Transaction; -use execution_core::{BlsScalar, Error, JubJubScalar}; +use dusk_core::transfer::Transaction; +use dusk_core::{BlsScalar, Error, JubJubScalar}; use ff::Field; use rand::rngs::StdRng; use rand::{CryptoRng, Rng, RngCore, SeedableRng}; diff --git a/execution-core/tests/transaction.rs b/core/tests/transaction.rs similarity index 97% rename from execution-core/tests/transaction.rs rename to core/tests/transaction.rs index 1a7d10cd67..5e4615c9ce 100644 --- a/execution-core/tests/transaction.rs +++ b/core/tests/transaction.rs @@ -4,18 +4,16 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as AccountPublicKey, SecretKey as AccountSecretKey, }; -use execution_core::transfer::data::{ - ContractCall, TransactionData, MAX_MEMO_SIZE, -}; -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::data::{ContractCall, TransactionData, MAX_MEMO_SIZE}; +use dusk_core::transfer::phoenix::{ Note, NoteOpening, NoteTreeItem, NotesTree, Prove, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, TxCircuitVec, }; -use execution_core::transfer::Transaction; -use execution_core::{Error, JubJubScalar}; +use dusk_core::transfer::Transaction; +use dusk_core::{Error, JubJubScalar}; use ff::Field; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; diff --git a/execution-core/CHANGELOG.md b/execution-core/CHANGELOG.md deleted file mode 100644 index 12a1a43d5b..0000000000 --- a/execution-core/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -### Added - -- Add `groth16` module allowing for proof generation and verification -- Derive `PartialEq` for `Error` -- Add tests for transaction-creation - -### Removed - -- Remove licenses module - -## [0.1.0] - 2024-09-10 - -### Added - -- Add types, type-alias, functionality, re-exports and modules to interact with the execution layer of dusk-network - -[Unreleased]: https://github.com/dusk-network/rusk/compare/execution-core-0.1.0...HEAD -[0.1.0]: https://github.com/dusk-network/rusk/releases/tag/execution-core-0.1.0 diff --git a/node-data/Cargo.toml b/node-data/Cargo.toml index aabca15231..5cf33034b4 100644 --- a/node-data/Cargo.toml +++ b/node-data/Cargo.toml @@ -9,7 +9,7 @@ sha3 = { workspace = true } sha2 = { workspace = true } rand = { workspace = true, features = ["std_rng"] } hex = { workspace = true } -execution-core = { workspace = true } +dusk-core = { workspace = true } block-modes = { workspace = true } aes = { workspace = true } diff --git a/node-data/src/bls.rs b/node-data/src/bls.rs index 34d22a9e3a..817ab1fc4a 100644 --- a/node-data/src/bls.rs +++ b/node-data/src/bls.rs @@ -15,7 +15,7 @@ use base64::Engine; use block_modes::block_padding::Pkcs7; use block_modes::{BlockMode, BlockModeError, Cbc}; use dusk_bytes::{DeserializableSlice, Serializable}; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; use rand::rngs::StdRng; diff --git a/node-data/src/encoding.rs b/node-data/src/encoding.rs index 7f47d5b49c..32b56b7c61 100644 --- a/node-data/src/encoding.rs +++ b/node-data/src/encoding.rs @@ -6,7 +6,7 @@ use std::io::{self, Read, Write}; -use execution_core::transfer::Transaction as ProtocolTransaction; +use dusk_core::transfer::Transaction as ProtocolTransaction; use crate::bls::PublicKeyBytes; use crate::ledger::{ diff --git a/node-data/src/events/contract.rs b/node-data/src/events/contract.rs index 8235aacb85..a335e564e1 100644 --- a/node-data/src/events/contract.rs +++ b/node-data/src/events/contract.rs @@ -7,7 +7,7 @@ //! This module defines the contract event type and related types. use anyhow::Result; -use execution_core::{ContractId, Event, CONTRACT_ID_BYTES}; +use dusk_core::{ContractId, Event, CONTRACT_ID_BYTES}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; pub const ORIGIN_HASH_BYTES: usize = 32; @@ -94,8 +94,8 @@ pub struct ContractEvent { pub data: Vec, } -impl From for ContractEvent { - fn from(event: execution_core::Event) -> Self { +impl From for ContractEvent { + fn from(event: dusk_core::Event) -> Self { Self { target: WrappedContractId(event.source), topic: event.topic, @@ -116,7 +116,7 @@ impl From for Event { #[cfg(test)] mod tests { - use execution_core::ContractId; + use dusk_core::ContractId; use super::*; diff --git a/node-data/src/events/transactions.rs b/node-data/src/events/transactions.rs index 91cc65900e..f7f5b30f51 100644 --- a/node-data/src/events/transactions.rs +++ b/node-data/src/events/transactions.rs @@ -6,7 +6,7 @@ use std::collections::HashMap; -use execution_core::transfer::RefundAddress; +use dusk_core::transfer::RefundAddress; use super::*; use crate::ledger::{Hash, SpentTransaction, Transaction}; @@ -70,7 +70,7 @@ impl EventSource for TransactionEvent<'_> { use base64::engine::general_purpose::STANDARD as BASE64_ENGINE; use base64::Engine; use dusk_bytes::Serializable; -use execution_core::transfer::Transaction as ProtocolTransaction; +use dusk_core::transfer::Transaction as ProtocolTransaction; use serde::ser::{Serialize, SerializeStruct, Serializer}; impl Serialize for Transaction { @@ -162,10 +162,10 @@ impl Serialize for Transaction { } } -struct Note<'a>(&'a execution_core::transfer::phoenix::Note); +struct Note<'a>(&'a dusk_core::transfer::phoenix::Note); -impl<'a> From<&'a execution_core::transfer::phoenix::Note> for Note<'a> { - fn from(value: &'a execution_core::transfer::phoenix::Note) -> Self { +impl<'a> From<&'a dusk_core::transfer::phoenix::Note> for Note<'a> { + fn from(value: &'a dusk_core::transfer::phoenix::Note) -> Self { Self(value) } } diff --git a/node-data/src/ledger/faults.rs b/node-data/src/ledger/faults.rs index f9948d39f1..d34e55ab2a 100644 --- a/node-data/src/ledger/faults.rs +++ b/node-data/src/ledger/faults.rs @@ -5,11 +5,11 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use dusk_bytes::Serializable as DuskSerializeble; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ Error as BlsSigError, MultisigPublicKey as BlsMultisigPublicKey, MultisigSignature as BlsMultisigSignature, }; -use execution_core::stake::EPOCH; +use dusk_core::stake::EPOCH; use thiserror::Error; use tracing::error; diff --git a/node-data/src/ledger/transaction.rs b/node-data/src/ledger/transaction.rs index ce129bb727..ab732ffaef 100644 --- a/node-data/src/ledger/transaction.rs +++ b/node-data/src/ledger/transaction.rs @@ -7,8 +7,8 @@ use std::io; use dusk_bytes::Serializable as DuskSerializable; -use execution_core::signatures::bls; -use execution_core::transfer::Transaction as ProtocolTransaction; +use dusk_core::signatures::bls; +use dusk_core::transfer::Transaction as ProtocolTransaction; use serde::Serialize; use sha3::Digest; @@ -154,13 +154,13 @@ impl SpendingId { #[cfg(any(feature = "faker", test))] pub mod faker { - use execution_core::transfer::data::{ContractCall, TransactionData}; - use execution_core::transfer::phoenix::{ + use dusk_core::transfer::data::{ContractCall, TransactionData}; + use dusk_core::transfer::phoenix::{ Fee, Note, Payload as PhoenixPayload, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, Transaction as PhoenixTransaction, TxSkeleton, }; - use execution_core::{BlsScalar, JubJubScalar}; + use dusk_core::{BlsScalar, JubJubScalar}; use rand::Rng; use super::*; diff --git a/node-data/src/message.rs b/node-data/src/message.rs index 1349346c15..528ca65cae 100644 --- a/node-data/src/message.rs +++ b/node-data/src/message.rs @@ -11,7 +11,7 @@ use std::net::SocketAddr; use async_channel::TrySendError; use dusk_bytes::Serializable as DuskSerializable; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ Error as BlsSigError, MultisigPublicKey as BlsMultisigPublicKey, MultisigSignature as BlsMultisigSignature, PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, diff --git a/node/Cargo.toml b/node/Cargo.toml index ab7746fea2..5321ecdbed 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -24,7 +24,7 @@ rkyv = { workspace = true } rocksdb = { workspace = true } dusk-bytes = { workspace = true } node-data = { workspace = true } -execution-core = { workspace = true } +dusk-core = { workspace = true } smallvec = { workspace = true } serde = { workspace = true } diff --git a/node/benches/accept.rs b/node/benches/accept.rs index b0c6e8e58a..fc13a55541 100644 --- a/node/benches/accept.rs +++ b/node/benches/accept.rs @@ -18,7 +18,7 @@ use dusk_consensus::user::cluster::Cluster; use dusk_consensus::user::committee::Committee; use dusk_consensus::user::provisioners::Provisioners; use dusk_consensus::user::sortition::Config as SortitionConfig; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ MultisigSignature as BlsMultisigSignature, PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; diff --git a/node/src/archive/moonlight.rs b/node/src/archive/moonlight.rs index 366a46079c..78ff5c4e4f 100644 --- a/node/src/archive/moonlight.rs +++ b/node/src/archive/moonlight.rs @@ -11,7 +11,7 @@ use std::sync::Arc; use anyhow::{anyhow, Result}; use dusk_bytes::Serializable; -use execution_core::signatures::bls::PublicKey as AccountPublicKey; +use dusk_core::signatures::bls::PublicKey as AccountPublicKey; use node_data::events::contract::{ContractEvent, OriginHash}; use rocksdb::{ BlockBasedOptions, ColumnFamily, ColumnFamilyDescriptor, DBPinnableSlice, @@ -753,12 +753,12 @@ mod tests { use std::env; use std::path::PathBuf; - use execution_core::signatures::bls::SecretKey; - use execution_core::transfer::withdraw::WithdrawReceiver; - use execution_core::transfer::{ + use dusk_core::signatures::bls::SecretKey; + use dusk_core::transfer::withdraw::WithdrawReceiver; + use dusk_core::transfer::{ ConvertEvent, DepositEvent, MoonlightTransactionEvent, WithdrawEvent, }; - use execution_core::{ContractId, CONTRACT_ID_BYTES}; + use dusk_core::{ContractId, CONTRACT_ID_BYTES}; use node_data::events::contract::{ ContractEvent, ContractTxEvent, WrappedContractId, ORIGIN_HASH_BYTES, }; @@ -803,7 +803,7 @@ mod tests { ContractTxEvent { event: ContractEvent { target: WrappedContractId( - execution_core::transfer::TRANSFER_CONTRACT, + dusk_core::transfer::TRANSFER_CONTRACT, ), topic: "phoenix".to_string(), data: rkyv::to_bytes::<_, 256>(&fake_phoenix_tx_event_data) @@ -824,7 +824,7 @@ mod tests { ContractTxEvent { event: ContractEvent { target: WrappedContractId( - execution_core::transfer::TRANSFER_CONTRACT, + dusk_core::transfer::TRANSFER_CONTRACT, ), topic: "convert".to_string(), data: rkyv::to_bytes::<_, 256>(&convert_event) @@ -854,7 +854,7 @@ mod tests { ContractTxEvent { event: ContractEvent { target: WrappedContractId( - execution_core::transfer::TRANSFER_CONTRACT, + dusk_core::transfer::TRANSFER_CONTRACT, ), topic: "moonlight".to_string(), data: rkyv::to_bytes::<_, 256>(&moonlight_tx_event) @@ -875,7 +875,7 @@ mod tests { ContractTxEvent { event: ContractEvent { target: WrappedContractId( - execution_core::transfer::TRANSFER_CONTRACT, + dusk_core::transfer::TRANSFER_CONTRACT, ), topic: "withdraw".to_string(), data: rkyv::to_bytes::<_, 256>(&withdraw_event) @@ -896,7 +896,7 @@ mod tests { ContractTxEvent { event: ContractEvent { target: WrappedContractId( - execution_core::transfer::TRANSFER_CONTRACT, + dusk_core::transfer::TRANSFER_CONTRACT, ), topic: "deposit".to_string(), data: rkyv::to_bytes::<_, 256>(&deposit_event) @@ -917,7 +917,7 @@ mod tests { ContractTxEvent { event: ContractEvent { target: WrappedContractId( - execution_core::transfer::TRANSFER_CONTRACT, + dusk_core::transfer::TRANSFER_CONTRACT, ), topic: "deposit".to_string(), data: rkyv::to_bytes::<_, 256>(&deposit_event) @@ -1186,7 +1186,7 @@ mod tests { assert_eq!(e.topic, "moonlight"); assert_eq!( e.target, - WrappedContractId(execution_core::transfer::TRANSFER_CONTRACT) + WrappedContractId(dusk_core::transfer::TRANSFER_CONTRACT) ); let moonlight_event = @@ -1208,9 +1208,7 @@ mod tests { assert_eq!(e.topic, "moonlight"); assert_eq!( e.target, - WrappedContractId( - execution_core::transfer::TRANSFER_CONTRACT - ) + WrappedContractId(dusk_core::transfer::TRANSFER_CONTRACT) ); let moonlight_event = diff --git a/node/src/archive/sqlite.rs b/node/src/archive/sqlite.rs index fdfef89c35..cb176e1579 100644 --- a/node/src/archive/sqlite.rs +++ b/node/src/archive/sqlite.rs @@ -305,8 +305,8 @@ impl Archive { 1. Any PhoenixTransactionEvent (through notes & refund_note) */ let phoenix_event_present = events.iter().any(|event| { - event.event.target.0 == execution_core::transfer::TRANSFER_CONTRACT - && event.event.topic == execution_core::transfer::PHOENIX_TOPIC + event.event.target.0 == dusk_core::transfer::TRANSFER_CONTRACT + && event.event.topic == dusk_core::transfer::PHOENIX_TOPIC }); // Group events by origin (block height, OriginHash) @@ -501,7 +501,7 @@ mod tests { use std::env; use std::path::PathBuf; - use execution_core::ContractId; + use dusk_core::ContractId; use node_data::events::contract::{ContractEvent, WrappedContractId}; use rand::distributions::Alphanumeric; use rand::Rng; diff --git a/node/src/archive/transformer.rs b/node/src/archive/transformer.rs index 51088ef193..cba996e826 100644 --- a/node/src/archive/transformer.rs +++ b/node/src/archive/transformer.rs @@ -6,9 +6,9 @@ use std::collections::BTreeMap; -use execution_core::signatures::bls::PublicKey as AccountPublicKey; -use execution_core::transfer::withdraw::WithdrawReceiver; -use execution_core::transfer::{ +use dusk_core::signatures::bls::PublicKey as AccountPublicKey; +use dusk_core::transfer::withdraw::WithdrawReceiver; +use dusk_core::transfer::{ ConvertEvent, MoonlightTransactionEvent, WithdrawEvent, CONVERT_TOPIC, MINT_TOPIC, MOONLIGHT_TOPIC, TRANSFER_CONTRACT, WITHDRAW_TOPIC, }; diff --git a/node/src/chain/acceptor.rs b/node/src/chain/acceptor.rs index 79b6fd6847..a7431e906a 100644 --- a/node/src/chain/acceptor.rs +++ b/node/src/chain/acceptor.rs @@ -19,8 +19,8 @@ use dusk_consensus::errors::{ConsensusError, HeaderError}; use dusk_consensus::operations::Voter; use dusk_consensus::user::provisioners::{ContextProvisioners, Provisioners}; use dusk_consensus::user::stake::Stake; -use execution_core::signatures::bls; -use execution_core::stake::{SlashEvent, StakeAmount, StakeEvent}; +use dusk_core::signatures::bls; +use dusk_core::stake::{SlashEvent, StakeAmount, StakeEvent}; use metrics::{counter, gauge, histogram}; use node_data::bls::PublicKey; use node_data::events::contract::ContractEvent; diff --git a/node/src/chain/consensus.rs b/node/src/chain/consensus.rs index e4e6eee572..756156ae32 100644 --- a/node/src/chain/consensus.rs +++ b/node/src/chain/consensus.rs @@ -56,7 +56,7 @@ pub(crate) struct Task { /// Loaded Consensus keys pub keys: ( - execution_core::signatures::bls::SecretKey, + dusk_core::signatures::bls::SecretKey, node_data::bls::PublicKey, ), } diff --git a/node/src/chain/header_validation.rs b/node/src/chain/header_validation.rs index 4e08aae794..2269760c86 100644 --- a/node/src/chain/header_validation.rs +++ b/node/src/chain/header_validation.rs @@ -19,10 +19,10 @@ use dusk_consensus::quorum::verifiers; use dusk_consensus::quorum::verifiers::QuorumResult; use dusk_consensus::user::committee::CommitteeSet; use dusk_consensus::user::provisioners::{ContextProvisioners, Provisioners}; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ MultisigPublicKey, MultisigSignature, PublicKey as BlsPublicKey, }; -use execution_core::stake::EPOCH; +use dusk_core::stake::EPOCH; use hex; use node_data::bls::PublicKeyBytes; use node_data::ledger::{Fault, InvalidFault, Seed, Signature}; diff --git a/node/src/vm.rs b/node/src/vm.rs index c999335d1e..9e5885cd7d 100644 --- a/node/src/vm.rs +++ b/node/src/vm.rs @@ -8,9 +8,9 @@ use dusk_consensus::errors::VstError; use dusk_consensus::operations::{CallParams, VerificationOutput, Voter}; use dusk_consensus::user::provisioners::Provisioners; use dusk_consensus::user::stake::Stake; -use execution_core::signatures::bls::PublicKey as BlsPublicKey; -use execution_core::transfer::data::ContractBytecode; -use execution_core::transfer::moonlight::AccountData; +use dusk_core::signatures::bls::PublicKey as BlsPublicKey; +use dusk_core::transfer::data::ContractBytecode; +use dusk_core::transfer::moonlight::AccountData; use node_data::events::contract::ContractEvent; use node_data::ledger::{Block, SpentTransaction, Transaction}; diff --git a/rusk-abi/Cargo.toml b/rusk-abi/Cargo.toml index 0c22cff7e0..9507172ae0 100644 --- a/rusk-abi/Cargo.toml +++ b/rusk-abi/Cargo.toml @@ -10,7 +10,7 @@ exclude = [".github/workflows/ci.yml", ".gitignore"] [dependencies] dusk-bytes = { workspace = true } -execution-core = { workspace = true, features = ["zk"] } +dusk-core = { workspace = true, features = ["zk"] } # abi feature dependency piecrust-uplink = { workspace = true, features = ["abi"], optional = true } @@ -40,7 +40,7 @@ dlmalloc = ["piecrust-uplink/dlmalloc"] # These are the features available for when one wishes to use `rusk-abi` as a # host. -host = ["piecrust", "lru", "execution-core/parallel", "blake2b_simd", "dusk-poseidon", "rkyv"] +host = ["piecrust", "lru", "dusk-core/parallel", "blake2b_simd", "dusk-poseidon", "rkyv"] host_debug = ["piecrust/debug", "lru"] [[test]] diff --git a/rusk-abi/src/abi.rs b/rusk-abi/src/abi.rs index b1719a187c..7a4da2a4cf 100644 --- a/rusk-abi/src/abi.rs +++ b/rusk-abi/src/abi.rs @@ -7,13 +7,13 @@ use alloc::vec::Vec; use dusk_bytes::Serializable; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ MultisigSignature, PublicKey as BlsPublicKey, Signature as BlsSignature, }; -use execution_core::signatures::schnorr::{ +use dusk_core::signatures::schnorr::{ PublicKey as SchnorrPublicKey, Signature as SchnorrSignature, }; -use execution_core::{BlsScalar, ContractId}; +use dusk_core::{BlsScalar, ContractId}; use piecrust_uplink::{host_query, meta_data}; use crate::{Metadata, Query}; diff --git a/rusk-abi/src/host.rs b/rusk-abi/src/host.rs index c3505a7211..8cc8b38007 100644 --- a/rusk-abi/src/host.rs +++ b/rusk-abi/src/host.rs @@ -8,21 +8,21 @@ use alloc::vec::Vec; use std::path::{Path, PathBuf}; use dusk_bytes::DeserializableSlice; -use dusk_poseidon::{Domain, Hash as PoseidonHash}; -use execution_core::groth16::bn254::{Bn254, G1Projective}; -use execution_core::groth16::serialize::CanonicalDeserialize; -use execution_core::groth16::{ +use dusk_core::groth16::bn254::{Bn254, G1Projective}; +use dusk_core::groth16::serialize::CanonicalDeserialize; +use dusk_core::groth16::{ Groth16, PreparedVerifyingKey, Proof as Groth16Proof, }; -use execution_core::plonk::{Proof as PlonkProof, Verifier}; -use execution_core::signatures::bls::{ +use dusk_core::plonk::{Proof as PlonkProof, Verifier}; +use dusk_core::signatures::bls::{ MultisigPublicKey, MultisigSignature, PublicKey as BlsPublicKey, Signature as BlsSignature, }; -use execution_core::signatures::schnorr::{ +use dusk_core::signatures::schnorr::{ PublicKey as SchnorrPublicKey, Signature as SchnorrSignature, }; -use execution_core::BlsScalar; +use dusk_core::BlsScalar; +use dusk_poseidon::{Domain, Hash as PoseidonHash}; use piecrust::{Error as PiecrustError, Session, SessionData, VM}; use rkyv::ser::serializers::AllocSerializer; use rkyv::{Archive, Deserialize, Serialize}; diff --git a/rusk-abi/tests/lib.rs b/rusk-abi/tests/lib.rs index 65c25939bb..73211200f5 100644 --- a/rusk-abi/tests/lib.rs +++ b/rusk-abi/tests/lib.rs @@ -9,26 +9,26 @@ use std::sync::OnceLock; use dusk_bytes::{ParseHexStr, Serializable}; -use execution_core::groth16::bn254::{Bn254, Fr as Bn254Fr}; -use execution_core::groth16::relations::lc; -use execution_core::groth16::relations::r1cs::{ +use dusk_core::groth16::bn254::{Bn254, Fr as Bn254Fr}; +use dusk_core::groth16::relations::lc; +use dusk_core::groth16::relations::r1cs::{ ConstraintSynthesizer, ConstraintSystemRef, Field as Groth16Field, SynthesisError, Variable, }; -use execution_core::groth16::serialize::{CanonicalSerialize, Compress}; -use execution_core::groth16::verifier::prepare_verifying_key; -use execution_core::groth16::Groth16; -use execution_core::plonk::{ +use dusk_core::groth16::serialize::{CanonicalSerialize, Compress}; +use dusk_core::groth16::verifier::prepare_verifying_key; +use dusk_core::groth16::Groth16; +use dusk_core::plonk::{ Circuit, Compiler, Composer, Constraint, Error as PlonkError, PublicParameters, }; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; -use execution_core::signatures::schnorr::{ +use dusk_core::signatures::schnorr::{ PublicKey as SchnorrPublicKey, SecretKey as SchnorrSecretKey, }; -use execution_core::{BlsScalar, ContractId}; +use dusk_core::{BlsScalar, ContractId}; use ff::Field; use rand::rngs::OsRng; use rusk_abi::{ContractData, Session, VM}; diff --git a/rusk-prover/Cargo.toml b/rusk-prover/Cargo.toml index 36636546d9..05811e4eff 100644 --- a/rusk-prover/Cargo.toml +++ b/rusk-prover/Cargo.toml @@ -10,7 +10,7 @@ once_cell = { workspace = true } rand = { workspace = true, features = ["getrandom"] } dusk-plonk = { workspace = true, features = ["rkyv-impl", "alloc"] } rusk-profile = { workspace = true } -execution-core = { workspace = true, features = ["zk"] } +dusk-core = { workspace = true, features = ["zk"] } # debug dependencies hex = { workspace = true, optional = true } diff --git a/rusk-prover/src/lib.rs b/rusk-prover/src/lib.rs index 89cb41f41f..1476fa9ca7 100644 --- a/rusk-prover/src/lib.rs +++ b/rusk-prover/src/lib.rs @@ -16,11 +16,11 @@ use alloc::format; use alloc::vec::Vec; use dusk_bytes::Serializable; -use dusk_plonk::prelude::Prover as PlonkProver; -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::phoenix::{ Prove, TxCircuit, TxCircuitVec, NOTES_TREE_DEPTH, }; -use execution_core::Error; +use dusk_core::Error; +use dusk_plonk::prelude::Prover as PlonkProver; use once_cell::sync::Lazy; static TX_CIRCUIT_1_2_PROVER: Lazy = diff --git a/rusk-recovery/Cargo.toml b/rusk-recovery/Cargo.toml index 3f8109155a..fd7716ebec 100644 --- a/rusk-recovery/Cargo.toml +++ b/rusk-recovery/Cargo.toml @@ -14,7 +14,7 @@ path = "src/lib.rs" rusk-profile = { workspace = true } # stake and keys feature dependency -execution-core = { workspace = true, features = ["zk", "std"], optional = true } +dusk-core = { workspace = true, features = ["zk", "std"], optional = true } once_cell = { workspace = true, optional = true } tracing = { workspace = true, features = ["log"], optional = true } @@ -43,7 +43,7 @@ tokio = { workspace = true, features = ["full"], optional = true } [features] state = [ - "execution-core", + "dusk-core", "once_cell", "tracing", "serde_derive", @@ -62,7 +62,7 @@ state = [ "zip", ] keys = [ - "execution-core", + "dusk-core", "once_cell", "tracing", "cargo_toml", diff --git a/rusk-recovery/src/keys.rs b/rusk-recovery/src/keys.rs index 46c017a085..f2cc5d026a 100644 --- a/rusk-recovery/src/keys.rs +++ b/rusk-recovery/src/keys.rs @@ -7,8 +7,8 @@ use std::sync::{mpsc, Mutex}; use std::{io, thread}; +use dusk_core::transfer::phoenix::TRANSCRIPT_LABEL; use dusk_plonk::prelude::{Compiler, PublicParameters}; -use execution_core::transfer::phoenix::TRANSCRIPT_LABEL; use lazy_static::lazy_static; use once_cell::sync::Lazy; use rusk_profile::Circuit as CircuitProfile; diff --git a/rusk-recovery/src/keys/circuits.rs b/rusk-recovery/src/keys/circuits.rs index ba18d8a8a3..54d2c2ae77 100644 --- a/rusk-recovery/src/keys/circuits.rs +++ b/rusk-recovery/src/keys/circuits.rs @@ -7,8 +7,8 @@ use std::io::{self, ErrorKind}; use cargo_toml::{Dependency, Manifest}; +use dusk_core::transfer::phoenix::{TxCircuit, NOTES_TREE_DEPTH}; use dusk_plonk::prelude::Circuit; -use execution_core::transfer::phoenix::{TxCircuit, NOTES_TREE_DEPTH}; use tracing::info; type TxCircuitOneTwo = TxCircuit; diff --git a/rusk-recovery/src/state.rs b/rusk-recovery/src/state.rs index 2c9103bf1d..d310bf73a9 100644 --- a/rusk-recovery/src/state.rs +++ b/rusk-recovery/src/state.rs @@ -9,13 +9,11 @@ use std::fs; use std::path::Path; use dusk_bytes::DeserializableSlice; -use execution_core::signatures::bls::PublicKey as AccountPublicKey; -use execution_core::stake::{ - StakeAmount, StakeData, StakeKeys, STAKE_CONTRACT, -}; -use execution_core::transfer::phoenix::{Note, PublicKey, Sender}; -use execution_core::transfer::TRANSFER_CONTRACT; -use execution_core::{ContractId, JubJubScalar}; +use dusk_core::signatures::bls::PublicKey as AccountPublicKey; +use dusk_core::stake::{StakeAmount, StakeData, StakeKeys, STAKE_CONTRACT}; +use dusk_core::transfer::phoenix::{Note, PublicKey, Sender}; +use dusk_core::transfer::TRANSFER_CONTRACT; +use dusk_core::{ContractId, JubJubScalar}; use ff::Field; use once_cell::sync::Lazy; use rand::rngs::StdRng; diff --git a/rusk-recovery/src/state/snapshot.rs b/rusk-recovery/src/state/snapshot.rs index 80593581b6..3d0a0343f7 100644 --- a/rusk-recovery/src/state/snapshot.rs +++ b/rusk-recovery/src/state/snapshot.rs @@ -7,9 +7,9 @@ use std::fmt::Debug; use dusk_bytes::Serializable; -use execution_core::signatures::bls::PublicKey as AccountPublicKey; -use execution_core::transfer::phoenix::PublicKey as PhoenixPublicKey; -use execution_core::Dusk; +use dusk_core::signatures::bls::PublicKey as AccountPublicKey; +use dusk_core::transfer::phoenix::PublicKey as PhoenixPublicKey; +use dusk_core::Dusk; use serde_derive::{Deserialize, Serialize}; use crate::state; @@ -103,7 +103,7 @@ mod tests { use std::error::Error; - use execution_core::stake::MINIMUM_STAKE; + use dusk_core::stake::MINIMUM_STAKE; use super::*; use crate::state; diff --git a/rusk-recovery/src/state/snapshot/stake.rs b/rusk-recovery/src/state/snapshot/stake.rs index 367b78f252..bfad413ad5 100644 --- a/rusk-recovery/src/state/snapshot/stake.rs +++ b/rusk-recovery/src/state/snapshot/stake.rs @@ -5,9 +5,9 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use dusk_bytes::Serializable; -use execution_core::signatures::bls::PublicKey as BlsPublicKey; -use execution_core::stake::StakeKeys; -use execution_core::Dusk; +use dusk_core::signatures::bls::PublicKey as BlsPublicKey; +use dusk_core::stake::StakeKeys; +use dusk_core::Dusk; use serde_derive::{Deserialize, Serialize}; use super::wrapper::Wrapper; diff --git a/rusk-wallet/Cargo.toml b/rusk-wallet/Cargo.toml index 8101562651..2e1c14413a 100644 --- a/rusk-wallet/Cargo.toml +++ b/rusk-wallet/Cargo.toml @@ -44,7 +44,7 @@ blake2b_simd = { workspace = true } zeroize = { workspace = true, features = ["derive"] } wallet-core = { workspace = true } -execution-core = { workspace = true } +dusk-core = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = [ diff --git a/rusk-wallet/src/bin/command.rs b/rusk-wallet/src/bin/command.rs index 8120b72652..d980fe7e36 100644 --- a/rusk-wallet/src/bin/command.rs +++ b/rusk-wallet/src/bin/command.rs @@ -12,9 +12,9 @@ use std::fmt; use std::path::PathBuf; use clap::Subcommand; -use execution_core::stake::StakeData; -use execution_core::transfer::data::ContractCall; -use execution_core::{BlsScalar, CONTRACT_ID_BYTES}; +use dusk_core::stake::StakeData; +use dusk_core::transfer::data::ContractCall; +use dusk_core::{BlsScalar, CONTRACT_ID_BYTES}; use rusk_wallet::currency::{Dusk, Lux}; use rusk_wallet::gas::{ Gas, DEFAULT_LIMIT_CALL, DEFAULT_LIMIT_DEPLOYMENT, DEFAULT_LIMIT_TRANSFER, diff --git a/rusk-wallet/src/bin/command/history.rs b/rusk-wallet/src/bin/command/history.rs index 4f640aa88c..c3b3e04577 100644 --- a/rusk-wallet/src/bin/command/history.rs +++ b/rusk-wallet/src/bin/command/history.rs @@ -8,8 +8,8 @@ use std::collections::hash_map::Entry; use std::collections::HashMap; use std::fmt::{self, Display}; -use execution_core::transfer::Transaction; -use execution_core::{dusk, from_dusk}; +use dusk_core::transfer::Transaction; +use dusk_core::{dusk, from_dusk}; use rusk_wallet::{BlockTransaction, DecodedNote, GraphQL}; use crate::io::{self}; diff --git a/rusk-wallet/src/bin/interactive/command_menu.rs b/rusk-wallet/src/bin/interactive/command_menu.rs index f3bf05b5d5..7c2a71f0e3 100644 --- a/rusk-wallet/src/bin/interactive/command_menu.rs +++ b/rusk-wallet/src/bin/interactive/command_menu.rs @@ -6,7 +6,7 @@ use std::fmt::Display; -use execution_core::transfer::data::MAX_MEMO_SIZE; +use dusk_core::transfer::data::MAX_MEMO_SIZE; use inquire::{InquireError, Select}; use rusk_wallet::currency::Dusk; use rusk_wallet::gas::{ diff --git a/rusk-wallet/src/bin/io/prompt.rs b/rusk-wallet/src/bin/io/prompt.rs index 7498d2c19e..605aad9884 100644 --- a/rusk-wallet/src/bin/io/prompt.rs +++ b/rusk-wallet/src/bin/io/prompt.rs @@ -16,7 +16,7 @@ use crossterm::{ use anyhow::Result; use bip39::{ErrorKind, Language, Mnemonic}; -use execution_core::stake::MINIMUM_STAKE; +use dusk_core::stake::MINIMUM_STAKE; use inquire::ui::RenderConfig; use inquire::validator::Validation; diff --git a/rusk-wallet/src/cache.rs b/rusk-wallet/src/cache.rs index 813241ab1a..b05ae3bc72 100644 --- a/rusk-wallet/src/cache.rs +++ b/rusk-wallet/src/cache.rs @@ -8,7 +8,7 @@ use std::collections::BTreeSet; use std::path::Path; use dusk_bytes::{DeserializableSlice, Serializable}; -use execution_core::transfer::phoenix::NoteLeaf; +use dusk_core::transfer::phoenix::NoteLeaf; use rocksdb::{DBWithThreadMode, MultiThreaded, Options}; use super::*; diff --git a/rusk-wallet/src/clients.rs b/rusk-wallet/src/clients.rs index 368074d86b..14fafa8d57 100644 --- a/rusk-wallet/src/clients.rs +++ b/rusk-wallet/src/clients.rs @@ -10,12 +10,12 @@ use std::path::Path; use std::sync::{Arc, Mutex}; use dusk_bytes::Serializable; -use execution_core::signatures::bls::PublicKey as BlsPublicKey; -use execution_core::stake::{StakeFundOwner, StakeKeys}; -use execution_core::transfer::moonlight::AccountData; -use execution_core::transfer::phoenix::{Note, NoteLeaf, Prove}; -use execution_core::transfer::Transaction; -use execution_core::Error as ExecutionCoreError; +use dusk_core::signatures::bls::PublicKey as BlsPublicKey; +use dusk_core::stake::{StakeFundOwner, StakeKeys}; +use dusk_core::transfer::moonlight::AccountData; +use dusk_core::transfer::phoenix::{Note, NoteLeaf, Prove}; +use dusk_core::transfer::Transaction; +use dusk_core::Error as ExecutionCoreError; use flume::Receiver; use rues::RuesHttpClient; use tokio::task::JoinHandle; diff --git a/rusk-wallet/src/error.rs b/rusk-wallet/src/error.rs index a1348451fb..8d900e67f0 100644 --- a/rusk-wallet/src/error.rs +++ b/rusk-wallet/src/error.rs @@ -129,7 +129,7 @@ pub enum Error { /// The cache database couldn't find column family required #[error("Cache database corrupted")] CacheDatabaseCorrupted, - /// Prover errors from execution-core + /// Prover errors from dusk-core #[error("Prover Error: {0}")] ProverError(String), /// Memo provided is too large @@ -176,9 +176,9 @@ impl From for Error { } } -impl From for Error { - fn from(e: execution_core::Error) -> Self { - use execution_core::Error::*; +impl From for Error { + fn from(e: dusk_core::Error) -> Self { + use dusk_core::Error::*; match e { InsufficientBalance => Self::NotEnoughBalance, diff --git a/rusk-wallet/src/gql.rs b/rusk-wallet/src/gql.rs index 868c92f783..c361db99fc 100644 --- a/rusk-wallet/src/gql.rs +++ b/rusk-wallet/src/gql.rs @@ -8,7 +8,7 @@ //! The /on/gaphql/query if queried with empty bytes returns the //! graphql schema -use execution_core::transfer::Transaction; +use dusk_core::transfer::Transaction; use serde::Deserialize; use tokio::time::{sleep, Duration}; @@ -25,9 +25,9 @@ pub struct GraphQL { } /// The tx_for_block returns a Vec which contains -/// the execution-core transaction, its id hash and gas spent +/// the dusk-core transaction, its id hash and gas spent pub struct BlockTransaction { - /// The execution-core transaction struct obtained from GraphQL endpoint + /// The dusk-core transaction struct obtained from GraphQL endpoint pub tx: Transaction, /// The hash of the transaction or the id of the transaction in string utf8 pub id: String, diff --git a/rusk-wallet/src/lib.rs b/rusk-wallet/src/lib.rs index 1529288a98..44e6ba4911 100644 --- a/rusk-wallet/src/lib.rs +++ b/rusk-wallet/src/lib.rs @@ -34,12 +34,12 @@ pub use wallet::{ Address, DecodedNote, Profile, SecureWalletFile, Wallet, WalletPath, }; -use execution_core::stake::StakeData; -use execution_core::transfer::phoenix::{ +use dusk_core::stake::StakeData; +use dusk_core::transfer::phoenix::{ ArchivedNoteLeaf, Note, NoteOpening, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey, }; -use execution_core::{dusk, from_dusk, BlsScalar}; +use dusk_core::{dusk, from_dusk, BlsScalar}; use currency::Dusk; diff --git a/rusk-wallet/src/wallet.rs b/rusk-wallet/src/wallet.rs index ee2999bcc5..52cacf519c 100644 --- a/rusk-wallet/src/wallet.rs +++ b/rusk-wallet/src/wallet.rs @@ -17,15 +17,15 @@ use std::path::{Path, PathBuf}; use bip39::{Language, Mnemonic, Seed}; use dusk_bytes::Serializable; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; -use execution_core::stake::StakeData; -use execution_core::transfer::phoenix::{ +use dusk_core::stake::StakeData; +use dusk_core::transfer::phoenix::{ Note, NoteLeaf, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey, }; -use execution_core::{BlsScalar, CONTRACT_ID_BYTES}; +use dusk_core::{BlsScalar, CONTRACT_ID_BYTES}; use serde::Serialize; use wallet_core::prelude::keys::{ derive_bls_pk, derive_bls_sk, derive_phoenix_pk, derive_phoenix_sk, diff --git a/rusk-wallet/src/wallet/transaction.rs b/rusk-wallet/src/wallet/transaction.rs index 4a001fae74..0dcf09e17c 100644 --- a/rusk-wallet/src/wallet/transaction.rs +++ b/rusk-wallet/src/wallet/transaction.rs @@ -6,11 +6,11 @@ use std::fmt::Debug; -use execution_core::signatures::bls::PublicKey as BlsPublicKey; -use execution_core::stake::StakeFundOwner; -use execution_core::transfer::data::TransactionData; -use execution_core::transfer::phoenix::PublicKey as PhoenixPublicKey; -use execution_core::transfer::Transaction; +use dusk_core::signatures::bls::PublicKey as BlsPublicKey; +use dusk_core::stake::StakeFundOwner; +use dusk_core::transfer::data::TransactionData; +use dusk_core::transfer::phoenix::PublicKey as PhoenixPublicKey; +use dusk_core::transfer::Transaction; use rand::rngs::StdRng; use rand::SeedableRng; use wallet_core::transaction::{ diff --git a/rusk/Cargo.toml b/rusk/Cargo.toml index 3e1adbe421..0f6c15c2bc 100644 --- a/rusk/Cargo.toml +++ b/rusk/Cargo.toml @@ -57,7 +57,7 @@ tokio-rustls = { workspace = true } rustls-pemfile = { workspace = true } async-trait = { workspace = true } -execution-core = { workspace = true, features = ["zk"] } +dusk-core = { workspace = true, features = ["zk"] } rusk-profile = { workspace = true } rusk-abi = { workspace = true, features = ["host"] } rusk-prover = { workspace = true, features = ["std"], optional = true } diff --git a/rusk/benches/block_ingestion.rs b/rusk/benches/block_ingestion.rs index 0a4415db59..29decc4f06 100644 --- a/rusk/benches/block_ingestion.rs +++ b/rusk/benches/block_ingestion.rs @@ -16,7 +16,7 @@ use criterion::measurement::WallTime; use criterion::{ criterion_group, criterion_main, BenchmarkGroup, BenchmarkId, Criterion, }; -use execution_core::transfer::Transaction as ProtocolTransaction; +use dusk_core::transfer::Transaction as ProtocolTransaction; use node_data::bls::PublicKey; use node_data::ledger::Transaction; use rand::prelude::StdRng; diff --git a/rusk/src/lib/bloom.rs b/rusk/src/lib/bloom.rs index 53e572ba10..6803883fa4 100644 --- a/rusk/src/lib/bloom.rs +++ b/rusk/src/lib/bloom.rs @@ -6,7 +6,7 @@ use blake3::{Hasher, OUT_LEN}; use dusk_bytes::Serializable; -use execution_core::Event; +use dusk_core::Event; const BLOOM_BYTE_LEN: usize = 256; diff --git a/rusk/src/lib/error.rs b/rusk/src/lib/error.rs index fdacc66250..2be9e326bf 100644 --- a/rusk/src/lib/error.rs +++ b/rusk/src/lib/error.rs @@ -7,7 +7,7 @@ use std::{fmt, io}; use dusk_bytes::Serializable; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as BlsPublicKey, transfer::phoenix::CoreError, BlsScalar, Error as ExecErr, }; @@ -76,7 +76,7 @@ impl From for Error { } } -impl From for Error { +impl From for Error { fn from(err: ExecErr) -> Self { match err { ExecErr::InsufficientBalance => { diff --git a/rusk/src/lib/gen_id.rs b/rusk/src/lib/gen_id.rs index 82c52fa445..b0aa56e041 100644 --- a/rusk/src/lib/gen_id.rs +++ b/rusk/src/lib/gen_id.rs @@ -5,7 +5,7 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use blake2b_simd::Params; -use execution_core::{ContractId, CONTRACT_ID_BYTES}; +use dusk_core::{ContractId, CONTRACT_ID_BYTES}; /// Generate a [`ContractId`] address from: /// - slice of bytes, diff --git a/rusk/src/lib/http.rs b/rusk/src/lib/http.rs index 76fb7d745a..9d5627a3ef 100644 --- a/rusk/src/lib/http.rs +++ b/rusk/src/lib/http.rs @@ -20,7 +20,7 @@ pub(crate) use event::{ RequestData, Target, }; -use execution_core::Event; +use dusk_core::Event; use tokio::task::JoinError; use tracing::{debug, info, warn}; @@ -944,7 +944,7 @@ mod tests { use super::*; use event::Event as EventRequest; - use execution_core::ContractId; + use dusk_core::ContractId; use node_data::events::contract::{ ContractEvent, ContractTxEvent, WrappedContractId, }; diff --git a/rusk/src/lib/http/chain.rs b/rusk/src/lib/http/chain.rs index d2df0f09e6..1054ab96ba 100644 --- a/rusk/src/lib/http/chain.rs +++ b/rusk/src/lib/http/chain.rs @@ -11,7 +11,7 @@ use std::collections::HashMap; use std::net::SocketAddr; use std::sync::Arc; -use execution_core::transfer::Transaction as ProtocolTransaction; +use dusk_core::transfer::Transaction as ProtocolTransaction; use node::database::rocksdb::{Backend, DBTransaction}; use node::database::{Mempool, DB}; use node::mempool::MempoolSrv; @@ -178,7 +178,7 @@ impl RuskNode { &self, data: &[u8], ) -> anyhow::Result { - let tx = execution_core::transfer::Transaction::from_slice(data) + let tx = dusk_core::transfer::Transaction::from_slice(data) .map_err(|e| anyhow::anyhow!("Invalid Data {e:?}"))?; let db = self.inner().database(); let vm = self.inner().vm_handler(); diff --git a/rusk/src/lib/http/chain/graphql.rs b/rusk/src/lib/http/chain/graphql.rs index e4de06cd36..ce511c8851 100644 --- a/rusk/src/lib/http/chain/graphql.rs +++ b/rusk/src/lib/http/chain/graphql.rs @@ -15,8 +15,8 @@ use data::*; use tx::*; use async_graphql::{Context, FieldError, FieldResult, Object}; -use execution_core::transfer::TRANSFER_CONTRACT; -use execution_core::ContractId; +use dusk_core::transfer::TRANSFER_CONTRACT; +use dusk_core::ContractId; use node::database::rocksdb::Backend; use node::database::{Ledger, DB}; use node_data::ledger::Label; diff --git a/rusk/src/lib/http/chain/graphql/archive/data.rs b/rusk/src/lib/http/chain/graphql/archive/data.rs index 477e380c0a..3eeb6143de 100644 --- a/rusk/src/lib/http/chain/graphql/archive/data.rs +++ b/rusk/src/lib/http/chain/graphql/archive/data.rs @@ -6,7 +6,7 @@ use async_graphql::Object; use dusk_bytes::Serializable; -use execution_core::signatures::bls::PublicKey as AccountPublicKey; +use dusk_core::signatures::bls::PublicKey as AccountPublicKey; use node::archive::MoonlightGroup; pub struct MoonlightTransfers(pub Vec); @@ -46,12 +46,12 @@ impl ContractEvents { } /// Interim solution for sending out deserialized event data -/// TODO: #2773 add serde feature to execution-core +/// TODO: #2773 add serde feature to dusk-core pub mod deserialized_archive_data { use super::*; - use execution_core::stake::STAKE_CONTRACT; - use execution_core::transfer::withdraw::WithdrawReceiver; - use execution_core::transfer::{ + use dusk_core::stake::STAKE_CONTRACT; + use dusk_core::transfer::withdraw::WithdrawReceiver; + use dusk_core::transfer::{ ConvertEvent, DepositEvent, MoonlightTransactionEvent, WithdrawEvent, CONVERT_TOPIC, DEPOSIT_TOPIC, MINT_TOPIC, MOONLIGHT_TOPIC, TRANSFER_CONTRACT, WITHDRAW_TOPIC, diff --git a/rusk/src/lib/http/chain/graphql/archive/events.rs b/rusk/src/lib/http/chain/graphql/archive/events.rs index 6095864ae8..6ae4d43de2 100644 --- a/rusk/src/lib/http/chain/graphql/archive/events.rs +++ b/rusk/src/lib/http/chain/graphql/archive/events.rs @@ -7,7 +7,7 @@ //! Module for GraphQL that relates to stored events in the archive. use async_graphql::{Context, FieldError, FieldResult, Object}; -use execution_core::CONTRACT_ID_BYTES; +use dusk_core::CONTRACT_ID_BYTES; use node_data::events::contract::WrappedContractId; use super::data::ContractEvents; diff --git a/rusk/src/lib/http/chain/graphql/archive/moonlight.rs b/rusk/src/lib/http/chain/graphql/archive/moonlight.rs index b5f5a76552..3d752bedc7 100644 --- a/rusk/src/lib/http/chain/graphql/archive/moonlight.rs +++ b/rusk/src/lib/http/chain/graphql/archive/moonlight.rs @@ -7,8 +7,8 @@ //! Module for GraphQL that is used for moonlight related data in the archive. use dusk_bytes::Serializable; -use execution_core::signatures::bls::PublicKey as AccountPublicKey; -use execution_core::transfer::{ +use dusk_core::signatures::bls::PublicKey as AccountPublicKey; +use dusk_core::transfer::{ ConvertEvent, DepositEvent, MoonlightTransactionEvent, WithdrawEvent, CONVERT_TOPIC, MINT_TOPIC, MOONLIGHT_TOPIC, TRANSFER_CONTRACT, WITHDRAW_TOPIC, diff --git a/rusk/src/lib/http/chain/graphql/data.rs b/rusk/src/lib/http/chain/graphql/data.rs index 1220966f33..f6e9c9a9ea 100644 --- a/rusk/src/lib/http/chain/graphql/data.rs +++ b/rusk/src/lib/http/chain/graphql/data.rs @@ -280,8 +280,8 @@ impl Transaction<'_> { pub async fn tx_type(&self) -> String { match self.0.inner { - execution_core::transfer::Transaction::Phoenix(_) => "Phoenix", - execution_core::transfer::Transaction::Moonlight(_) => "Moonlight", + dusk_core::transfer::Transaction::Phoenix(_) => "Phoenix", + dusk_core::transfer::Transaction::Moonlight(_) => "Moonlight", } .into() } diff --git a/rusk/src/lib/http/event.rs b/rusk/src/lib/http/event.rs index 550c91b002..11da524db4 100644 --- a/rusk/src/lib/http/event.rs +++ b/rusk/src/lib/http/event.rs @@ -8,7 +8,7 @@ use super::RUSK_VERSION_HEADER; use base64::engine::{general_purpose::STANDARD as BASE64, Engine}; use bytecheck::CheckBytes; -use execution_core::ContractId; +use dusk_core::ContractId; use futures_util::stream::Iter as StreamIter; use futures_util::{stream, Stream, StreamExt}; use http_body_util::{BodyExt, Either, Full, StreamBody}; diff --git a/rusk/src/lib/http/prover.rs b/rusk/src/lib/http/prover.rs index b17f409b4c..b0a4ba5117 100644 --- a/rusk/src/lib/http/prover.rs +++ b/rusk/src/lib/http/prover.rs @@ -6,7 +6,7 @@ use anyhow::anyhow; -use execution_core::transfer::phoenix::Prove; +use dusk_core::transfer::phoenix::Prove; use rusk_prover::LocalProver; use super::*; diff --git a/rusk/src/lib/http/rusk.rs b/rusk/src/lib/http/rusk.rs index 57ce87311f..5aba30c083 100644 --- a/rusk/src/lib/http/rusk.rs +++ b/rusk/src/lib/http/rusk.rs @@ -8,7 +8,7 @@ use super::event::Event; use super::*; use dusk_bytes::Serializable; -use execution_core::stake::StakeFundOwner; +use dusk_core::stake::StakeFundOwner; use node::vm::VMExecution; use rusk_profile::CRS_17_HASH; use serde::Serialize; @@ -17,7 +17,7 @@ use std::thread; use tokio::task; use tungstenite::http::request; -use execution_core::ContractId; +use dusk_core::ContractId; use crate::node::Rusk; diff --git a/rusk/src/lib/node.rs b/rusk/src/lib/node.rs index c6423b2905..bf665a8b5d 100644 --- a/rusk/src/lib/node.rs +++ b/rusk/src/lib/node.rs @@ -12,7 +12,7 @@ use std::path::PathBuf; use std::sync::Arc; use std::time::Duration; -use execution_core::{dusk, Dusk}; +use dusk_core::{dusk, Dusk}; use node::database::rocksdb::{self, Backend}; use node::network::Kadcast; diff --git a/rusk/src/lib/node/rusk.rs b/rusk/src/lib/node/rusk.rs index 878c739dc4..a33a42ba3f 100644 --- a/rusk/src/lib/node/rusk.rs +++ b/rusk/src/lib/node/rusk.rs @@ -9,8 +9,8 @@ use std::sync::{mpsc, Arc, LazyLock}; use std::time::{Duration, Instant}; use std::{fs, io}; -use execution_core::stake::StakeKeys; -use execution_core::transfer::PANIC_NONCE_NOT_READY; +use dusk_core::stake::StakeKeys; +use dusk_core::transfer::PANIC_NONCE_NOT_READY; use parking_lot::RwLock; use tracing::info; @@ -21,7 +21,7 @@ use dusk_consensus::config::{ RATIFICATION_COMMITTEE_CREDITS, VALIDATION_COMMITTEE_CREDITS, }; use dusk_consensus::operations::{CallParams, VerificationOutput, Voter}; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as BlsPublicKey, stake::{Reward, RewardReason, StakeData, STAKE_CONTRACT}, transfer::{ diff --git a/rusk/src/lib/node/vm.rs b/rusk/src/lib/node/vm.rs index 0f60abb2db..e33a062393 100644 --- a/rusk/src/lib/node/vm.rs +++ b/rusk/src/lib/node/vm.rs @@ -14,7 +14,7 @@ use dusk_bytes::DeserializableSlice; use dusk_consensus::operations::{CallParams, VerificationOutput, Voter}; use dusk_consensus::user::provisioners::Provisioners; use dusk_consensus::user::stake::Stake; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as BlsPublicKey, stake::StakeData, transfer::Transaction as ProtocolTransaction, }; diff --git a/rusk/src/lib/node/vm/query.rs b/rusk/src/lib/node/vm/query.rs index 680424b96d..e143de3bd0 100644 --- a/rusk/src/lib/node/vm/query.rs +++ b/rusk/src/lib/node/vm/query.rs @@ -10,7 +10,7 @@ use crate::Result; use std::sync::mpsc; use bytecheck::CheckBytes; -use execution_core::{ContractId, StandardBufSerializer}; +use dusk_core::{ContractId, StandardBufSerializer}; use rkyv::validation::validators::DefaultValidator; use rkyv::{Archive, Deserialize, Infallible, Serialize}; diff --git a/rusk/src/lib/test_utils.rs b/rusk/src/lib/test_utils.rs index bb025b57ba..829589541d 100644 --- a/rusk/src/lib/test_utils.rs +++ b/rusk/src/lib/test_utils.rs @@ -16,7 +16,7 @@ use futures::Stream; use tokio::spawn; use tracing::{error, info}; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as BlsPublicKey, stake::{StakeData, STAKE_CONTRACT}, transfer::{ diff --git a/rusk/src/lib/verifier.rs b/rusk/src/lib/verifier.rs index a03329f4f4..a3caf48964 100644 --- a/rusk/src/lib/verifier.rs +++ b/rusk/src/lib/verifier.rs @@ -9,7 +9,7 @@ use crate::error::Error; use crate::Result; -use execution_core::transfer::{ +use dusk_core::transfer::{ moonlight::Transaction as MoonlightTransaction, phoenix::Transaction as PhoenixTransaction, }; diff --git a/rusk/tests/common/state.rs b/rusk/tests/common/state.rs index 5a533d134d..114461d0f7 100644 --- a/rusk/tests/common/state.rs +++ b/rusk/tests/common/state.rs @@ -15,7 +15,7 @@ use dusk_consensus::{ config::{RATIFICATION_COMMITTEE_CREDITS, VALIDATION_COMMITTEE_CREDITS}, operations::CallParams, }; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as BlsPublicKey, transfer::Transaction, }; use node_data::{ diff --git a/rusk/tests/common/wallet.rs b/rusk/tests/common/wallet.rs index af5cf34dad..4cb908e651 100644 --- a/rusk/tests/common/wallet.rs +++ b/rusk/tests/common/wallet.rs @@ -11,7 +11,7 @@ use std::sync::{Arc, RwLock}; use crate::common::block::Block as BlockAwait; use dusk_bytes::Serializable; -use execution_core::{ +use dusk_core::{ signatures::bls::PublicKey as BlsPublicKey, stake::StakeData, transfer::{ diff --git a/rusk/tests/rusk-state.rs b/rusk/tests/rusk-state.rs index 72e6eab0fd..bad69e52ae 100644 --- a/rusk/tests/rusk-state.rs +++ b/rusk/tests/rusk-state.rs @@ -12,7 +12,7 @@ use crate::common::*; use std::path::Path; use std::sync::{mpsc, Arc}; -use execution_core::{ +use dusk_core::{ transfer::{ phoenix::{ Note, NoteLeaf, PublicKey as PhoenixPublicKey, diff --git a/rusk/tests/services/contract_deployment.rs b/rusk/tests/services/contract_deployment.rs index a40099a67f..70d5a2fae9 100644 --- a/rusk/tests/services/contract_deployment.rs +++ b/rusk/tests/services/contract_deployment.rs @@ -8,7 +8,7 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; use std::sync::{Arc, RwLock}; -use execution_core::{ +use dusk_core::{ transfer::data::{ContractBytecode, ContractDeploy, TransactionData}, ContractId, }; diff --git a/rusk/tests/services/contract_stake.rs b/rusk/tests/services/contract_stake.rs index 52307a4966..fd2e71379d 100644 --- a/rusk/tests/services/contract_stake.rs +++ b/rusk/tests/services/contract_stake.rs @@ -7,12 +7,12 @@ use std::path::Path; use std::sync::{Arc, RwLock}; -use execution_core::stake::{self, Stake, EPOCH, MINIMUM_STAKE}; +use dusk_core::stake::{self, Stake, EPOCH, MINIMUM_STAKE}; use dusk_bytes::Serializable; -use execution_core::transfer::data::ContractCall; -use execution_core::transfer::{self, Transaction}; -use execution_core::ContractId; +use dusk_core::transfer::data::ContractCall; +use dusk_core::transfer::{self, Transaction}; +use dusk_core::ContractId; use node_data::ledger::SpentTransaction; use rand::prelude::*; use rand::rngs::StdRng; @@ -266,7 +266,7 @@ fn execute_transaction<'a, E: Into>>( rusk: &Rusk, block_height: u64, expected_error: E, - generator: Option, + generator: Option, ) -> SpentTransaction { let (executed_txs, _) = generator_procedure2( &rusk, diff --git a/rusk/tests/services/deploy.rs b/rusk/tests/services/deploy.rs index 044ab60b4d..e45ecf9135 100644 --- a/rusk/tests/services/deploy.rs +++ b/rusk/tests/services/deploy.rs @@ -59,7 +59,7 @@ pub async fn deploy_fail() -> Result<()> { let raw = t.get("tx").unwrap().get("raw").unwrap().as_str().unwrap(); let raw = hex::decode(raw).unwrap(); let tx = - execution_core::transfer::Transaction::from_slice(&raw).unwrap(); + dusk_core::transfer::Transaction::from_slice(&raw).unwrap(); let txs = txs_by_height.entry(block_height).or_insert(vec![]); txs.push(tx); } @@ -105,7 +105,7 @@ pub async fn deploy_fail() -> Result<()> { let raw = t.get("raw").unwrap().as_str().unwrap(); let raw = hex::decode(raw).unwrap(); let tx = - execution_core::transfer::Transaction::from_slice(&raw).unwrap(); + dusk_core::transfer::Transaction::from_slice(&raw).unwrap(); mempool.push(tx); } diff --git a/rusk/tests/services/gas_behavior.rs b/rusk/tests/services/gas_behavior.rs index bbe50d8c02..478b004eb9 100644 --- a/rusk/tests/services/gas_behavior.rs +++ b/rusk/tests/services/gas_behavior.rs @@ -8,7 +8,7 @@ use std::collections::HashMap; use std::path::Path; use std::sync::{Arc, RwLock}; -use execution_core::transfer::{ +use dusk_core::transfer::{ data::{ContractCall, TransactionData}, TRANSFER_CONTRACT, }; diff --git a/rusk/tests/services/moonlight_stake.rs b/rusk/tests/services/moonlight_stake.rs index 1fdfb0bc5c..132c191f91 100644 --- a/rusk/tests/services/moonlight_stake.rs +++ b/rusk/tests/services/moonlight_stake.rs @@ -7,7 +7,7 @@ use std::path::Path; use std::sync::{Arc, RwLock}; -use execution_core::stake::MINIMUM_STAKE; +use dusk_core::stake::MINIMUM_STAKE; use rand::prelude::*; use rand::rngs::StdRng; diff --git a/rusk/tests/services/owner_calls.rs b/rusk/tests/services/owner_calls.rs index c580ada478..12abe72f13 100644 --- a/rusk/tests/services/owner_calls.rs +++ b/rusk/tests/services/owner_calls.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; use std::sync::{Arc, RwLock}; -use execution_core::{ +use dusk_core::{ signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, Signature as BlsSignature, diff --git a/rusk/tests/services/phoenix_stake.rs b/rusk/tests/services/phoenix_stake.rs index 603a5b5a5a..b3671d01b6 100644 --- a/rusk/tests/services/phoenix_stake.rs +++ b/rusk/tests/services/phoenix_stake.rs @@ -7,8 +7,8 @@ use std::path::Path; use std::sync::{Arc, RwLock}; -use execution_core::stake::MINIMUM_STAKE; -use execution_core::{ +use dusk_core::stake::MINIMUM_STAKE; +use dusk_core::{ dusk, signatures::bls::PublicKey as BlsPublicKey, stake::{StakeAmount, STAKE_CONTRACT}, diff --git a/rusk/tests/services/unspendable.rs b/rusk/tests/services/unspendable.rs index 85dd513f2e..daa8932f7e 100644 --- a/rusk/tests/services/unspendable.rs +++ b/rusk/tests/services/unspendable.rs @@ -8,7 +8,7 @@ use std::collections::HashMap; use std::path::Path; use std::sync::{Arc, RwLock}; -use execution_core::transfer::{ +use dusk_core::transfer::{ data::{ContractCall, TransactionData}, TRANSFER_CONTRACT, }; diff --git a/test-wallet/Cargo.toml b/test-wallet/Cargo.toml index 2d0ab0b11e..139faad839 100644 --- a/test-wallet/Cargo.toml +++ b/test-wallet/Cargo.toml @@ -12,7 +12,7 @@ rkyv = { workspace = true } ff = { workspace = true } zeroize = { workspace = true, features = ["derive"] } -execution-core = { workspace = true } +dusk-core = { workspace = true } wallet-core = { workspace = true } rusk-prover = { workspace = true } diff --git a/test-wallet/src/imp.rs b/test-wallet/src/imp.rs index 1b3a294052..98be4ff899 100644 --- a/test-wallet/src/imp.rs +++ b/test-wallet/src/imp.rs @@ -9,20 +9,20 @@ use alloc::vec::Vec; use core::convert::Infallible; use dusk_bytes::Error as BytesError; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; -use execution_core::stake::StakeData; -use execution_core::transfer::data::TransactionData; -use execution_core::transfer::moonlight::{ +use dusk_core::stake::StakeData; +use dusk_core::transfer::data::TransactionData; +use dusk_core::transfer::moonlight::{ AccountData, Transaction as MoonlightTransaction, }; -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::phoenix::{ Note, NoteLeaf, NoteOpening, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey, }; -use execution_core::transfer::Transaction; -use execution_core::{BlsScalar, Error as ExecutionError}; +use dusk_core::transfer::Transaction; +use dusk_core::{BlsScalar, Error as ExecutionError}; use rand::{CryptoRng, Error as RngError, RngCore}; use rkyv::ser::serializers::{ AllocScratchError, CompositeSerializerError, SharedSerializeMapError, @@ -65,7 +65,7 @@ pub enum Error { Bytes(BytesError), /// Bytes were meant to be utf8 but aren't. Utf8(FromUtf8Error), - /// Originating from the execution-core error. + /// Originating from the dusk-core error. Execution(ExecutionError), /// Note combination for the given value is impossible given the maximum /// amount if inputs in a phoenix transaction. diff --git a/test-wallet/src/lib.rs b/test-wallet/src/lib.rs index 25a0c884e3..ce399123d1 100644 --- a/test-wallet/src/lib.rs +++ b/test-wallet/src/lib.rs @@ -16,16 +16,16 @@ mod imp; use alloc::vec::Vec; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; -use execution_core::stake::StakeData; -use execution_core::transfer::moonlight::AccountData; -use execution_core::transfer::phoenix::{ +use dusk_core::stake::StakeData; +use dusk_core::transfer::moonlight::AccountData; +use dusk_core::transfer::phoenix::{ Note, NoteOpening, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey, }; -use execution_core::BlsScalar; +use dusk_core::BlsScalar; use zeroize::Zeroize; pub use wallet_core::keys::{ diff --git a/wallet-core/Cargo.toml b/wallet-core/Cargo.toml index 22ce1acae9..9f8155555d 100644 --- a/wallet-core/Cargo.toml +++ b/wallet-core/Cargo.toml @@ -15,7 +15,7 @@ blake3 = { workspace = true } sha2 = { workspace = true } rand = { workspace = true } ff = { workspace = true } -execution-core = { workspace = true } +dusk-core = { workspace = true } rkyv = { workspace = true, features = ["alloc"] } [target.'cfg(target_family = "wasm")'.dependencies] diff --git a/wallet-core/src/ffi.rs b/wallet-core/src/ffi.rs index 76df75588d..ff9ffec6de 100644 --- a/wallet-core/src/ffi.rs +++ b/wallet-core/src/ffi.rs @@ -25,17 +25,17 @@ use alloc::vec::Vec; use core::{ptr, slice}; use dusk_bytes::{DeserializableSlice, Serializable}; -use execution_core::signatures::bls::PublicKey as BlsPublicKey; -use execution_core::stake::{Stake, STAKE_CONTRACT}; -use execution_core::transfer::data::{ContractCall, TransactionData}; -use execution_core::transfer::moonlight::Transaction as MoonlightTransaction; -use execution_core::transfer::phoenix::{ +use dusk_core::signatures::bls::PublicKey as BlsPublicKey; +use dusk_core::stake::{Stake, STAKE_CONTRACT}; +use dusk_core::transfer::data::{ContractCall, TransactionData}; +use dusk_core::transfer::moonlight::Transaction as MoonlightTransaction; +use dusk_core::transfer::phoenix::{ ArchivedNoteLeaf, Note, NoteLeaf, NoteOpening, Prove, PublicKey as PhoenixPublicKey, }; -use execution_core::transfer::withdraw::WithdrawReplayToken; -use execution_core::transfer::{phoenix, Transaction}; -use execution_core::BlsScalar; +use dusk_core::transfer::withdraw::WithdrawReplayToken; +use dusk_core::transfer::{phoenix, Transaction}; +use dusk_core::BlsScalar; use rand_chacha::rand_core::SeedableRng; use rand_chacha::ChaCha12Rng; use rkyv::to_bytes; @@ -56,7 +56,7 @@ static KEY_SIZE: usize = BlsScalar::SIZE; static ITEM_SIZE: usize = core::mem::size_of::(); #[no_mangle] -static MINIMUM_STAKE: u64 = execution_core::stake::MINIMUM_STAKE; +static MINIMUM_STAKE: u64 = dusk_core::stake::MINIMUM_STAKE; /// The size of the scratch buffer used for parsing the notes. const NOTES_BUFFER_SIZE: usize = 96 * 1024; @@ -304,7 +304,7 @@ struct NoOpProver { } impl Prove for NoOpProver { - fn prove(&self, circuits: &[u8]) -> Result, execution_core::Error> { + fn prove(&self, circuits: &[u8]) -> Result, dusk_core::Error> { *self.circuits.borrow_mut() = circuits.to_vec(); Ok(circuits.to_vec()) diff --git a/wallet-core/src/keys.rs b/wallet-core/src/keys.rs index cee61dd5d8..c880628e08 100644 --- a/wallet-core/src/keys.rs +++ b/wallet-core/src/keys.rs @@ -9,10 +9,10 @@ use alloc::vec::Vec; use core::ops::Range; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::phoenix::{ PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey, }; diff --git a/wallet-core/src/notes/balance.rs b/wallet-core/src/notes/balance.rs index 5a4f345b16..ef96c87e45 100644 --- a/wallet-core/src/notes/balance.rs +++ b/wallet-core/src/notes/balance.rs @@ -9,7 +9,7 @@ use alloc::vec::Vec; use dusk_bytes::{DeserializableSlice, Serializable, Write}; -use execution_core::transfer::phoenix::{Note, ViewKey as PhoenixViewKey}; +use dusk_core::transfer::phoenix::{Note, ViewKey as PhoenixViewKey}; use crate::notes::MAX_INPUT_NOTES; diff --git a/wallet-core/src/notes/owned.rs b/wallet-core/src/notes/owned.rs index fc8ed7bd63..0841b1013b 100644 --- a/wallet-core/src/notes/owned.rs +++ b/wallet-core/src/notes/owned.rs @@ -12,10 +12,8 @@ use core::ops::Index; use core::slice::Iter; use bytecheck::CheckBytes; -use execution_core::transfer::phoenix::{ - NoteLeaf, SecretKey as PhoenixSecretKey, -}; -use execution_core::BlsScalar; +use dusk_core::transfer::phoenix::{NoteLeaf, SecretKey as PhoenixSecretKey}; +use dusk_core::BlsScalar; use rkyv::{Archive, Deserialize, Serialize}; /// A collection of notes stored as key-value pairs. diff --git a/wallet-core/src/notes/pick.rs b/wallet-core/src/notes/pick.rs index b15435dce3..eb0980e9b8 100644 --- a/wallet-core/src/notes/pick.rs +++ b/wallet-core/src/notes/pick.rs @@ -8,8 +8,8 @@ use alloc::vec::Vec; -use execution_core::transfer::phoenix::{NoteLeaf, ViewKey as PhoenixViewKey}; -use execution_core::BlsScalar; +use dusk_core::transfer::phoenix::{NoteLeaf, ViewKey as PhoenixViewKey}; +use dusk_core::BlsScalar; use crate::notes::owned::NoteList; use crate::notes::MAX_INPUT_NOTES; diff --git a/wallet-core/src/transaction.rs b/wallet-core/src/transaction.rs index c6bf02a472..171570987e 100644 --- a/wallet-core/src/transaction.rs +++ b/wallet-core/src/transaction.rs @@ -9,23 +9,23 @@ use alloc::vec::Vec; use dusk_bytes::Serializable; -use execution_core::signatures::bls::{ +use dusk_core::signatures::bls::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, }; -use execution_core::stake::{Stake, Withdraw as StakeWithdraw, STAKE_CONTRACT}; -use execution_core::transfer::data::{ +use dusk_core::stake::{Stake, Withdraw as StakeWithdraw, STAKE_CONTRACT}; +use dusk_core::transfer::data::{ ContractBytecode, ContractCall, ContractDeploy, TransactionData, }; -use execution_core::transfer::moonlight::Transaction as MoonlightTransaction; -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::moonlight::Transaction as MoonlightTransaction; +use dusk_core::transfer::phoenix::{ Note, NoteOpening, Prove, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, Transaction as PhoenixTransaction, }; -use execution_core::transfer::withdraw::{ +use dusk_core::transfer::withdraw::{ Withdraw, WithdrawReceiver, WithdrawReplayToken, }; -use execution_core::transfer::{Transaction, TRANSFER_CONTRACT}; -use execution_core::{BlsScalar, ContractId, Error, JubJubScalar}; +use dusk_core::transfer::{Transaction, TRANSFER_CONTRACT}; +use dusk_core::{BlsScalar, ContractId, Error, JubJubScalar}; use ff::Field; use rand::{CryptoRng, RngCore}; use zeroize::Zeroize; diff --git a/wallet-core/tests/notes.rs b/wallet-core/tests/notes.rs index 82944ec1f8..d57c58975f 100644 --- a/wallet-core/tests/notes.rs +++ b/wallet-core/tests/notes.rs @@ -4,11 +4,11 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -use execution_core::transfer::phoenix::{ +use dusk_core::transfer::phoenix::{ Note, NoteLeaf, PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey, }; -use execution_core::JubJubScalar; +use dusk_core::JubJubScalar; use ff::Field; use rand::rngs::StdRng; use rand::{CryptoRng, RngCore, SeedableRng};