diff --git a/Cargo.lock b/Cargo.lock index ce55e2bb..488a23a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11017,8 +11017,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[patch.unused]] -name = "libffi-sys" -version = "2.3.0" -source = "git+https://github.com/tov/libffi-rs?rev=d0704d634b6f3ffef5b6fc7e07fe965a1cff5c7b#d0704d634b6f3ffef5b6fc7e07fe965a1cff5c7b" diff --git a/Cargo.toml b/Cargo.toml index ee9f909c..efaef28b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,13 @@ reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.8" } reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.8" } reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.8" } -alloy = { version = "0.4.2", features = ["consensus", "eips", "signers", "signer-local", "signer-mnemonic"] } +alloy = { version = "0.4.2", features = [ + "consensus", + "eips", + "signers", + "signer-local", + "signer-mnemonic", +] } futures = "0.3.21" tokio = "1.0" @@ -62,6 +68,3 @@ sha2 = "0.10.8" rand = "0.8.5" clap = "4.1.4" - -[patch.crates-io] -libffi-sys = { git = "https://github.com/tov/libffi-rs", rev = "d0704d634b6f3ffef5b6fc7e07fe965a1cff5c7b" } diff --git a/flake.lock b/flake.lock index 0018480f..2b18356c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1727316705, - "narHash": "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=", + "lastModified": 1729273024, + "narHash": "sha256-Mb5SemVsootkn4Q2IiY0rr9vrXdCCpQ9HnZeD/J3uXs=", "owner": "ipetkov", "repo": "crane", - "rev": "5b03654ce046b5167e7b0bccbd8244cb56c16f0e", + "rev": "fa8b7445ddadc37850ed222718ca86622be01967", "type": "github" }, "original": { @@ -34,11 +34,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727716680, - "narHash": "sha256-uMVkVHL4r3QmlZ1JM+UoJwxqa46cgHnIfqGzVlw5ca4=", + "lastModified": 1729658218, + "narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b5b22b42c0d10c7d2463e90a546c394711e3a724", + "rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a", "type": "github" }, "original": { @@ -63,11 +63,11 @@ ] }, "locked": { - "lastModified": 1727749966, - "narHash": "sha256-DUS8ehzqB1DQzfZ4bRXVSollJhu+y7cvh1DJ9mbWebE=", + "lastModified": 1729650555, + "narHash": "sha256-j8Sohst1TbQM6LqQKa/HRMfzsUwMhosuNMj2uOn9JOA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "00decf1b4f9886d25030b9ee4aed7bfddccb5f66", + "rev": "10c5eb61aaa32caddb9ecf0362a6eb9daeb08eab", "type": "github" }, "original": { diff --git a/mev-build-rs/src/payload/builder.rs b/mev-build-rs/src/payload/builder.rs index d4333c1e..c819f6a3 100644 --- a/mev-build-rs/src/payload/builder.rs +++ b/mev-build-rs/src/payload/builder.rs @@ -139,7 +139,7 @@ fn append_payment( tx_env, ); // NOTE: adjust gas limit to allow for payment transaction - env.block.gas_limit += U256::from(BASE_TX_GAS_LIMIT); + env.block.gas_limit += U256::from(gas_limit); let mut evm = revm::Evm::builder().with_db(&mut db).with_env_with_handler_cfg(env).build(); let ResultAndState { result, state } = @@ -258,13 +258,13 @@ impl PayloadBuilder { proposal_attributes.proposer_gas_limit, payload_config.parent_block.gas_limit, ); - // NOTE: reserve enough gas for the final payment transaction - block_env.gas_limit = U256::from(gas_limit) - U256::from(BASE_TX_GAS_LIMIT); - - block_env.coinbase = proposal_attributes.proposer_fee_recipient; - } else { - block_env.coinbase = self.0.fee_recipient; + // NOTE: reserve enough gas for the final payment transaction, + // regardless of EOA or smart contract + // TODO: check recipient ahead of time to determine this here, rather than leave some + // gas on the table + block_env.gas_limit = U256::from(gas_limit) - U256::from(PAYMENT_TO_CONTRACT_GAS_LIMIT); } + block_env.coinbase = self.0.fee_recipient; (cfg_env, block_env) }