chore: bump alloy 0.8.1 (#13418)

This commit is contained in:
Matthias Seitz
2024-12-16 21:33:17 +01:00
committed by GitHub
parent 82f21a3e39
commit 952eeae2a1
7 changed files with 107 additions and 100 deletions

View File

@ -169,19 +169,21 @@ impl From<EthBuiltPayload> for ExecutionPayloadEnvelopeV4 {
let EthBuiltPayload { block, fees, sidecars, requests, .. } = value;
Self {
execution_payload: block_to_payload_v3(Arc::unwrap_or_clone(block)),
block_value: fees,
// From the engine API spec:
//
// > Client software **MAY** use any heuristics to decide whether to set
// `shouldOverrideBuilder` flag or not. If client software does not implement any
// heuristic this flag **SHOULD** be set to `false`.
//
// Spec:
// <https://github.com/ethereum/execution-apis/blob/fe8e13c288c592ec154ce25c534e26cb7ce0530d/src/engine/cancun.md#specification-2>
should_override_builder: false,
blobs_bundle: sidecars.into_iter().map(Into::into).collect::<Vec<_>>().into(),
execution_requests: requests.unwrap_or_default().take(),
envelope_inner: ExecutionPayloadEnvelopeV3 {
execution_payload: block_to_payload_v3(Arc::unwrap_or_clone(block)),
block_value: fees,
// From the engine API spec:
//
// > Client software **MAY** use any heuristics to decide whether to set
// `shouldOverrideBuilder` flag or not. If client software does not implement any
// heuristic this flag **SHOULD** be set to `false`.
//
// Spec:
// <https://github.com/ethereum/execution-apis/blob/fe8e13c288c592ec154ce25c534e26cb7ce0530d/src/engine/cancun.md#specification-2>
should_override_builder: false,
blobs_bundle: sidecars.into_iter().map(Into::into).collect::<Vec<_>>().into(),
},
execution_requests: requests.unwrap_or_default(),
}
}
}

View File

@ -56,7 +56,7 @@ alloy-signer.workspace = true
alloy-eips.workspace = true
alloy-sol-types.workspace = true
alloy-contract.workspace = true
alloy-rpc-types-beacon.workspace = true
alloy-rpc-types-beacon = { workspace = true, features = ["ssz"] }
alloy-rpc-types-engine.workspace = true
alloy-rpc-types-eth.workspace = true

View File

@ -239,7 +239,11 @@ async fn test_flashbots_validate_v4() -> eyre::Result<()> {
},
execution_payload: block_to_payload_v3(payload.block().clone()),
blobs_bundle: BlobsBundleV1::new([]),
execution_requests: payload.requests().unwrap_or_default().to_vec(),
execution_requests: payload
.requests()
.map(|reqs| alloy_rpc_types_beacon::requests::ExecutionRequestsV4::try_from(&reqs))
.unwrap()
.unwrap(),
target_blobs_per_block: eip4844::TARGET_BLOBS_PER_BLOCK,
signature: Default::default(),
},