4

When querying the genesis block via the RPC-API (of geth), no transactions are returned by eth_getBlockByNumber.

eth_getTransactionByBlockNumberAndIndex similar fails to return any information.

I have had a look at how various Ethereum explorers handle the genesis block, but they all exhibit errors and discrepancies when looking up the genesis transactions, which makes it looks like they "manually" injected the relevant data into their respective DB, and things do not perfectly "click" with the rest of the blockchain data.

So is there an API to obtain the genesis transactions, or is this something that has to be obtained from another source? (if yes, then which?)

edit: yes, the genesis JSON can be imported, but the idea here is to have an API that takes data from the blockchain, rather than from another external source which would have to be validated/obtained independently (I am thinking of clones and private chains here)

2
  • Do you mean you would like to know how to verify the "alloc" in the genesis block using RPC?
    – eth
    Mar 10, 2016 at 14:47
  • Yes, I would like to be able to access the blockchain data using RPC, rather than having to rely on external data (source code, provided json, etc.), since the data has to be in the blockchain somehow, it looks a bit "untrusty" to have to involve external data and code (and even if it can be justified/explained, accessing blockchain data is not something that should have to be justified)
    – fair glu
    Mar 11, 2016 at 14:10

2 Answers 2

5

The genesis block doesn't contain any transactions. It couldn't actually, since it doesn't have a prior state to operate on.

2
  • 2
    Couldn't it just report them as transfers with no origin? Or even use another custom format? Or is there another way to obtain the initial state from the blockchain / wallet (rather than source code or external references, which become problematic in terms of trust)
    – fair glu
    Mar 11, 2016 at 14:07
  • The exact format is not too relevant, but being able to access that blockchain data using official binary is very much relevant to trust. Alternative means can be justified/explained, but that will always look fishy... especially for clones and private chains, where trust and verification are going to be far more.. ethereal (think hidden premines, doctored checks, etc)
    – fair glu
    Mar 11, 2016 at 14:15
1

No unfortunatly not. BUT you can use the genesis_block.json in the official ethereum repository AND hash it to verify it.

Here you Go:

https://github.com/ethereum/pyethsaletool/blob/master/genesis_block.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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