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 715ee0cd3f..8b99272692 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 39ea449b83..bb7bcf87b0 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, }; @@ -74,7 +74,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..1c523bc8ce 100644 --- a/rusk/src/lib/http/rusk.rs +++ b/rusk/src/lib/http/rusk.rs @@ -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 0b8da4b1f3..af34f364bb 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 fdcff50b5f..4be1b172c8 100644 --- a/rusk/src/lib/node/vm.rs +++ b/rusk/src/lib/node/vm.rs @@ -13,7 +13,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 79e7f964e9..4c766208b1 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, };