celo-org / op-geth

GNU Lesser General Public License v3.0
0 stars 0 forks source link

Unintentional hardfork introduced by pr #253 #269

Closed piersy closed 3 weeks ago

piersy commented 3 weeks ago

This commit from #253 introduced an unintentional hardfork in the alfajores network.

When syncing a new node on alfajores with that commit a different block was calculated at 26386370 (see below). This is likely because we didn't set the L1 fees to zero on alfajores see here - https://celo-alfajores.blockscout.com/address/0x4200000000000000000000000000000000000015?tab=read_proxy On alfajores:

> eth.getBlockByNumber("26386370")
{
  baseFeePerGas: "0x5d21dba00",
  blobGasUsed: "0x0",
  difficulty: "0x0",
  excessBlobGas: "0x0",
  extraData: "0x",
  gasLimit: "0x1c9c380",
  gasUsed: "0x14531",
  hash: "0xffe7637d9765d9821aacc36c344252002b0503a731df2976cc11fd22cc9e3165",
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000004000000000000000000000000080000000000000000000000000000000000000000000000000000000000010000000004000000000000000008000000000002000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000200000002000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000020000000",
  miner: "0x4200000000000000000000000000000000000011",
  mixHash: "0xb23d4f9f19f2f3c7d50de755080208b44acdd5f2b8e919e697e016898fc482cc",
  nonce: "0x0000000000000000",
  number: "0x1929fc2",
  parentBeaconBlockRoot: "0x469cd6d260b7fca8c430922c8df9cdb3405638243a7a2e96ad09b06f45fcf5c5",
  parentHash: "0x12c4d4ee9aae7c798c02c7d722bef7a626f39f6672355e411e5197f5606e203e",
  receiptsRoot: "0xad24be337a332b9c1b9d27f446cc74249e4720712fdfc82a1c55d90e1eb2a46f",
  sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  size: "0x408",
  stateRoot: "0xdb812331de17ec8862537d247b4361eddaf72a1e9d1c04351008e55c0b147173",
  timestamp: "0x66f5247a",
  totalDifficulty: "0x0",
  transactions: ["0x3297d46fe736cc2e61b7a066a7773904954ba0e8c17bc947ee02674da420008a", "0xca7b1d18736f52b5abff094c452fb6d97ba281442236c699e0862dc15fce1870"],
  transactionsRoot: "0xe508dfae1fb5c31aaac80879ba9ef3ddd82cbf4c3679fb86a50e37d0cbd49a01",
  uncles: [],
  withdrawals: [],
  withdrawalsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}
On that commit:
> eth.getBlockByNumber("26386370")
{
  baseFeePerGas: "0x5d21dba00",
  blobGasUsed: "0x0",
  difficulty: "0x0",
  excessBlobGas: "0x0",
  extraData: "0x",
  gasLimit: "0x1c9c380",
  gasUsed: "0x14531",
  hash: "0x8a7c2e8b226e65c980dc289cae950e80cbea2359d0225937204cb696812a9ed9",
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000004000000000000000000000000080000000000000000000000000000000000000000000000000000000000010000000004000000000000000008000000000002000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000200000002000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000020000000",
  miner: "0x4200000000000000000000000000000000000011",
  mixHash: "0xb23d4f9f19f2f3c7d50de755080208b44acdd5f2b8e919e697e016898fc482cc",
  nonce: "0x0000000000000000",
  number: "0x1929fc2",
  parentBeaconBlockRoot: "0x469cd6d260b7fca8c430922c8df9cdb3405638243a7a2e96ad09b06f45fcf5c5",
  parentHash: "0x12c4d4ee9aae7c798c02c7d722bef7a626f39f6672355e411e5197f5606e203e",
  receiptsRoot: "0xad24be337a332b9c1b9d27f446cc74249e4720712fdfc82a1c55d90e1eb2a46f",
  sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  size: "0x408",
  stateRoot: "0x9687679fc52155e32ba898e06d2fb4a5fa7d7779e43c1d73328eaaa1e826e62f",
  timestamp: "0x66f5247a",
  totalDifficulty: "0x0",
  transactions: ["0x3297d46fe736cc2e61b7a066a7773904954ba0e8c17bc947ee02674da420008a", "0xca7b1d18736f52b5abff094c452fb6d97ba281442236c699e0862dc15fce1870"],
  transactionsRoot: "0xe508dfae1fb5c31aaac80879ba9ef3ddd82cbf4c3679fb86a50e37d0cbd49a01",
  uncles: [],
  withdrawals: [],
  withdrawalsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}

The field that changes (apart from hash ) is stateRoot

piersy commented 3 weeks ago

Closed in favour of - https://github.com/celo-org/celo-blockchain-planning/issues/744

karlb commented 1 week ago

But https://github.com/celo-org/celo-blockchain-planning/issues/744 won't avoid the hardfork on alfajores. Should we reopen this, or is this handled in a different way?