Fix exec integration tests for Geth v1.11.0 (#3982)

## Proposed Changes

* Bump Go from 1.17 to 1.20. The latest Geth release v1.11.0 requires 1.18 minimum.
* Prevent a cache miss during payload building by using the right fee recipient. This prevents Geth v1.11.0 from building a block with 0 transactions. The payload building mechanism is overhauled in the new Geth to improve the payload every 2s, and the tests were failing because we were falling back on a `getPayload` call with no lookahead due to `get_payload_id` cache miss caused by the mismatched fee recipient. Alternatively we could hack the tests to send `proposer_preparation_data`, but I think the static fee recipient is simpler for now.
* Add support for optionally enabling Lighthouse logs in the integration tests. Enable using `cargo run --release --features logging/test_logger`. This was very useful for debugging.
This commit is contained in:
Michael Sproul 2023-02-16 23:34:33 +00:00
parent 245e922c7b
commit ebf2fec5d0
4 changed files with 11 additions and 5 deletions

View File

@ -280,7 +280,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.17'
go-version: '1.20'
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.201'

1
Cargo.lock generated
View File

@ -2463,6 +2463,7 @@ dependencies = [
"fork_choice",
"futures",
"hex",
"logging",
"reqwest",
"sensitive_url",
"serde_json",

View File

@ -21,3 +21,4 @@ deposit_contract = { path = "../../common/deposit_contract" }
reqwest = { version = "0.11.0", features = ["json"] }
hex = "0.4.2"
fork_choice = { path = "../../consensus/fork_choice" }
logging = { path = "../../common/logging" }

View File

@ -100,7 +100,7 @@ async fn import_and_unlock(http_url: SensitiveUrl, priv_keys: &[&str], password:
impl<E: GenericExecutionEngine> TestRig<E> {
pub fn new(generic_engine: E) -> Self {
let log = environment::null_logger().unwrap();
let log = logging::test_logger();
let runtime = Arc::new(
tokio::runtime::Builder::new_multi_thread()
.enable_all()
@ -281,7 +281,9 @@ impl<E: GenericExecutionEngine> TestRig<E> {
PayloadAttributes {
timestamp,
prev_randao,
suggested_fee_recipient: Address::zero(),
// To save sending proposer preparation data, just set the fee recipient
// to the fee recipient configured for EE A.
suggested_fee_recipient: Address::repeat_byte(42),
},
)
.await;
@ -330,6 +332,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
.await
.unwrap()
.execution_payload;
assert_eq!(valid_payload.transactions.len(), pending_txs.len());
/*
* Execution Engine A:
@ -394,7 +397,6 @@ impl<E: GenericExecutionEngine> TestRig<E> {
.await
.unwrap();
assert_eq!(status, PayloadStatus::Valid);
assert_eq!(valid_payload.transactions.len(), pending_txs.len());
// Verify that all submitted txs were successful
for pending_tx in pending_txs {
@ -479,7 +481,9 @@ impl<E: GenericExecutionEngine> TestRig<E> {
let payload_attributes = PayloadAttributes {
timestamp: second_payload.timestamp + 1,
prev_randao: Hash256::zero(),
suggested_fee_recipient: Address::zero(),
// To save sending proposer preparation data, just set the fee recipient
// to the fee recipient configured for EE A.
suggested_fee_recipient: Address::repeat_byte(42),
};
let slot = Slot::new(42);
let head_block_root = Hash256::repeat_byte(100);