De Wiki inetshell
Saltar a: navegación, buscar

To figure out syncing status, you type in the console (via console or attach, same):

 eth.syncing 

if it is not false, it shows the syncronisation status something like:

{
  currentBlock: 766451,
  highestBlock: 773332,
  startingBlock: 766451
}

current block is our nodes canonical head. highest block is the best peers reported canonical head starting block is the block height at the begining of the node session.

Now, if it returns false, it means you are in sync, or you have not yet found a peer to start syncing from. Which is the case you can tell by typing

eth.blockNumber

and check this to the one reported by http://stats.ethdev.com If you believe that (which is not strictly speaking part of the game).

You can check your network status with

 net.peerCount 

or

 admin.peers 


https://www.reddit.com/r/ethereum/comments/3ysrwn/running_geth_console/

https://ethereum.stackexchange.com/questions/11233/how-to-check-my-sync-status-on-geth-1-5-5-raspberry-pi-3

Check sync status[editar]

var lastPercentage = 0;var lastBlocksToGo = 0;var timeInterval = 10000;
setInterval(function(){
    var percentage = eth.syncing.currentBlock/eth.syncing.highestBlock*100;
    var percentagePerTime = percentage - lastPercentage;
    var blocksToGo = eth.syncing.highestBlock - eth.syncing.currentBlock;
    var bps = (lastBlocksToGo - blocksToGo) / (timeInterval / 1000)
    var etas = 100 / percentagePerTime * (timeInterval / 1000)

    var etaM = parseInt(etas/60,10);
    console.log(parseInt(percentage,10)+'% ETA: '+etaM+' minutes @ '+bps+'bps');

    lastPercentage = percentage;lastBlocksToGo = blocksToGo;
},timeInterval);