Skip to content

Commit

Permalink
wallet-core: Rename execution-core to dusk-core
Browse files Browse the repository at this point in the history
  • Loading branch information
moCello committed Dec 19, 2024
1 parent 5bd6e84 commit 87a0d0e
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion wallet-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
20 changes: 10 additions & 10 deletions wallet-core/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -56,7 +56,7 @@ static KEY_SIZE: usize = BlsScalar::SIZE;
static ITEM_SIZE: usize = core::mem::size_of::<ArchivedNoteLeaf>();

#[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;
Expand Down Expand Up @@ -304,7 +304,7 @@ struct NoOpProver {
}

impl Prove for NoOpProver {
fn prove(&self, circuits: &[u8]) -> Result<Vec<u8>, execution_core::Error> {
fn prove(&self, circuits: &[u8]) -> Result<Vec<u8>, dusk_core::Error> {
*self.circuits.borrow_mut() = circuits.to_vec();

Ok(circuits.to_vec())
Expand Down
4 changes: 2 additions & 2 deletions wallet-core/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion wallet-core/src/notes/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 2 additions & 4 deletions wallet-core/src/notes/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions wallet-core/src/notes/pick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions wallet-core/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions wallet-core/tests/notes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 87a0d0e

Please sign in to comment.