Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename execution-core to dusk-core #3199

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [
"contracts/stake",
"contracts/transfer",

"execution-core",
"core",
"wallet-core",

"rusk-prover",
Expand All @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
Expand All @@ -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 $@
Expand All @@ -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 $@
Expand Down
2 changes: 1 addition & 1 deletion consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
4 changes: 2 additions & 2 deletions consensus/src/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/commons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/quorum/verifiers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
4 changes: 2 additions & 2 deletions consensus/src/user/provisioners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/user/sortition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion contracts/alice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion contracts/alice/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/bob/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion contracts/bob/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion contracts/charlie/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion contracts/charlie/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 2 additions & 4 deletions contracts/charlie/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/host_fn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
2 changes: 1 addition & 1 deletion contracts/host_fn/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions contracts/stake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }

Expand All @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion contracts/stake/benches/get_provisioners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion contracts/stake/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

extern crate alloc;

use execution_core::transfer::TRANSFER_CONTRACT;
use dusk_core::transfer::TRANSFER_CONTRACT;

mod state;
use state::StakeState;
Expand Down
2 changes: 1 addition & 1 deletion contracts/stake/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions contracts/stake/tests/common/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions contracts/stake/tests/common/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
8 changes: 4 additions & 4 deletions contracts/stake/tests/common/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +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::{BlsScalar, LUX};
use dusk_core::transfer::{Transaction, TRANSFER_CONTRACT};
use dusk_core::{BlsScalar, LUX};
use rand::rngs::StdRng;
use rusk_abi::{PiecrustError, Session};
use rusk_prover::LocalProver;
Expand Down
2 changes: 1 addition & 1 deletion contracts/stake/tests/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
8 changes: 4 additions & 4 deletions contracts/stake/tests/partial_stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{execute, ContractData, PiecrustError, Session, VM};
Expand Down
12 changes: 6 additions & 6 deletions contracts/stake/tests/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@

pub mod common;

use execution_core::signatures::bls::{
use dusk_core::signatures::bls::{
PublicKey as BlsPublicKey, SecretKey as BlsSecretKey,
};
use execution_core::stake::{
use dusk_core::stake::{
Reward, RewardReason, Stake, Withdraw as StakeWithdraw, STAKE_CONTRACT,
};
use execution_core::transfer::data::ContractCall;
use execution_core::transfer::phoenix::{
use dusk_core::transfer::data::ContractCall;
use dusk_core::transfer::phoenix::{
PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey,
ViewKey as PhoenixViewKey,
};
use execution_core::transfer::withdraw::{
use dusk_core::transfer::withdraw::{
Withdraw, WithdrawReceiver, WithdrawReplayToken,
};
use execution_core::{dusk, JubJubScalar};
use dusk_core::{dusk, JubJubScalar};
use ff::Field;
use rand::rngs::StdRng;
use rand::SeedableRng;
Expand Down
2 changes: 1 addition & 1 deletion contracts/transfer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions contracts/transfer/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion contracts/transfer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions contracts/transfer/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
Loading
Loading