replace log imports with tracing everywhere

This commit is contained in:
oars
2025-07-09 17:10:49 +03:00
parent b47fe86481
commit d85cf80dbf
169 changed files with 170 additions and 172 deletions

View File

@@ -21,8 +21,8 @@ use std::{
sync::Arc, sync::Arc,
}; };
use log::{debug, error, info, warn};
use smol::lock::Mutex; use smol::lock::Mutex;
use tracing::{debug, error, info, warn};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -18,9 +18,9 @@
use std::sync::Arc; use std::sync::Arc;
use log::{debug, error, info};
use smol::{fs::read_to_string, stream::StreamExt}; use smol::{fs::read_to_string, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::{debug, error, info};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -25,7 +25,7 @@ use darkfi::{
validator::ValidatorPtr, validator::ValidatorPtr,
Result, Result,
}; };
use log::info; use tracing::info;
/// Block proposal broadcast protocol /// Block proposal broadcast protocol
mod protocol_proposal; mod protocol_proposal;

View File

@@ -19,9 +19,9 @@
use std::{collections::HashSet, sync::Arc}; use std::{collections::HashSet, sync::Arc};
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error};
use smol::{channel::Sender, lock::RwLock}; use smol::{channel::Sender, lock::RwLock};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error};
use darkfi::{ use darkfi::{
impl_p2p_message, impl_p2p_message,

View File

@@ -19,7 +19,7 @@
use std::sync::Arc; use std::sync::Arc;
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error}; use tracing::{debug, error};
use darkfi::{ use darkfi::{
blockchain::{BlockInfo, Header, HeaderHash}, blockchain::{BlockInfo, Header, HeaderHash},

View File

@@ -18,8 +18,8 @@
use std::sync::Arc; use std::sync::Arc;
use log::{debug, error};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error};
use darkfi::{ use darkfi::{
net::{ net::{

View File

@@ -19,9 +19,9 @@
use std::{collections::HashSet, time::Instant}; use std::{collections::HashSet, time::Instant};
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error, info, warn};
use smol::lock::MutexGuard; use smol::lock::MutexGuard;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info, warn};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -23,8 +23,8 @@ use darkfi_sdk::{
tx::TransactionHash, tx::TransactionHash,
}; };
use darkfi_serial::{deserialize_async, serialize_async}; use darkfi_serial::{deserialize_async, serialize_async};
use log::{debug, error};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error};
use darkfi::{ use darkfi::{
rpc::jsonrpc::{ rpc::jsonrpc::{

View File

@@ -17,8 +17,8 @@
*/ */
use darkfi_serial::deserialize_async; use darkfi_serial::deserialize_async;
use log::{error, warn};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{error, warn};
use darkfi::{ use darkfi::{
rpc::jsonrpc::{ rpc::jsonrpc::{

View File

@@ -19,8 +19,8 @@
use std::collections::HashMap; use std::collections::HashMap;
use darkfi::rpc::jsonrpc::{ErrorCode, JsonError, JsonResponse, JsonResult}; use darkfi::rpc::jsonrpc::{ErrorCode, JsonError, JsonResponse, JsonResult};
use log::error;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::error;
use crate::DarkfiNode; use crate::DarkfiNode;

View File

@@ -30,7 +30,7 @@ use darkfi_sdk::{
pasta::{group::ff::PrimeField, pallas}, pasta::{group::ff::PrimeField, pallas},
}; };
use darkfi_serial::serialize_async; use darkfi_serial::serialize_async;
use log::{error, info}; use tracing::{error, info};
use crate::{ use crate::{
task::{garbage_collect_task, miner::MinerRewardsRecipientConfig, miner_task, sync_task}, task::{garbage_collect_task, miner::MinerRewardsRecipientConfig, miner_task, sync_task},

View File

@@ -18,7 +18,7 @@
use darkfi::{error::TxVerifyFailed, validator::verification::verify_transactions, Error, Result}; use darkfi::{error::TxVerifyFailed, validator::verification::verify_transactions, Error, Result};
use darkfi_sdk::crypto::MerkleTree; use darkfi_sdk::crypto::MerkleTree;
use log::{debug, error, info}; use tracing::{debug, error, info};
use crate::DarkfiNodePtr; use crate::DarkfiNodePtr;

View File

@@ -40,10 +40,10 @@ use darkfi_sdk::{
ContractCall, ContractCall,
}; };
use darkfi_serial::{serialize_async, Encodable}; use darkfi_serial::{serialize_async, Encodable};
use log::{error, info};
use num_bigint::BigUint; use num_bigint::BigUint;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use smol::channel::{Receiver, Sender}; use smol::channel::{Receiver, Sender};
use tracing::{error, info};
use crate::{proto::ProposalMessage, task::garbage_collect_task, DarkfiNodePtr}; use crate::{proto::ProposalMessage, task::garbage_collect_task, DarkfiNodePtr};

View File

@@ -23,9 +23,9 @@ use darkfi::{
util::encoding::base64, validator::consensus::Proposal, Error, Result, util::encoding::base64, validator::consensus::Proposal, Error, Result,
}; };
use darkfi_serial::serialize_async; use darkfi_serial::serialize_async;
use log::{debug, info, warn};
use rand::{prelude::SliceRandom, rngs::OsRng}; use rand::{prelude::SliceRandom, rngs::OsRng};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, info, warn};
use crate::{ use crate::{
proto::{ proto::{

View File

@@ -18,9 +18,9 @@
use std::{collections::HashSet, sync::Arc}; use std::{collections::HashSet, sync::Arc};
use log::{debug, error, info};
use smol::{channel::Receiver, lock::RwLock}; use smol::{channel::Receiver, lock::RwLock};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
blockchain::BlockDifficulty, blockchain::BlockDifficulty,

View File

@@ -32,8 +32,8 @@ use darkfi_sdk::{
crypto::{pasta_prelude::FromUniformBytes, poseidon_hash, MerkleTree}, crypto::{pasta_prelude::FromUniformBytes, poseidon_hash, MerkleTree},
pasta::pallas, pasta::pallas,
}; };
use log::info;
use rand::{rngs::OsRng, CryptoRng, RngCore}; use rand::{rngs::OsRng, CryptoRng, RngCore};
use tracing::info;
pub const RLN_APP_IDENTIFIER: pallas::Base = pallas::Base::from_raw([4242, 0, 0, 0]); pub const RLN_APP_IDENTIFIER: pallas::Base = pallas::Base::from_raw([4242, 0, 0, 0]);
pub const RLN_TRAPDOOR_DERIVATION_PATH: pallas::Base = pallas::Base::from_raw([4211, 0, 0, 0]); pub const RLN_TRAPDOOR_DERIVATION_PATH: pallas::Base = pallas::Base::from_raw([4211, 0, 0, 0]);

View File

@@ -39,7 +39,6 @@ use darkfi_sdk::{
}; };
use darkfi_serial::{deserialize_async, serialize_async}; use darkfi_serial::{deserialize_async, serialize_async};
use futures::FutureExt; use futures::FutureExt;
use log::{debug, error, info, warn};
use sled_overlay::sled; use sled_overlay::sled;
use smol::{ use smol::{
io::{self, AsyncBufReadExt, AsyncWriteExt, BufReader}, io::{self, AsyncBufReadExt, AsyncWriteExt, BufReader},
@@ -47,6 +46,7 @@ use smol::{
net::SocketAddr, net::SocketAddr,
prelude::{AsyncRead, AsyncWrite}, prelude::{AsyncRead, AsyncWrite},
}; };
use tracing::{debug, error, info, warn};
use super::{ use super::{
server::{IrcServer, MAX_MSG_LEN}, server::{IrcServer, MAX_MSG_LEN},

View File

@@ -52,7 +52,7 @@
use std::{collections::HashSet, sync::atomic::Ordering::SeqCst}; use std::{collections::HashSet, sync::atomic::Ordering::SeqCst};
use darkfi::Result; use darkfi::Result;
use log::{error, info}; use tracing::{error, info};
use super::{ use super::{
client::{Client, ReplyType}, client::{Client, ReplyType},

View File

@@ -38,7 +38,6 @@ use futures_rustls::{
rustls::{self, pki_types::PrivateKeyDer}, rustls::{self, pki_types::PrivateKeyDer},
TlsAcceptor, TlsAcceptor,
}; };
use log::{debug, error, info, warn};
use sled_overlay::sled; use sled_overlay::sled;
use smol::{ use smol::{
fs, fs,
@@ -47,6 +46,7 @@ use smol::{
prelude::{AsyncRead, AsyncWrite}, prelude::{AsyncRead, AsyncWrite},
Executor, Executor,
}; };
use tracing::{debug, error, info, warn};
use url::Url; use url::Url;
use super::{client::Client, IrcChannel, IrcContact, Priv, Privmsg}; use super::{client::Client, IrcChannel, IrcContact, Priv, Privmsg};

View File

@@ -33,12 +33,12 @@ use darkfi::{
}; };
use darkfi_sdk::crypto::pasta_prelude::PrimeField; use darkfi_sdk::crypto::pasta_prelude::PrimeField;
use log::{debug, error, info};
use rand::rngs::OsRng; use rand::rngs::OsRng;
use settings::list_configured_contacts; use settings::list_configured_contacts;
use sled_overlay::sled; use sled_overlay::sled;
use smol::{fs, lock::Mutex, stream::StreamExt, Executor}; use smol::{fs, lock::Mutex, stream::StreamExt, Executor};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::{debug, error, info};
use url::Url; use url::Url;
const CONFIG_FILE: &str = "darkirc_config.toml"; const CONFIG_FILE: &str = "darkirc_config.toml";

View File

@@ -29,8 +29,8 @@ use darkfi::{
}, },
system::StoppableTaskPtr, system::StoppableTaskPtr,
}; };
use log::debug;
use smol::lock::MutexGuard; use smol::lock::MutexGuard;
use tracing::debug;
use super::DarkIrc; use super::DarkIrc;

View File

@@ -25,7 +25,7 @@ use std::{
use crypto_box::PublicKey; use crypto_box::PublicKey;
use darkfi::{Error::ParseFailed, Result}; use darkfi::{Error::ParseFailed, Result};
use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas}; use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas};
use log::info; use tracing::info;
use crate::{ use crate::{
crypto::rln::{closest_epoch, RlnIdentity}, crypto::rln::{closest_epoch, RlnIdentity},

View File

@@ -29,9 +29,9 @@ use darkfi_sdk::{
pasta::pallas, pasta::pallas,
}; };
use darkfi_serial::{deserialize, serialize}; use darkfi_serial::{deserialize, serialize};
use log::error;
use num_bigint::BigUint; use num_bigint::BigUint;
use sled_overlay::{sled, SledDbOverlay, SledDbOverlayStateDiff}; use sled_overlay::{sled, SledDbOverlay, SledDbOverlayStateDiff};
use tracing::error;
pub const SLED_SCANNED_BLOCKS_TREE: &[u8] = b"_scanned_blocks"; pub const SLED_SCANNED_BLOCKS_TREE: &[u8] = b"_scanned_blocks";
pub const SLED_STATE_INVERSE_DIFF_TREE: &[u8] = b"_state_inverse_diff"; pub const SLED_STATE_INVERSE_DIFF_TREE: &[u8] = b"_state_inverse_diff";

View File

@@ -22,11 +22,11 @@ use std::{
str::FromStr, str::FromStr,
}; };
use log::info;
use prettytable::{format, row, Table}; use prettytable::{format, row, Table};
use rand::rngs::OsRng; use rand::rngs::OsRng;
use smol::{fs::read_to_string, stream::StreamExt}; use smol::{fs::read_to_string, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::info;
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -21,11 +21,11 @@ use std::{
sync::{Arc, Mutex}, sync::{Arc, Mutex},
}; };
use log::{debug, error};
use rusqlite::{ use rusqlite::{
types::{ToSql, Value}, types::{ToSql, Value},
Connection, Connection,
}; };
use tracing::{debug, error};
use crate::error::{WalletDbError, WalletDbResult}; use crate::error::{WalletDbError, WalletDbResult};

View File

@@ -22,9 +22,9 @@ use std::{
str::FromStr, str::FromStr,
}; };
use log::{debug, error};
use serde::Deserialize; use serde::Deserialize;
use structopt::StructOpt; use structopt::StructOpt;
use tracing::{debug, error};
use url::Url; use url::Url;
use darkfi::{rpc::settings::RpcSettingsOpt, util::file::load_file, Error, Result}; use darkfi::{rpc::settings::RpcSettingsOpt, util::file::load_file, Error, Result};

View File

@@ -18,7 +18,7 @@
use std::{fmt, sync::Arc}; use std::{fmt, sync::Arc};
use log::error; use tracing::error;
use darkfi::{ use darkfi::{
error::RpcError, error::RpcError,

View File

@@ -18,9 +18,9 @@
use std::{collections::HashSet, path::Path, sync::Arc}; use std::{collections::HashSet, path::Path, sync::Arc};
use log::{error, info};
use smol::{lock::Mutex, stream::StreamExt}; use smol::{lock::Mutex, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::{error, info};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -19,9 +19,9 @@
use std::{collections::HashSet, sync::Arc, time::Instant}; use std::{collections::HashSet, sync::Arc, time::Instant};
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error, trace, warn};
use smol::lock::{MutexGuard, RwLock}; use smol::lock::{MutexGuard, RwLock};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, trace, warn};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -16,9 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
use log::{debug, warn};
use sled_overlay::sled::{transaction::ConflictableTransactionError, Transactional}; use sled_overlay::sled::{transaction::ConflictableTransactionError, Transactional};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, warn};
use darkfi::{ use darkfi::{
blockchain::{ blockchain::{

View File

@@ -21,9 +21,9 @@ use std::{
str::FromStr, str::FromStr,
}; };
use log::info;
use tar::Archive; use tar::Archive;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::info;
use darkfi::{ use darkfi::{
blockchain::BlockchainOverlay, validator::utils::deploy_native_contracts, Error, Result, blockchain::BlockchainOverlay, validator::utils::deploy_native_contracts, Error, Result,

View File

@@ -18,7 +18,7 @@
use std::sync::Arc; use std::sync::Arc;
use log::debug; use tracing::debug;
use darkfi::Result; use darkfi::Result;

View File

@@ -38,8 +38,8 @@
use std::{sync::Arc, time::Instant}; use std::{sync::Arc, time::Instant};
use log::{debug, error, info, warn};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info, warn};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -18,9 +18,9 @@
use std::collections::HashMap; use std::collections::HashMap;
use log::{debug, error};
use smol::io::Cursor; use smol::io::Cursor;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error};
use darkfi::{ use darkfi::{
blockchain::{ blockchain::{

View File

@@ -18,8 +18,8 @@
use std::sync::{Arc, Mutex, MutexGuard}; use std::sync::{Arc, Mutex, MutexGuard};
use log::debug;
use sled_overlay::{sled, SledDbOverlay}; use sled_overlay::{sled, SledDbOverlay};
use tracing::debug;
use darkfi::{blockchain::SledDbOverlayPtr, Error, Result}; use darkfi::{blockchain::SledDbOverlayPtr, Error, Result};
use darkfi_sdk::crypto::ContractId; use darkfi_sdk::crypto::ContractId;

View File

@@ -21,8 +21,8 @@ use std::{
sync::{Arc, Mutex, MutexGuard}, sync::{Arc, Mutex, MutexGuard},
}; };
use log::{debug, info};
use sled_overlay::{sled, SledDbOverlay}; use sled_overlay::{sled, SledDbOverlay};
use tracing::{debug, info};
use darkfi::{ use darkfi::{
blockchain::SledDbOverlayPtr, blockchain::SledDbOverlayPtr,

View File

@@ -19,8 +19,8 @@
use std::collections::HashMap; use std::collections::HashMap;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use log::info;
use sled_overlay::sled; use sled_overlay::sled;
use tracing::info;
use darkfi::{blockchain::Blockchain, error::Result, util::path::expand_path}; use darkfi::{blockchain::Blockchain, error::Result, util::path::expand_path};

View File

@@ -17,8 +17,6 @@
*/ */
use clap::{Parser, Subcommand}; use clap::{Parser, Subcommand};
use log::error;
use simplelog::{ColorChoice, TermLogger, TerminalMode};
use smol::lock::RwLock; use smol::lock::RwLock;
use std::{ use std::{
collections::HashMap, collections::HashMap,
@@ -26,6 +24,7 @@ use std::{
sync::Arc, sync::Arc,
}; };
use termcolor::{StandardStream, WriteColor}; use termcolor::{StandardStream, WriteColor};
use tracing::error;
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -23,11 +23,11 @@ use std::{
time::Duration, time::Duration,
}; };
use log::{error, info, warn};
use rand::{prelude::SliceRandom, rngs::OsRng}; use rand::{prelude::SliceRandom, rngs::OsRng};
use sha2::{Digest, Sha256}; use sha2::{Digest, Sha256};
use smol::lock::RwLock; use smol::lock::RwLock;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{error, info, warn};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -19,9 +19,9 @@
use std::sync::Arc; use std::sync::Arc;
use async_trait::async_trait; use async_trait::async_trait;
use log::debug;
use num_bigint::BigUint; use num_bigint::BigUint;
use rand::{rngs::OsRng, Rng}; use rand::{rngs::OsRng, Rng};
use tracing::debug;
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -23,11 +23,11 @@ use std::{
}; };
use futures::{future::FutureExt, pin_mut, select}; use futures::{future::FutureExt, pin_mut, select};
use log::{error, info, warn};
use rand::{ use rand::{
prelude::{IteratorRandom, SliceRandom}, prelude::{IteratorRandom, SliceRandom},
rngs::OsRng, rngs::OsRng,
}; };
use tracing::{error, info, warn};
use darkfi::{ use darkfi::{
dht::DhtNode, dht::DhtNode,

View File

@@ -23,13 +23,13 @@ use std::{
sync::Arc, sync::Arc,
}; };
use log::{error, info, warn};
use sled_overlay::sled; use sled_overlay::sled;
use smol::{ use smol::{
channel, channel,
fs::{self, OpenOptions}, fs::{self, OpenOptions},
lock::RwLock, lock::RwLock,
}; };
use tracing::{error, info, warn};
use darkfi::{ use darkfi::{
dht::{tasks as dht_tasks, Dht, DhtHandler, DhtSettings}, dht::{tasks as dht_tasks, Dht, DhtHandler, DhtSettings},

View File

@@ -16,11 +16,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
use log::{debug, error, info, warn};
use sled_overlay::sled; use sled_overlay::sled;
use smol::{stream::StreamExt, Executor}; use smol::{stream::StreamExt, Executor};
use std::sync::Arc; use std::sync::Arc;
use structopt_toml::StructOptToml; use structopt_toml::StructOptToml;
use tracing::{debug, error, info, warn};
use darkfi::{ use darkfi::{
async_daemonize, async_daemonize,

View File

@@ -21,10 +21,10 @@ use std::{
sync::Arc, sync::Arc,
}; };
use log::info;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use smol::lock::RwLock; use smol::lock::RwLock;
use structopt::StructOpt; use structopt::StructOpt;
use tracing::info;
use url::Url; use url::Url;
use darkfi::{system::ExecutorPtr, Error, Result}; use darkfi::{system::ExecutorPtr, Error, Result};

View File

@@ -17,9 +17,9 @@
*/ */
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error, info};
use smol::Executor; use smol::Executor;
use std::{path::StripPrefixError, sync::Arc}; use std::{path::StripPrefixError, sync::Arc};
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
dht::DhtHandler, dht::DhtHandler,

View File

@@ -17,7 +17,6 @@
*/ */
use async_trait::async_trait; use async_trait::async_trait;
use log::error;
use smol::lock::{Mutex, MutexGuard}; use smol::lock::{Mutex, MutexGuard};
use std::{ use std::{
collections::{HashMap, HashSet}, collections::{HashMap, HashSet},
@@ -25,6 +24,7 @@ use std::{
sync::Arc, sync::Arc,
}; };
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::error;
use darkfi::{ use darkfi::{
dht::DhtNode, dht::DhtNode,

View File

@@ -18,7 +18,7 @@
use std::sync::Arc; use std::sync::Arc;
use log::{error, info, warn}; use tracing::{error, info, warn};
use darkfi::{ use darkfi::{
dht::{DhtHandler, DhtNode}, dht::{DhtHandler, DhtNode},

View File

@@ -23,8 +23,8 @@ use darkfi::{
}; };
use darkfi_serial::{deserialize, serialize}; use darkfi_serial::{deserialize, serialize};
use genevd::GenEvent; use genevd::GenEvent;
use log::debug;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::debug;
pub struct Gen { pub struct Gen {
pub rpc_client: RpcClient, pub rpc_client: RpcClient,

View File

@@ -31,10 +31,10 @@ use darkfi::{
util::path::expand_path, util::path::expand_path,
Error, Result, Error, Result,
}; };
use log::{debug, error, info};
use sled_overlay::sled; use sled_overlay::sled;
use smol::{fs, lock::RwLock, stream::StreamExt}; use smol::{fs, lock::RwLock, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::{debug, error, info};
mod rpc; mod rpc;
use rpc::JsonRpcInterface; use rpc::JsonRpcInterface;

View File

@@ -19,9 +19,9 @@
use std::collections::HashSet; use std::collections::HashSet;
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error};
use smol::lock::{Mutex, MutexGuard}; use smol::lock::{Mutex, MutexGuard};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error};
use darkfi::{ use darkfi::{
event_graph::{proto::EventPut, Event, EventGraphPtr}, event_graph::{proto::EventPut, Event, EventGraphPtr},

View File

@@ -24,7 +24,6 @@ use std::{
}; };
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error, info, warn};
use semver::Version; use semver::Version;
use smol::{ use smol::{
lock::{Mutex, MutexGuard}, lock::{Mutex, MutexGuard},
@@ -35,6 +34,7 @@ use structopt::StructOpt;
use structopt_toml::StructOptToml; use structopt_toml::StructOptToml;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use toml::Value; use toml::Value;
use tracing::{debug, error, info, warn};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -18,11 +18,11 @@
use std::{collections::HashSet, sync::Arc}; use std::{collections::HashSet, sync::Arc};
use log::{error, info};
use smol::{ use smol::{
channel::{Receiver, Sender}, channel::{Receiver, Sender},
lock::Mutex, lock::Mutex,
}; };
use tracing::{error, info};
use darkfi::{ use darkfi::{
rpc::{ rpc::{

View File

@@ -18,9 +18,9 @@
use std::sync::Arc; use std::sync::Arc;
use log::info;
use smol::{stream::StreamExt, Executor}; use smol::{stream::StreamExt, Executor};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::info;
use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result}; use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result};

View File

@@ -18,9 +18,9 @@
use std::collections::HashSet; use std::collections::HashSet;
use log::{debug, error, info};
use num_bigint::BigUint; use num_bigint::BigUint;
use smol::lock::MutexGuard; use smol::lock::MutexGuard;
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
blockchain::BlockInfo, blockchain::BlockInfo,

View File

@@ -24,9 +24,9 @@ use std::{
}; };
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, info, warn};
use smol::lock::{Mutex, MutexGuard}; use smol::lock::{Mutex, MutexGuard};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, info, warn};
use darkfi::{ use darkfi::{
event_graph::EventGraphPtr, event_graph::EventGraphPtr,

View File

@@ -36,12 +36,12 @@ use darkfi_serial::{
}; };
use futures::{select, FutureExt}; use futures::{select, FutureExt};
use libc::mkfifo; use libc::mkfifo;
use log::{debug, error, info};
use rand::rngs::OsRng; use rand::rngs::OsRng;
use sled_overlay::sled; use sled_overlay::sled;
use smol::{fs, stream::StreamExt}; use smol::{fs, stream::StreamExt};
use structopt_toml::StructOptToml; use structopt_toml::StructOptToml;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
async_daemonize, async_daemonize,

View File

@@ -23,8 +23,8 @@ use std::{
}; };
use chrono::{TimeZone, Utc}; use chrono::{TimeZone, Utc};
use log::debug;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::debug;
use darkfi::util::{ use darkfi::util::{
file::{load_json_file, save_json_file}, file::{load_json_file, save_json_file},

View File

@@ -24,8 +24,8 @@ use std::{
}; };
use darkfi_serial::{async_trait, SerialDecodable, SerialEncodable}; use darkfi_serial::{async_trait, SerialDecodable, SerialEncodable};
use log::debug;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::debug;
use darkfi::{ use darkfi::{
util::{ util::{

View File

@@ -22,7 +22,7 @@ use std::{
path::Path, path::Path,
}; };
use log::debug; use tracing::debug;
use darkfi::{Error, Result}; use darkfi::{Error, Result};
use rand::{distributions::Alphanumeric, rngs::OsRng, Rng}; use rand::{distributions::Alphanumeric, rngs::OsRng, Rng};

View File

@@ -17,9 +17,9 @@
*/ */
// ANCHOR: imports // ANCHOR: imports
use log::{debug, error, info};
use smol::{lock::Mutex, stream::StreamExt}; use smol::{lock::Mutex, stream::StreamExt};
use std::{collections::HashSet, sync::Arc}; use std::{collections::HashSet, sync::Arc};
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
async_daemonize, cli_desc, net, async_daemonize, cli_desc, net,

View File

@@ -19,9 +19,9 @@
// ANCHOR: protocol_dchat // ANCHOR: protocol_dchat
use async_trait::async_trait; use async_trait::async_trait;
use darkfi::{net, Result}; use darkfi::{net, Result};
use log::debug;
use smol::Executor; use smol::Executor;
use std::sync::Arc; use std::sync::Arc;
use tracing::debug;
use crate::dchatmsg::{DchatMsg, DchatMsgsBuffer}; use crate::dchatmsg::{DchatMsg, DchatMsgsBuffer};

View File

@@ -18,9 +18,9 @@
use async_trait::async_trait; use async_trait::async_trait;
use darkfi::{net::P2pPtr, system::StoppableTaskPtr}; use darkfi::{net::P2pPtr, system::StoppableTaskPtr};
use log::debug;
use smol::lock::MutexGuard; use smol::lock::MutexGuard;
use std::collections::HashSet; use std::collections::HashSet;
use tracing::debug;
use darkfi::rpc::{ use darkfi::rpc::{
jsonrpc::{ErrorCode, JsonError, JsonRequest, JsonResponse, JsonResult}, jsonrpc::{ErrorCode, JsonError, JsonRequest, JsonResponse, JsonResult},

View File

@@ -39,7 +39,7 @@ use darkfi::{
}; };
use darkfi_serial::{AsyncDecodable, AsyncEncodable}; use darkfi_serial::{AsyncDecodable, AsyncEncodable};
use futures::{FutureExt, AsyncWriteExt}; use futures::{FutureExt, AsyncWriteExt};
use log::{debug, error, info}; use tracing::{debug, error, info};
use sled_overlay::sled; use sled_overlay::sled;
use smol::{fs, lock::Mutex, stream::StreamExt, Executor}; use smol::{fs, lock::Mutex, stream::StreamExt, Executor};
use std::{collections::HashSet, path::PathBuf, sync::Arc}; use std::{collections::HashSet, path::PathBuf, sync::Arc};

View File

@@ -29,7 +29,7 @@ use darkfi::{
}, },
system::StoppableTaskPtr, system::StoppableTaskPtr,
}; };
use log::debug; use tracing::debug;
use smol::lock::MutexGuard; use smol::lock::MutexGuard;
use super::Daemon; use super::Daemon;

View File

@@ -26,7 +26,7 @@ use darkfi_serial::{
async_trait, deserialize_async_partial, AsyncDecodable, AsyncEncodable, SerialDecodable, async_trait, deserialize_async_partial, AsyncDecodable, AsyncEncodable, SerialDecodable,
SerialEncodable, SerialEncodable,
}; };
use log::{error, info}; use tracing::{error, info};
use sled_overlay::sled; use sled_overlay::sled;
use smol::fs; use smol::fs;
use url::Url; use url::Url;

View File

@@ -27,7 +27,7 @@ use darkfi::{
use darkfi_serial::{ use darkfi_serial::{
async_trait, deserialize_async, serialize_async, SerialDecodable, SerialEncodable, async_trait, deserialize_async, serialize_async, SerialDecodable, SerialEncodable,
}; };
use log::{debug, error, info}; use tracing::{debug, error, info};
use sled_overlay::{sled, SledTreeOverlay}; use sled_overlay::{sled, SledTreeOverlay};
use smol::{ use smol::{
lock::{OnceCell, RwLock}, lock::{OnceCell, RwLock},

View File

@@ -18,9 +18,9 @@
use std::{fmt, sync::Arc}; use std::{fmt, sync::Arc};
use log::info;
use smol::stream::StreamExt; use smol::stream::StreamExt;
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::info;
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -27,7 +27,7 @@ use darkfi::{
system::{ExecutorPtr, Publisher, StoppableTask}, system::{ExecutorPtr, Publisher, StoppableTask},
Error, Result, Error, Result,
}; };
use log::{error, info}; use tracing::{error, info};
use url::Url; use url::Url;
use crate::DamCli; use crate::DamCli;

View File

@@ -27,9 +27,9 @@ use darkfi::{
system::{ExecutorPtr, StoppableTask, StoppableTaskPtr}, system::{ExecutorPtr, StoppableTask, StoppableTaskPtr},
Error, Result, Error, Result,
}; };
use log::{debug, error, info};
use smol::lock::Mutex; use smol::lock::Mutex;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info};
use crate::proto::{ use crate::proto::{
protocol_bar::Bar, protocol_bar::Bar,

View File

@@ -21,8 +21,8 @@ use std::{
sync::Arc, sync::Arc,
}; };
use log::{debug, error, info};
use smol::lock::Mutex; use smol::lock::Mutex;
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
net::settings::Settings, net::settings::Settings,

View File

@@ -19,9 +19,9 @@
use std::sync::Arc; use std::sync::Arc;
use async_std::prelude::StreamExt; use async_std::prelude::StreamExt;
use log::info;
use smol::Executor; use smol::Executor;
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::info;
use darkfi::{ use darkfi::{
async_daemonize, cli_desc, net::settings::SettingsOpt, rpc::settings::RpcSettingsOpt, Error, async_daemonize, cli_desc, net::settings::SettingsOpt, rpc::settings::RpcSettingsOpt, Error,

View File

@@ -24,7 +24,7 @@ use darkfi::{
system::ExecutorPtr, system::ExecutorPtr,
Result, Result,
}; };
use log::info; use tracing::info;
/// `Foo` messages broadcast protocol /// `Foo` messages broadcast protocol
pub mod protocol_foo; pub mod protocol_foo;

View File

@@ -19,8 +19,8 @@
use std::sync::Arc; use std::sync::Arc;
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error, info};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
impl_p2p_message, impl_p2p_message,

View File

@@ -19,8 +19,8 @@
use std::sync::Arc; use std::sync::Arc;
use async_trait::async_trait; use async_trait::async_trait;
use log::{debug, error, info};
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info};
use darkfi::{ use darkfi::{
impl_p2p_message, impl_p2p_message,

View File

@@ -19,8 +19,8 @@
use std::collections::HashSet; use std::collections::HashSet;
use async_trait::async_trait; use async_trait::async_trait;
use log::debug;
use smol::lock::MutexGuard; use smol::lock::MutexGuard;
use tracing::debug;
use darkfi::{ use darkfi::{
net::P2pPtr, net::P2pPtr,

View File

@@ -18,7 +18,7 @@
use std::{collections::HashSet, sync::Arc}; use std::{collections::HashSet, sync::Arc};
use log::{error, info}; use tracing::{error, info};
use rand::{rngs::OsRng, Rng}; use rand::{rngs::OsRng, Rng};
use smol::{stream::StreamExt, Executor}; use smol::{stream::StreamExt, Executor};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};

View File

@@ -18,8 +18,8 @@
use std::{collections::HashSet, sync::Arc}; use std::{collections::HashSet, sync::Arc};
use log::{error, info};
use smol::lock::Mutex; use smol::lock::Mutex;
use tracing::{error, info};
use url::Url; use url::Url;
use darkfi::{ use darkfi::{

View File

@@ -19,8 +19,8 @@
use std::sync::Arc; use std::sync::Arc;
use async_std::prelude::StreamExt; use async_std::prelude::StreamExt;
use log::info;
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml}; use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
use tracing::info;
use url::Url; use url::Url;
use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result}; use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result};

View File

@@ -30,9 +30,9 @@ use darkfi::{
}; };
use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas}; use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas};
use darkfi_serial::serialize; use darkfi_serial::serialize;
use log::{debug, error, info};
use smol::lock::MutexGuard; use smol::lock::MutexGuard;
use tinyjson::JsonValue; use tinyjson::JsonValue;
use tracing::{debug, error, info};
use url::Url; use url::Url;
use crate::{ use crate::{

View File

@@ -26,8 +26,8 @@ use darkfi_sdk::{
monotree::Monotree, monotree::Monotree,
}; };
use darkfi_serial::{deserialize, serialize}; use darkfi_serial::{deserialize, serialize};
use log::{debug, error};
use sled_overlay::{serial::parse_record, sled, SledDbOverlay}; use sled_overlay::{serial::parse_record, sled, SledDbOverlay};
use tracing::{debug, error};
use crate::{ use crate::{
zk::{empty_witnesses, VerifyingKey, ZkCircuit}, zk::{empty_witnesses, VerifyingKey, ZkCircuit},

View File

@@ -19,8 +19,8 @@
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use darkfi_sdk::{monotree::Monotree, tx::TransactionHash}; use darkfi_sdk::{monotree::Monotree, tx::TransactionHash};
use log::debug;
use sled_overlay::{sled, sled::Transactional}; use sled_overlay::{sled, sled::Transactional};
use tracing::debug;
use crate::{tx::Transaction, util::time::Timestamp, Error, Result}; use crate::{tx::Transaction, util::time::Timestamp, Error, Result};

View File

@@ -21,8 +21,8 @@ use darkfi_sdk::{
pasta::pallas, pasta::pallas,
}; };
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use darkfi::{ use darkfi::{
zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit}, zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit},

View File

@@ -22,8 +22,8 @@ use darkfi::{
Result, Result,
}; };
use darkfi_sdk::{crypto::SecretKey, pasta::pallas}; use darkfi_sdk::{crypto::SecretKey, pasta::pallas};
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use crate::model::{Dao, DaoMintParams}; use crate::model::{Dao, DaoMintParams};

View File

@@ -30,8 +30,8 @@ use darkfi_sdk::{
}, },
pasta::pallas, pasta::pallas,
}; };
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use darkfi::{ use darkfi::{
zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit}, zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit},

View File

@@ -37,8 +37,8 @@ use darkfi_sdk::{
}, },
pasta::pallas, pasta::pallas,
}; };
use log::info;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::info;
// Integration test configuration // Integration test configuration
// Holders this test will use: // Holders this test will use:

View File

@@ -18,7 +18,7 @@
use darkfi::{ClientFailed, Result}; use darkfi::{ClientFailed, Result};
use darkfi_sdk::{crypto::Keypair, deploy::DeployParamsV1}; use darkfi_sdk::{crypto::Keypair, deploy::DeployParamsV1};
use log::{debug, error}; use tracing::{debug, error};
use crate::error::DeployError; use crate::error::DeployError;

View File

@@ -18,7 +18,7 @@
use darkfi::Result; use darkfi::Result;
use darkfi_sdk::crypto::Keypair; use darkfi_sdk::crypto::Keypair;
use log::debug; use tracing::debug;
use crate::model::LockParamsV1; use crate::model::LockParamsV1;

View File

@@ -18,7 +18,7 @@
use darkfi::Result; use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness}; use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
use log::info; use tracing::info;
#[test] #[test]
fn deploy_integration() -> Result<()> { fn deploy_integration() -> Result<()> {

View File

@@ -22,8 +22,8 @@ use darkfi::{
Result, Result,
}; };
use darkfi_sdk::crypto::Keypair; use darkfi_sdk::crypto::Keypair;
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use crate::model::{MoneyAuthTokenFreezeParamsV1, TokenAttributes}; use crate::model::{MoneyAuthTokenFreezeParamsV1, TokenAttributes};

View File

@@ -22,8 +22,8 @@ use darkfi::{
Result, Result,
}; };
use darkfi_sdk::crypto::{note::AeadEncryptedNote, Blind, Keypair}; use darkfi_sdk::crypto::{note::AeadEncryptedNote, Blind, Keypair};
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use crate::{ use crate::{
client::MoneyNote, client::MoneyNote,

View File

@@ -25,8 +25,8 @@ use darkfi_sdk::{
crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey}, crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey},
pasta::pallas, pasta::pallas,
}; };
use log::debug;
use rand::{prelude::SliceRandom, rngs::OsRng}; use rand::{prelude::SliceRandom, rngs::OsRng};
use tracing::debug;
use crate::{ use crate::{
client::{ client::{

View File

@@ -26,8 +26,8 @@ use darkfi_sdk::{
crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey}, crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey},
pasta::pallas, pasta::pallas,
}; };
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use crate::{ use crate::{
client::{ client::{

View File

@@ -31,8 +31,8 @@ use darkfi_sdk::{
pasta::pallas, pasta::pallas,
}; };
use darkfi_serial::serialize; use darkfi_serial::serialize;
use log::{debug, error};
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::{debug, error};
use crate::{ use crate::{
client::{ client::{

View File

@@ -22,8 +22,8 @@ use darkfi::{
Result, Result,
}; };
use darkfi_sdk::pasta::pallas; use darkfi_sdk::pasta::pallas;
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use crate::model::{CoinAttributes, MoneyTokenMintParamsV1, TokenAttributes}; use crate::model::{CoinAttributes, MoneyTokenMintParamsV1, TokenAttributes};

View File

@@ -28,8 +28,8 @@ use darkfi_sdk::{
}, },
pasta::pallas, pasta::pallas,
}; };
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use super::proof::{create_transfer_burn_proof, create_transfer_mint_proof}; use super::proof::{create_transfer_burn_proof, create_transfer_mint_proof};
use crate::{ use crate::{

View File

@@ -21,8 +21,8 @@ use darkfi_sdk::{
crypto::{pasta_prelude::*, Blind, FuncId, Keypair, MerkleTree, PublicKey}, crypto::{pasta_prelude::*, Blind, FuncId, Keypair, MerkleTree, PublicKey},
pasta::pallas, pasta::pallas,
}; };
use log::{debug, error};
use rand::{prelude::SliceRandom, rngs::OsRng}; use rand::{prelude::SliceRandom, rngs::OsRng};
use tracing::{debug, error};
use crate::{ use crate::{
client::OwnCoin, client::OwnCoin,

View File

@@ -29,8 +29,8 @@ use darkfi_sdk::{
}, },
pasta::pallas, pasta::pallas,
}; };
use log::debug;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::debug;
use super::{TransferCallInput, TransferCallOutput}; use super::{TransferCallInput, TransferCallOutput};
use crate::model::{Coin, CoinAttributes, Nullifier}; use crate::model::{Coin, CoinAttributes, Nullifier};

View File

@@ -27,7 +27,7 @@
use darkfi::Result; use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness}; use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
use log::info; use tracing::info;
#[test] #[test]
fn genesis_mint() -> Result<()> { fn genesis_mint() -> Result<()> {

View File

@@ -30,8 +30,8 @@
use darkfi::Result; use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness}; use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
use darkfi_sdk::crypto::BaseBlind; use darkfi_sdk::crypto::BaseBlind;
use log::info;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::info;
#[test] #[test]
fn mint_pay_swap() -> Result<()> { fn mint_pay_swap() -> Result<()> {

View File

@@ -19,8 +19,8 @@
use darkfi::Result; use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness}; use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
use darkfi_sdk::crypto::BaseBlind; use darkfi_sdk::crypto::BaseBlind;
use log::info;
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tracing::info;
#[test] #[test]
fn token_mint() -> Result<()> { fn token_mint() -> Result<()> {

Some files were not shown because too many files have changed in this diff Show More