Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/1.0' into elmato/merge-c…
Browse files Browse the repository at this point in the history
…hange-gas-cap-estimator-to-master
  • Loading branch information
elmato committed Aug 2, 2024
2 parents 5619ecf + 4b28334 commit 1ec4908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion silkworm/silkrpc/core/estimate_gas_oracle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
namespace silkworm::rpc {

const std::uint64_t kTxGas = 21'000;
const std::uint64_t kGasCap = 25'000'000;
const std::uint64_t kGasCap = 100'000'000;

using BlockHeaderProvider = std::function<boost::asio::awaitable<silkworm::BlockHeader>(uint64_t)>;
using AccountReader = std::function<boost::asio::awaitable<std::optional<silkworm::Account>>(const evmc::address&, uint64_t)>;
Expand Down
2 changes: 1 addition & 1 deletion silkworm/silkrpc/core/estimate_gas_oracle_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ TEST_CASE("estimate gas") {
SECTION("Call gas above allowance, always succeeds, gas capped") {
ExecutionResult expect_result_ok{.error_code = evmc_status_code::EVMC_SUCCESS};
call.gas = kGasCap * 2;
EXPECT_CALL(estimate_gas_oracle, try_execution(_, _, _, _, _)).Times(24).WillRepeatedly(Return(expect_result_ok));
EXPECT_CALL(estimate_gas_oracle, try_execution(_, _, _, _, _)).Times(26).WillRepeatedly(Return(expect_result_ok));
auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future);
const intx::uint256& estimate_gas = result.get();

Expand Down

0 comments on commit 1ec4908

Please sign in to comment.