5

I'm trying to download full data of ethereum block chain. But when I check the result, I found an error. From block 1 to 46146, field tx is empty,it means that there is no data for transaction.

Does anyone have same issue and know the reason for that? Thanks.

5

Summary

You have not encountered an error in your copy of the blockchain.

As you have observed, there are no transactions in the blocks 1 to 46,146. This was the first 7.5 days of the Ethereum blockchain. Part (or all) of this period is the thawing period, where security through mining is built-up but no transactions are allowed (Thanks @tayvano).



The Details

Here is a script to check the number of transactions between a starting block number and an ending block number:

function checkTransactionCount(startBlockNumber, endBlockNumber) {
  console.log("Searching for non-zero transaction counts between blocks "  + startBlockNumber + " and " + endBlockNumber);

  for (var i = startBlockNumber; i <= endBlockNumber; i++) {
    var block = eth.getBlock(i);
    if (block != null) {
      if (block.transactions != null && block.transactions.length != 0) {
        console.log("Block #" + i + " has " + block.transactions.length + " transactions")
      }
    }
  }
}

Running the scripts for blocks 1 to 46146 shows the following results - there are no transactions!:

> checkTransactionCount(1, 46146)
Searching for non-zero transaction counts between blocks 1 and 46146
undefined

Let's check that the script is working as expected:

> eth.blockNumber
1382234
> checkTransactionCount(1382224, 1382234)
Searching for non-zero transaction counts between blocks 1382224 and 1382234
Block #1382224 has 4 transactions
Block #1382225 has 2 transactions
Block #1382226 has 4 transactions
Block #1382227 has 6 transactions
Block #1382228 has 17 transactions
Block #1382231 has 2 transactions
Block #1382234 has 1 transactions
undefined

There are some transaction included in 46147 to 46200:

> checkTransactionCount(46147, 46200)
Searching for non-zero transaction counts between blocks 46147 and 46200
Block #46147 has 1 transactions
Block #46169 has 1 transactions
Block #46170 has 1 transactions
Block #46194 has 1 transactions
undefined

Let's check the time between blocks 1 and 46146:

> eth.getBlock(1)
...
  timestamp: 1438269988,
...
> eth.getBlock(46146)
...
  timestamp: 1438918224,
...

So there are 648,236 seconds between the block range 1 to 46146, which is 10,803 minutes, or 180 hours, or 7.5 days.

This must have been the initial burn in period. Edit 23/04/2016 - Part (or all) of this period is the thawing period to build up security through mining, but no transactions allowed (Thanks @tayvano).

  • What's a burn in period? – tayvano Apr 22 '16 at 14:15
  • Here's the Wikipedia reference - en.wikipedia.org/wiki/Burn-in . This is the initial period when I would run my hardware or software under stricter observation before using it in full production mode. It's just my guess as this is what I would do. Do you (or anyone else) know why there is a 7.5 day delay before transactions are executed on the blockchain? I would be interested to know why. – Bokky WeAreAllAssange PooBah Apr 22 '16 at 14:26
  • 1
    Just found this which refers to "thawing" where mining is allowed but transactions are not allow. Used to build up network security. No word on time though. github.com/ethereum/go-ethereum/wiki/Frontier – tayvano Apr 22 '16 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.