logs
This commit is contained in:
parent
c2c80232e3
commit
1022f1b0c6
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd /home/ubuntu/solana
|
cd /home/ubuntu/solana
|
||||||
git pull
|
git pull
|
||||||
export RUST_LOG=solana::crdt=info
|
export RUST_LOG=solana=info
|
||||||
cat genesis.log | cargo run --release --features cuda --bin solana-testnode -- -s leader.json -b 8000 -d | grep INFO
|
cat genesis.log | cargo run --release --features cuda --bin solana-testnode -- -s leader.json -b 8000 -d | grep INFO
|
||||||
#cat genesis.log | cargo run --release --bin solana-testnode -- -s leader.json -b 8000 -d
|
#cat genesis.log | cargo run --release --bin solana-testnode -- -s leader.json -b 8000 -d
|
||||||
|
|
20
src/crdt.rs
20
src/crdt.rs
|
@ -176,7 +176,7 @@ impl Crdt {
|
||||||
let (me, table): (ReplicatedData, Vec<ReplicatedData>) = {
|
let (me, table): (ReplicatedData, Vec<ReplicatedData>) = {
|
||||||
// copy to avoid locking during IO
|
// copy to avoid locking during IO
|
||||||
let robj = obj.read().expect("'obj' read lock in pub fn broadcast");
|
let robj = obj.read().expect("'obj' read lock in pub fn broadcast");
|
||||||
info!("broadcast table {}", robj.table.len());
|
trace!("broadcast table {}", robj.table.len());
|
||||||
let cloned_table: Vec<ReplicatedData> = robj.table.values().cloned().collect();
|
let cloned_table: Vec<ReplicatedData> = robj.table.values().cloned().collect();
|
||||||
(robj.table[&robj.me].clone(), cloned_table)
|
(robj.table[&robj.me].clone(), cloned_table)
|
||||||
};
|
};
|
||||||
|
@ -191,7 +191,7 @@ impl Crdt {
|
||||||
//filter nodes that are not listening
|
//filter nodes that are not listening
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
info!("broadcast node {}", v.replicate_addr);
|
trace!("broadcast node {}", v.replicate_addr);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -200,8 +200,8 @@ impl Crdt {
|
||||||
warn!("crdt too small");
|
warn!("crdt too small");
|
||||||
return Err(Error::CrdtTooSmall);
|
return Err(Error::CrdtTooSmall);
|
||||||
}
|
}
|
||||||
info!("nodes table {}", nodes.len());
|
trace!("nodes table {}", nodes.len());
|
||||||
info!("blobs table {}", blobs.len());
|
trace!("blobs table {}", blobs.len());
|
||||||
// enumerate all the blobs, those are the indices
|
// enumerate all the blobs, those are the indices
|
||||||
// transmit them to nodes, starting from a different node
|
// transmit them to nodes, starting from a different node
|
||||||
let orders: Vec<_> = blobs
|
let orders: Vec<_> = blobs
|
||||||
|
@ -214,7 +214,7 @@ impl Crdt {
|
||||||
.skip((*transmit_index as usize) % nodes.len()),
|
.skip((*transmit_index as usize) % nodes.len()),
|
||||||
)
|
)
|
||||||
.collect();
|
.collect();
|
||||||
info!("orders table {}", orders.len());
|
trace!("orders table {}", orders.len());
|
||||||
let errs: Vec<_> = orders
|
let errs: Vec<_> = orders
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|((i, b), v)| {
|
.map(|((i, b), v)| {
|
||||||
|
@ -225,13 +225,13 @@ impl Crdt {
|
||||||
blob.set_index(*transmit_index + i as u64)
|
blob.set_index(*transmit_index + i as u64)
|
||||||
.expect("set_index in pub fn broadcast");
|
.expect("set_index in pub fn broadcast");
|
||||||
//TODO profile this, may need multiple sockets for par_iter
|
//TODO profile this, may need multiple sockets for par_iter
|
||||||
info!("broadcast {} to {}", blob.meta.size, v.replicate_addr);
|
trace!("broadcast {} to {}", blob.meta.size, v.replicate_addr);
|
||||||
let e = s.send_to(&blob.data[..blob.meta.size], &v.replicate_addr);
|
let e = s.send_to(&blob.data[..blob.meta.size], &v.replicate_addr);
|
||||||
info!("done broadcast {} to {}", blob.meta.size, v.replicate_addr);
|
trace!("done broadcast {} to {}", blob.meta.size, v.replicate_addr);
|
||||||
e
|
e
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
info!("broadcast results {}", errs.len());
|
trace!("broadcast results {}", errs.len());
|
||||||
for e in errs {
|
for e in errs {
|
||||||
match e {
|
match e {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
@ -279,7 +279,7 @@ impl Crdt {
|
||||||
let errs: Vec<_> = orders
|
let errs: Vec<_> = orders
|
||||||
.par_iter()
|
.par_iter()
|
||||||
.map(|v| {
|
.map(|v| {
|
||||||
info!(
|
trace!(
|
||||||
"retransmit blob {} to {}",
|
"retransmit blob {} to {}",
|
||||||
rblob.get_index().unwrap(),
|
rblob.get_index().unwrap(),
|
||||||
v.replicate_addr
|
v.replicate_addr
|
||||||
|
@ -478,7 +478,7 @@ impl Crdt {
|
||||||
//TODO verify from is signed
|
//TODO verify from is signed
|
||||||
obj.write().unwrap().insert(&from);
|
obj.write().unwrap().insert(&from);
|
||||||
let me = obj.read().unwrap().my_data().clone();
|
let me = obj.read().unwrap().my_data().clone();
|
||||||
info!(
|
trace!(
|
||||||
"received RequestWindowIndex {} {} myaddr {}",
|
"received RequestWindowIndex {} {} myaddr {}",
|
||||||
ix, from.replicate_addr, me.replicate_addr
|
ix, from.replicate_addr, me.replicate_addr
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue