Skip to content

Commit

Permalink
Make linea_estimateGas to simulate tx on pending block
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 committed Dec 6, 2024
1 parent b20d27c commit d8ab71d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
releaseVersion=0.8.0-rc6.1
besuVersion=24.11-delivery39
besuVersion=24.12-develop-cf50479
arithmetizationVersion=0.8.0-rc6
besuArtifactGroup=io.consensys.linea-besu
distributionIdentifier=linea-sequencer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,9 @@ private Long estimateGasUsed(
final var zkTracer = createZkTracer(chainHeadHeader, blockchainService.getChainId().get());
final TracerAggregator zkAndGasTracer = TracerAggregator.create(estimateGasTracer, zkTracer);

final var chainHeadHash = chainHeadHeader.getBlockHash();
final var maybeSimulationResults =
transactionSimulationService.simulate(
transaction, maybeStateOverrides, chainHeadHash, zkAndGasTracer, false);
transaction, maybeStateOverrides, Optional.empty(), zkAndGasTracer, false);

ModuleLimitsValidationResult moduleLimit =
moduleLineCountValidator.validate(zkTracer.getModulesLineCount());
Expand Down Expand Up @@ -328,7 +327,7 @@ private Long estimateGasUsed(
transactionSimulationService.simulate(
createTransactionForSimulation(callParameters, lowGasEstimation),
maybeStateOverrides,
chainHeadHash,
Optional.empty(),
estimateGasTracer,
true);

Expand Down Expand Up @@ -364,7 +363,7 @@ private Long estimateGasUsed(
transactionSimulationService.simulate(
createTransactionForSimulation(callParameters, mid),
maybeStateOverrides,
chainHeadHash,
Optional.empty(),
estimateGasTracer,
true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ public Optional<String> validateTransaction(

final var zkTracer = createZkTracer(chainHeadHeader, blockchainService.getChainId().get());
final var maybeSimulationResults =
transactionSimulationService.simulate(
transaction, chainHeadHeader.getBlockHash(), zkTracer, true);
transactionSimulationService.simulate(transaction, Optional.empty(), zkTracer, true);

ModuleLimitsValidationResult moduleLimitResult =
moduleLineCountValidator.validate(zkTracer.getModulesLineCount());
Expand Down

0 comments on commit d8ab71d

Please sign in to comment.