Interface TransactionSimulationService
- All Superinterfaces:
BesuService
Transaction simulation service interface
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnumeration of simulation parameters that control validation behavior during transaction simulation. -
Method Summary
Modifier and TypeMethodDescriptionsimulate(org.hyperledger.besu.datatypes.CallParameter callParameters, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, ProcessableBlockHeader processableBlockHeader, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, EnumSet<TransactionSimulationService.SimulationParameters> simulationParameters) Simulate transaction (specified by call parameters) execution at the block identified by the block header, with optional state overrides that can be applied before the simulation.default Optional<TransactionSimulationResult> simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, org.hyperledger.besu.datatypes.Hash blockHash, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, boolean isAllowExceedingBalance) Deprecated, for removal: This API element is subject to removal in a future version.simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, org.hyperledger.besu.datatypes.Hash blockHash, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, EnumSet<TransactionSimulationService.SimulationParameters> simulationParameters) Simulate transaction execution at the block identified by the hash, with optional state overrides that can be applied before the simulation.default Optional<TransactionSimulationResult> simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, ProcessableBlockHeader processableBlockHeader, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, boolean isAllowExceedingBalance, boolean isAllowFutureNonce) Deprecated, for removal: This API element is subject to removal in a future version.simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, ProcessableBlockHeader processableBlockHeader, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, EnumSet<TransactionSimulationService.SimulationParameters> simulationParameters) Simulate transaction execution at the block identified by the block header, with optional state overrides that can be applied before the simulation.Return a simulation of what could be current pending block, it can also be passed tosimulate(Transaction, Optional, ProcessableBlockHeader, OperationTracer, boolean, boolean)
-
Method Details
-
simulatePendingBlockHeader
ProcessableBlockHeader simulatePendingBlockHeader()Return a simulation of what could be current pending block, it can also be passed tosimulate(Transaction, Optional, ProcessableBlockHeader, OperationTracer, boolean, boolean)- Returns:
- the simulated pending block header
-
simulate
@Deprecated(forRemoval=true) default Optional<TransactionSimulationResult> simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, org.hyperledger.besu.datatypes.Hash blockHash, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, boolean isAllowExceedingBalance) Deprecated, for removal: This API element is subject to removal in a future version.Simulate transaction execution at the block identified by the hash, with optional state overrides that can be applied before the simulation.- Parameters:
transaction- txstateOverrides- state overrides to apply to this simulationblockHash- hash of the blockoperationTracer- the tracerisAllowExceedingBalance- should ignore the sender balance during the simulation?- Returns:
- the result of the simulation
-
simulate
Optional<TransactionSimulationResult> simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, org.hyperledger.besu.datatypes.Hash blockHash, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, EnumSet<TransactionSimulationService.SimulationParameters> simulationParameters) Simulate transaction execution at the block identified by the hash, with optional state overrides that can be applied before the simulation.- Parameters:
transaction- txstateOverrides- state overrides to apply to this simulationblockHash- hash of the blockoperationTracer- the tracersimulationParameters- optional set of parameters that affected the behavior of the simulation- Returns:
- the result of the simulation
-
simulate
@Deprecated(forRemoval=true) default Optional<TransactionSimulationResult> simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, ProcessableBlockHeader processableBlockHeader, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, boolean isAllowExceedingBalance, boolean isAllowFutureNonce) Deprecated, for removal: This API element is subject to removal in a future version.Simulate transaction execution at the block identified by the block header, with optional state overrides that can be applied before the simulation.- Parameters:
transaction- txstateOverrides- state overrides to apply to this simulationprocessableBlockHeader- block header to simulate on pending blockoperationTracer- the tracerisAllowExceedingBalance- should ignore the sender balance during the simulation?isAllowFutureNonce- should skip strict check on sequential nonce?- Returns:
- the result of the simulation
-
simulate
Optional<TransactionSimulationResult> simulate(org.hyperledger.besu.datatypes.Transaction transaction, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, ProcessableBlockHeader processableBlockHeader, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, EnumSet<TransactionSimulationService.SimulationParameters> simulationParameters) Simulate transaction execution at the block identified by the block header, with optional state overrides that can be applied before the simulation.- Parameters:
transaction- txstateOverrides- state overrides to apply to this simulationprocessableBlockHeader- block header to simulate on pending blockoperationTracer- the tracersimulationParameters- optional set of parameters that affected the behavior of the simulation- Returns:
- the result of the simulation
-
simulate
Optional<TransactionSimulationResult> simulate(org.hyperledger.besu.datatypes.CallParameter callParameters, Optional<org.hyperledger.besu.datatypes.StateOverrideMap> stateOverrides, ProcessableBlockHeader processableBlockHeader, org.hyperledger.besu.evm.tracing.OperationTracer operationTracer, EnumSet<TransactionSimulationService.SimulationParameters> simulationParameters) Simulate transaction (specified by call parameters) execution at the block identified by the block header, with optional state overrides that can be applied before the simulation.- Parameters:
callParameters- call parametersstateOverrides- state overrides to apply to this simulationprocessableBlockHeader- block header to simulateoperationTracer- the tracersimulationParameters- optional set of parameters that affected the behavior of the simulation- Returns:
- the result of the simulation
-