I've got a private network that's using the clique consensus protocol and is running using Geth (if that's relevant).
I have been confused about gas and transaction fees, so wrote a script to look at how the fees change given the [gas] size of the previous block. I ran my script on the Rinkeby network to try it out, and what I saw aligns with what I expected. (If the block is >100% of the target size, I expect the baseFeePerGas
to increase; if it's <100% I expect baseFeePerGas
to decrease.)
However, when I run the same script on my private network, the baseFeePerGas
property is missing from every block. Given that my network and Rinkeby use the same protocol, is it unreasonable of me to expect the same properties on blocks?
Currently my network is completely suboptimal in that it only has one miner. Could this be why baseFeePerGas
is missing?
UPDATE:
Geth version is 1.10.16-stable-20356e57
.
My genesis.json
is:
{
"config": {
"chainId": 21456,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"clique": {
"period": 600,
"epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x5eccf14a",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f1bfa564d354a59ca9c71e606c8f19eae19d52cb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "1000000000",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0000000000000000000000000000000000000000": {
"balance": "0x1"
},
"0000000000000000000000000000000000000001": {
"balance": "0x1"
},
"0000000000000000000000000000000000000002": {
"balance": "0x1"
},
...252 others...
"00000000000000000000000000000000000000ff": {
"balance": "0x1"
},
"000211184408e571bdb4fd96f1815f515e7b2a03": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
},
"1081d21e1e6bcb3e71bcf025305e80f68e45351d": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
},
"702e36767e3c5298c91160c5716ea0d9c807a881": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
},
"793c20626b11a569460186e803a32391bc759ff9": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
},
"f1bfa564d354a59ca9c71e606c8f19eae19d52cb": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
I've trimmed it to get rid of an excessive number of accounts.
baseFeePerGas
was introduced in EIP-1559 at the London hard fork. You've to upgrade the blockchain adding LondonBlock to the configuration.