Closed
Description
I'm encountering a problem. I want to build a private Ethereum blockchain. So I create a file, named genesis.json
:
{
"alloc": {},
"coinbase": "0x0000000000000000000000000000000000000000",
"difficulty": "0x2000",
"extraData": "Inplus Genesis Block",
"gasLimit": "0xffffffff",
"nonce": "0x0000000000000042",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00"
}
Note that gas limit is set the max value 0xffffffff, equals with 4294967295 in dec. But when I deploy a huge contract, which needs about 3864853195 gas, I get an error that Exceeds block gas limit undefined
. It makes me strange that 3864853195 is absolutely less than 4294967295, but why I get this error.
Please tell me how to solve it. Thank you.
Activity
karalabe commentedon Mar 8, 2017
While mining, the miner can choose to push the gas limit up by a bit, or to bring it down by a bit. The default behavior is that if blocks are full, the limit is pushed up, whereas it blocks are empty, the limit is pushed downwards towards a baseline. This baseline by default is 4.7M. You can change it with
--targetgaslimit
when starting your miner.ShawnyXiao commentedon Mar 9, 2017
Thank you. I have solved it. ^^