Skip to content

Commit

Permalink
fix(pool): don't log an error during validation failure in gas check
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoombs committed Nov 24, 2024
1 parent a92183b commit a5e81bd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CROSS_BASE_IMAGE

FROM ghcr.io/foundry-rs/foundry:nightly-ac802618e15039b31e464ae6d1fe3ee39f87cefd as foundry
FROM ghcr.io/foundry-rs/foundry:nightly-d14a7b44fc439407d761fccc4c1637216554bbb6 as foundry

FROM $CROSS_BASE_IMAGE
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
Expand Down
4 changes: 2 additions & 2 deletions crates/contracts/src/v0_7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const __ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE_HEX: &[u8] = include_byte
"../contracts/out/v0_7/EntryPointSimulations.sol/EntryPointSimulations_deployedBytecode.txt"
);

const __ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE: [u8; 16893] = {
const __ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE: [u8; 16494] = {
match const_hex::const_decode_to_array(__ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE_HEX) {
Ok(a) => a,
Err(_) => panic!("Failed to decode entry point simulations hex"),
Expand All @@ -263,7 +263,7 @@ const __CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE_HEX: &[u8] = include_by
"../contracts/out/v0_7/CallGasEstimationProxy.sol/CallGasEstimationProxy_deployedBytecode.txt"
);

const __CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE: [u8; 3558] = {
const __CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE: [u8; 3421] = {
match const_hex::const_decode_to_array(__CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE_HEX) {
Ok(a) => a,
Err(_) => panic!("Failed to decode call gas estimation proxy hex"),
Expand Down
5 changes: 4 additions & 1 deletion crates/pool/src/mempool/uo_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ where
tracing::error!("Failed to simulate handle op for gas limit efficiency check, failing open: {:?}", e);
}
Ok(Err(e)) => {
tracing::error!("Failed to simulate handle op for gas limit efficiency check, failing open: {:?}", e);
tracing::debug!(
"Validation error during gas limit efficiency check, failing open: {:?}",
e
);
}
Ok(Ok(execution_res)) => {
let total_gas_used: u128 = (execution_res.paid / U256::from(gas_price))
Expand Down
2 changes: 1 addition & 1 deletion crates/sim/src/estimation/v0_6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ impl CallGasEstimatorSpecialization for CallGasEstimatorSpecializationV06 {
///
/// The easiest way to get the updated value is to run this module's tests. The
/// failure will tell you the new value.
const PROXY_TARGET_OFFSET: usize = 163;
const PROXY_TARGET_OFFSET: usize = 159;

// Replaces the address of the proxy target where it appears in the proxy
// bytecode so we don't need the same fixed address every time.
Expand Down
2 changes: 1 addition & 1 deletion crates/sim/src/estimation/v0_7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ impl CallGasEstimatorSpecialization for CallGasEstimatorSpecializationV07 {
///
/// The easiest way to get the updated value is to run this module's tests. The
/// failure will tell you the new value.
const PROXY_TARGET_OFFSET: usize = 163;
const PROXY_TARGET_OFFSET: usize = 159;

// Replaces the address of the proxy target where it appears in the proxy
// bytecode so we don't need the same fixed address every time.
Expand Down

0 comments on commit a5e81bd

Please sign in to comment.