Restore the number of simulation nodes to 4; More block pool tracing [skip ci]

This commit is contained in:
Zahary Karadjov 2019-11-26 19:02:27 +02:00
parent bde20436e8
commit 1099548775
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
2 changed files with 7 additions and 3 deletions

View File

@ -81,7 +81,7 @@ proc init*(T: type BlockPool, db: BeaconChainDB): BlockPool =
link(newRef, curRef)
curRef = curRef.parent
blocks[curRef.root] = curRef
trace "Populating block pool", key = curRef.root, val = curRef
debug "Populating block pool", key = curRef.root, val = curRef
if latestStateRoot.isNone() and db.containsState(blck.state_root):
latestStateRoot = some(blck.state_root)
@ -169,7 +169,7 @@ proc addResolvedBlock(
link(parent, blockRef)
pool.blocks[blockRoot] = blockRef
trace "Populating block pool", key = blockRoot, val = blockRef
debug "Populating block pool", key = blockRoot, val = blockRef
pool.addSlotMapping(blockRef)
@ -352,11 +352,15 @@ proc getBlockRange*(pool: BlockPool, headBlock: Eth2Digest,
##
result = output.len
trace "getBlockRange entered", headBlock, startSlot, skipStep
var b = pool.getRef(headBlock)
if b == nil:
trace "head block not found", headBlock
return
trace "head block found", headBlock = b
if b.slot < startSlot:
trace "head block is older than startSlot", headBlockSlot = b.slot, startSlot
return

View File

@ -20,7 +20,7 @@ cd - &>/dev/null
# When changing these, also update the readme section on running simulation
# so that the run_node example is correct!
NUM_VALIDATORS=${VALIDATORS:-192}
TOTAL_NODES=${NODES:-2}
TOTAL_NODES=${NODES:-4}
TOTAL_USER_NODES=${USER_NODES:-0}
TOTAL_SYSTEM_NODES=$(( TOTAL_NODES - TOTAL_USER_NODES ))
MASTER_NODE=$(( TOTAL_NODES - 1 ))