eth.syncing { currentBlock: 745600, highestBlock: 889152, startingBlock: 745553 } You can then see where you are (currentBlock), and the block you still have to reach (highestBlock).(The difference between them is the number of blocks you have left remaining.)">
Ethereum Best Block
ethereum best block

Ethereum Sign up or log in to customize your list._ Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top up vote down vote favorite 5 I'm syncing up a new node.How can I find out what the latest block is so that I know how far I've got to go?nodes synchronization up vote down vote For Geth, in another terminal, attach to the Geth console, such as geth attach.This will allow you to keep your syncing node running, without restarting, and you will not see the noisy logs as you would if you simply ran "geth console" without other parameters.In the console, run eth.syncing > eth.syncing { currentBlock: 745600, highestBlock: 889152, startingBlock: 745553 } You can then see where you are (currentBlock), and the block you still have to reach (highestBlock).(The difference between them is the number of blocks you have left remaining.)

You can run eth.syncing a few times to check your progress, and it will return false when done.You can then use eth.blockNumber and also compare with a blockchain explorer, as other answers here mention.up vote 8 down vote If you are using Geth: stop your current instance of geth, then re-run it with the console argument: geth console then enter: web3.eth.blockNumber It will give you the block number as integer, here's the function documentation.
bitcoin user weltweitIf you are looking for the block hash instead you can use: web3.eth.getBlock(BLOCK_NUMBER).hash so for the current block (atm) it will be: web3.eth.getBlock(887893).hash and for the latest block: web3.eth.getBlock(web3.eth.blockNumber).hash up vote 6 down vote You could use a block explorer, such as Etherchain.
1 bitcoin to ltl

up vote 5 down vote The Ethereum wallet will display the latest block number.The official Ethereum stats website also displays it.(Note: this doesn't represent all peers on the network.)up vote 3 down vote web3.eth.blockNumber gets you the latest block height on your node.Note that you have to have a synced node for that.When you are still downloading the blockchain this number will be smaller.
bitcoin shaup vote 2 down vote If you are still syncing you can type eth.syncing and it will report currentBlock highestBlock startingBlock If eth.syncing is false then use the eth.blockNumber command sebastian mentioned and compare it to the reported block height from your favorite online block explorer up vote 2 down vote /lyricalpolymath/Ethereum-Scripts 1) show simple progress % with geth running, copy and paste this code in a terminal window to have a simple feedback of the blockchain syncing progress geth --exec 'var s = eth.syncing; console.log("
------------ GETH SYNCING PROGRESS
progress: " + (s.currentBlock/s.highestBlock*100)+ " %
blocks left to parse: "+ (s.highestBlock-s.currentBlock) + "
current Block: " + s.currentBlock + " of " + s.highestBlock)' attach you will get an output like this ------------ GETH SYNCING PROGRESS progress: 81.9161292631709 % blocks left to parse: 368837 current Block: 1670754 of 2039591 2) advance progress with Time Estimate download the script and with geth running, copy and paste this code in a terminal window to have a simple feedback of the blockchain syncing progress geth --exec "loadScript('GethSyncingProgress_2TimeEstimate.js')" attach will give you an output like ------------ GETH SYNCING PROGRESS - Time estimate progress: 83.83513931320763 Estimated Time left*: 7d :11h :4m :4s.3 Time it took to parse 10 blocks: 0d :0h :0m :19s.5 blocks left to parse: 330536 Your Answer Sign up or log in Sign up using Google Sign up using Email and Password Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service.
bitcoin vad hander

Browse other questions tagged nodes synchronization or ask your own question.technical notes to the go-ethereum blockchain synchronisation module An ethereum node needs to acquire the set of blocks from which the current consensus can be proved.This includes scenarios where the node starts up from scratch (i.e., with an empty database) in which case the block pool acts as a download manager as well as normal operation where the node needs to synchronize recent blocks by finding the best candidate new blocks.
bitcoin block confirmation timeSince network latency and disruption can cause any amount of blocks to be missed the two scenarios can be considered the same task: finding the best chain to give to the blockchain manager.
bitcoin atm texasGoal: The Blockpool needs to find the best chain to be inserted in the blockchain.
bitcoin and nfc

In order the achieve this, the blockpool can only rely on p2p communication using the ethereum wire protocol.The blockchain database is a tree structure with exactly one root, the genesis block and contains at least one leaf node.The consensus protocol specifies that the block with the highest total difficulty is the consensus state.The total difficulty of a block is always strictly higher than that of its parent, so a consensus state is always a leaf node.
bitcoin faucet directly to walletThe current known best block is also called the head block of the node.
bitcoin q-tWhen the node is starting up the first time with an empty database, the head block is the genesis block itself.A chain is any sequence of blocks connecting a root with a leaf node.The leaf node with the highest total difficulty is the head of the block chain which specifies the consensus state of the network.

The chain connecting the genesis block with the head is the canonical chain.A sequence of blocks or block hashes that form a contiguous subsequence of a chain is called a section.The youngest section of blocks headed by the peer's current head is called the peer's head section.If there are two different blocks with the same parent, the chain has a fork.Those blocks which do not end up on the canonical chain are called stale blocks, a sequence of such blocks is a stale section.The Blockpool stores a pool of blocks which have not been processed yet, thus it acts as a queue or processing buffer for the blockchain manager.Therefore the notions of chain, fork, section, etc. carry over to sequences of blocks and blockhashes in the blockpool.As a proper decentralised consensus system, Ethereum relies only on other peers to synchronise.The eth wire protocol defines the messages that the blockpool can use to communicate.For a naive new node, the only entry point to the blockchain is the head block advertised by a peer as part of their status message (StatusMsg, i.e., protocol handshake) or when a NewBlockMsg is received from a miner.

A sequence of block hashes can be requested and received with getBlockHashesMsg/BlockHashesMsg message pair.A set of blocks can be requested and received with getBlocksMsg/BlocksMsg message pair.Although the exact way synchronisation is done is not specified by either the wire protocol or the block chain consensus protocol, the messages provided restrict the synchronisation process: Synchronisation: proceeds from head to known block by requesting and fetching block hashes iteratively from young to old (head to root).Based on block hashes, blocks can be requested.Based on the parenthash of a block, independent sections can be linked and a chain established.By checking if a block is found in the block chain the root of the blockpool can be established and the chain can be inserted in the blockchain.We will elaborate on how exactly this is done below.Our implementation currently provide 4 entry points to the blockpool for the eth protocol instances running on each peer.These get called when a message relevant to blockchain synchronisation is received from the peer.

AddPeer is called by the eth protocol right after receiving the status message (or protocol handshake) from a peer.The blockpool registers the peer with information about its total difficulty and current head block.It also registers peer callbacks so that the blockpool can send requests directly to a peer (requestBlockHashes and requestBlocks) and report a peer error (peerError).Once a peer is removed (disconnect or eviction), the protocol calls back to the BlockPool to unregister the peer with RemovePeer.The blockpool synchronisation relies on choosing the best peer out of the connected peers.The best peer is defined as the peer with the highest advertised total difficulty that is ahead of us.The blockpool works by following and replicating the best peer's canonical chain.Strategy: follow the best peer and replicate its canonical chain.In our architecture the Blockpool controls peer selection only indirectly.If a peer violates a blockpool policy, the blockpool reports it as a peer error.

If the error is fatal, the peer is disconnected and suspended for PeerSuspensionInterval.Synchronisation therefore crucially relies on a healthy network (i.e., connectivity as well as efficient message relaying).Every time a peer is registered, its total difficulty is checked against the best peer.If it is higher, the peer is promoted as best peer.Every time the best peer disconnects, a new "second best" peer is promoted.Surely this is limited to peers that are ahead of us, i.e., ones with advertised total difficulty strictly greater than ours.Since our own total difficulty can change when mining, the blockpool needs to receive updates of the last total difficulty.This is achieved by subscribing to ChainHeadEvent posted in the blockchain manager.A blockpool update routine is listening to these total difficulty updates and if it finds that our own total difficulty goes above that of the best peer, the peer is demoted (our own node becomes the best peer as it were).Note that because of forks it is not sufficient to check if we already have the head block of a peer.

The total difficulty determining best peer status is communicated in one of the following 4 ways: The third entry poing, AddBlockHashes is called by the eth protocol when a blockHashesMsg (blockhashes message) arrives.Since the blockpool needs to follow the canonical chain of the best peer at all times, only the best peer can add block hashes.If this is not the case, AddBlockHashes returns without effect.AddBlocks is called by the eth protocol when a blocksMsg (blocks message) arrives.The various blocks are requested from multiple peers therefore they are accepted from any peer.The peer is recorded on the pool node as the source of the block, this makes it possible to assign an error to the peer in case the block is invalid.Once a peer is promoted as best peer (total difficulty, and current chain head block registered) a head section process is started, which first requests from the peer the head block itself.Once the head block is received, blockhashes starting from the peer's head block are requested from the best peer.

Once a response is received (and the protocol calls AddBlockHashes), the sequence of block hashes in the response from the best peer are used to build up a sequence nodes replicating the head section of the peer's canonical chain.If the peer fails to respond to requests, after a period of blockTimeout, an ErrInsufficientChainInfo error is raised.As a consequence, the peer is disconnected and suspended for PeerSuspensionInterval during which it is not allowed to reconnect.Once the head section nodes are set up, the blockpool starts requesting blocks for that section.The requests are distributed among multiple peers so that fetching is optimised.If the root block of a section is received, then we can connect a section to its parent section (the root block's parent is the parent section's head block).We can repeat requesting blockhashes for the parent section since now we have a way to tell if they arrived.Once a batch of hashes is received, the node skeleton for the new section is built, and a process similar to the head section process is repeated in a somewhat simplified form.

To recap, each section runs its own parallel process with 2 main objective: Block requests are distributed among connected peers to optimise bandwidth utilisation.With this recursive strategy, a chain is getting built from young to old blocks section by section.This process is repeated until a known block is reached.If the known block is found in the blockchain, the descendent blocks in the chain can be inserted to the blockchain.If the block is known to the blockpool, i.e., it is found in a known section, then the peer is registered with the section's process.This means that the section is requesting and receiving blocks because the section is part of the best peer's canonical chain.If block insertion reveals an invalid block, its source (may not be online any more) is given a ErrInvalidBlock error resulting in disconnect and suspension.If a block process does not complete within a set period of time blockTimeout, the chain is killed and the synchronisation is reattempted with (potentially) new peers.

Note that these timeouts are needed to protect against attacks where a rogue peer is sending random blockhashes indefinitely.The interface of the Blockpool with the core is defined with the help of 4 entry points.These are specified as parameters to the blockpool constructor.Initial block validation that does not require the block to have a known (already processed and valid) parent block.Soft proof of work validation is such a step.This is used as a first line of defence: when received, blocks are verified, which by putting a cost to make a peer accept your block, protects against simple spamming.If PoW verification fails the sender peer receives an ErrInvalidPoW error.As a consequence, it is disconnected and not allowed to reconnect for PeerSuspensionInterval Add one or more blocks on top of a known block.See ChainManager.InsertChain The chain manager runs the vm and does proper block validation as well as establishes which block has the highest total difficulty defining the head of the node.

If the chain manager finds a block invalid, the peer that supplied the block receives an ErrInvalidBlock error and as a consequence, gets disconnected and suspended for PeerSuspensionInterval.After successfully inserting blocks, if the block is or was the head block of a peer, the blockpool also checks if the block's actual total difficulty is identical to one advertised by the peer.If it is not, the peer received an ErrIncorrectTD and as a consequence gets disconnected and suspended for PeerSuspensionInterval.This protects against rogue peers advertising a high total difficulty and forcing us to follow their (potentially non-canonical) chain.When receiving block hashes and blocks, we need to check whether the block is already in the blockchain.Subscription to new block event, to help set and reset current total difficulty of our head block.This is needed to filter out candidate best peers that are behind and therefore useless.The parameters are not currently optimised or even tried against other settings.