Commit Graph

7 Commits

Author SHA1 Message Date
Martin Holst Swende
08f6a2a89d
cmd/evm: update readmes for the tests (#26841) 2023-03-09 07:06:47 -05:00
lightclient
fbdeff99ce
cmd/evm: calc base fee if parent data is present (#26051)
Currently, in order to chain together sequential valid t8n transitions the caller must manually calculate the block base fee. This PR adds support for the necessary parent fee market data to calculate the base fee for the current transition.

Concretely, env is extended to accept the following:

    parentBaseFee
    parentGasUsed
    parentGasLimit

Example usage can be found in ./cmd/evm/testdata/25.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-10-28 12:25:37 +02:00
lightclient
fa96718512
cmd/evm: rename t8n result to match types.Header (ReceiptRoot->ReceiptsRoot) (#23924) 2021-11-17 13:50:08 +01:00
lightclient
b0b708bf23
cmd/evm: add gasUsed to t8n result (#23919)
* cmd/evm: add gas used accumulator to t8n result

* cmd/evm: update t8n tests to include gas used field
2021-11-16 08:43:58 +01:00
Martin Holst Swende
32150f8aa9
cmd/geth, cmd/evm, params: implement Arrow Glacier (EIP 4345) (#23810)
This PR adds support for ArrowGlacier, as defined by

    https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md
    https://eips.ethereum.org/EIPS/eip-4345

> Starting with FORK_BLOCK_NUMBER the client will calculate the difficulty based on a fake block number suggesting to the client that the difficulty bomb is adjusting 10,700,000 blocks later than the actual block number.

This also adds support for evm t8n to return the calculated difficulty, so it can be used to construct test.
2021-10-28 22:18:14 +02:00
Martin Holst Swende
4d88974864
cmd/evm: add tests for evm t8n (#23507) 2021-09-02 09:22:43 +02:00
Martin Holst Swende
84c51bc5ec
cmd/evm: add difficulty calculation to t8n tool (#23353)
This PR adds functionality to the evm t8n to calculate ethash difficulty. If the caller does not provide a currentDifficulty, but instead provides the parentTimestamp (well, semi-optional, will default to 0 if not given), and parentDifficulty, we can calculate it for him.

The caller can also provide a parentUncleHash. In most, but not all cases, the parent uncle hash also affects the formula. If no such hash is provided (or, if the empty all-zero hash is provided), it's assumed that there were no uncles.
2021-08-25 15:04:26 +02:00