Add BeaconChainHarness tests for The Merge (#2661)

* Start adding merge tests

* Expose MockExecutionLayer

* Add mock_execution_layer to BeaconChainHarness

* Progress with merge test

* Return more detailed errors with gas limit issues

* Use a better gas limit in block gen

* Ensure TTD is met in block gen

* Fix basic_merge tests

* Start geth testing

* Fix conflicts after rebase

* Remove geth tests

* Improve merge test

* Address clippy lints

* Make pow block gen a pure function

* Add working new test, breaking existing test

* Fix test names

* Add should_panic

* Don't run merge tests in debug

* Detect a tokio runtime when starting MockServer

* Fix clippy lint, include merge tests
This commit is contained in:
Paul Hauner
2021-10-02 11:39:11 +10:00
parent 801f6f7425
commit a1033a9247
14 changed files with 642 additions and 249 deletions

View File

@@ -73,6 +73,18 @@ pub enum BlockProcessingError {
used: u64,
limit: u64,
},
ExecutionInvalidGasLimitIncrease {
limit: u64,
parent_limit: u64,
},
ExecutionInvalidGasLimitDecrease {
limit: u64,
parent_limit: u64,
},
ExecutionInvalidGasLimitTooSmall {
limit: u64,
min: u64,
},
ExecutionInvalidTimestamp {
expected: u64,
found: u64,