mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-02 15:21:14 +03:00
Testnet2 small fixes (#899)
* add hint for gcc-5 for building CUDA plugin * add N_BLOCks comment for >=6GB GPU cards * minor logging cleanup * mark to be kept + reformat as "@ height [hash]" * show CuckooNN + better wording
This commit is contained in:
parent
ea9a978c87
commit
3e3fe6cae6
6 changed files with 21 additions and 11 deletions
|
@ -169,10 +169,10 @@ pub fn sync_block_header(
|
|||
pub fn process_block_header(bh: &BlockHeader, mut ctx: BlockContext) -> Result<(), Error> {
|
||||
debug!(
|
||||
LOGGER,
|
||||
"pipe: process_block_header: {} at {}",
|
||||
bh.hash(),
|
||||
bh.height
|
||||
);
|
||||
"pipe: process_block_header at {} [{}]",
|
||||
bh.height,
|
||||
bh.hash()
|
||||
); // keep this
|
||||
|
||||
check_header_known(bh.hash(), &mut ctx)?;
|
||||
validate_header(&bh, &mut ctx)
|
||||
|
|
|
@ -502,7 +502,7 @@ impl<'a> Extension<'a> {
|
|||
pub fn rewind(&mut self, block_header: &BlockHeader) -> Result<(), Error> {
|
||||
let hash = block_header.hash();
|
||||
let height = block_header.height;
|
||||
debug!(LOGGER, "Rewind to header {} at {}", hash, height);
|
||||
debug!(LOGGER, "Rewind to header at {} [{}]", height, hash); // keep this
|
||||
|
||||
// rewind each MMR
|
||||
let (out_pos_rew, kern_pos_rew) = self.commit_index.get_block_marker(&hash)?;
|
||||
|
|
|
@ -414,7 +414,7 @@ impl Block {
|
|||
/// Hydrate a block from a compact block.
|
||||
/// Note: caller must validate the block themselves, we do not validate it here.
|
||||
pub fn hydrate_from(cb: CompactBlock, txs: Vec<Transaction>) -> Block {
|
||||
debug!(
|
||||
trace!(
|
||||
LOGGER,
|
||||
"block: hydrate_from: {}, {} txs",
|
||||
cb.hash(),
|
||||
|
|
|
@ -219,11 +219,17 @@ NUM_THREADS = 1
|
|||
#[mining.miner_plugin_config.device_parameters.0]
|
||||
#NUM_THREADS = 1
|
||||
|
||||
#CUDA Miner (Included here for integration only, Not ready for use)
|
||||
#CUDA Miner
|
||||
#
|
||||
# Note! 4+ GB GPU cards only!
|
||||
# If you have 6GB GPU RAM, set N_BLOCKS = 128
|
||||
# Docs: https://github.com/tromp/cuckoo/blob/master/GPU.md
|
||||
#
|
||||
#Can currently be used only in Production (30) Mode
|
||||
#This plugin is not built by default. To build:
|
||||
#1) Ensure the latest cuda toolkit is installed
|
||||
# (nvcc should be in your PATH)
|
||||
# Wrong gcc? install gcc-5 g++-5; export CC=`which gcc-5`; # then build
|
||||
#2) Uncomment the 'build-cuda-plugin' feature
|
||||
# in pow/Cargo.toml
|
||||
#
|
||||
|
|
|
@ -221,7 +221,11 @@ impl Miner {
|
|||
}
|
||||
}
|
||||
}
|
||||
info!(LOGGER, "Mining at {} graphs per second", sps_total);
|
||||
info!(
|
||||
LOGGER,
|
||||
"Mining: Cuckoo{} at {} gps (graphs per second)",
|
||||
cuckoo_size,
|
||||
sps_total);
|
||||
if sps_total.is_finite() {
|
||||
let mut mining_stats = mining_stats.write().unwrap();
|
||||
mining_stats.combined_gps = sps_total;
|
||||
|
|
|
@ -280,10 +280,10 @@ impl Peers {
|
|||
}
|
||||
debug!(
|
||||
LOGGER,
|
||||
"broadcast_block: {}, {} at {}, to {} peers, done.",
|
||||
b.hash(),
|
||||
"broadcast_block: {} @ {} [{}] was sent to {} peers.",
|
||||
b.header.total_difficulty,
|
||||
b.header.height,
|
||||
b.hash(),
|
||||
count,
|
||||
);
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ impl NetAdapter for Peers {
|
|||
/// addresses.
|
||||
fn find_peer_addrs(&self, capab: Capabilities) -> Vec<SocketAddr> {
|
||||
let peers = self.find_peers(State::Healthy, capab, MAX_PEER_ADDRS as usize);
|
||||
debug!(LOGGER, "Got {} peer addrs to send.", peers.len());
|
||||
trace!(LOGGER, "find_peer_addrs: {} healthy peers picked", peers.len());
|
||||
map_vec!(peers, |p| p.addr)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue