go-ethereum/core
Arran Schlosberg bedfd12e2d
feat: RulesHooks.MinimumGasConsumption (#185)
## Why this should be merged

Required for
[ACP-194](https://github.com/avalanche-foundation/ACPs/tree/main/ACPs/194-streaming-asynchronous-execution#gas-charged)
$\lambda$ bound on gas consumption.

## How this works

Hook into `core.StateTransition.TransitionDb()` as this is the bottom of
all execution paths (e.g. `core.ApplyTransaction()` as used in SAE,
`core.StateProcessor.Process(*Block,...)`, etc.). Once consumed gas is
no longer changing (i.e. after all spends and refunds), the transaction
limit is passed to the hook to determine the minimum consumption, which
is applied.

## How this was tested

Unit test via `core.ApplyTransaction()` as this is our entry point in
SAE.

---------

Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
2025-06-11 18:22:33 +00:00
..
asm [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
bloombits [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
forkid [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
rawdb doc(core/rawdb): fix outdated comment (#134) 2025-02-12 17:41:41 +00:00
state core/state/snapshot: add a missing lock (#30001) 2025-06-10 15:08:40 +01:00
txpool [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
types feat(core/types): export rlpHash() (#174) 2025-03-27 16:32:41 +01:00
vm refactor(core/vm): expose clearing of registered hooks in tests (#181) 2025-04-16 14:05:45 +01:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
block_validator.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
block_validator_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blockchain.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blockchain_insert.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blockchain_reader.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blockchain_repair_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blockchain_sethead_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blockchain_snapshot_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blockchain_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
blocks.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
bloom_indexer.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
chain_indexer.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
chain_indexer_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
chain_makers.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
chain_makers_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
dao_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
error.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
events.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
evm.go Merge branch 'auto-rename-module_source-2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1_workflow-c1fc594f020d23958b641a4e5a856b6e52c49d3bece94b95594864db16c1b0fc-main' into arr4n/rename-module 2024-10-17 13:07:28 +11:00
forkchoice.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
gaspool.go core, miner: revert block gas counter in case of invalid transaction (#26799) 2023-03-07 05:23:52 -05:00
gen_genesis.go refactor: generate internal Header.encodeRLP() for override (#86) 2024-12-11 10:20:58 +00:00
genesis.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
genesis_alloc.go cmd, core, params: add support for the Holesky testnet (#28007) 2023-08-25 18:11:40 +03:00
genesis_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
headerchain.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
headerchain_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
mkalloc.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
rlp_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
sender_cacher.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state_prefetcher.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state_processor.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state_processor_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state_transition.go feat: RulesHooks.MinimumGasConsumption (#185) 2025-06-11 18:22:33 +00:00
state_transition.libevm.go feat: RulesHooks.MinimumGasConsumption (#185) 2025-06-11 18:22:33 +00:00
state_transition.libevm_test.go feat: RulesHooks.MinimumGasConsumption (#185) 2025-06-11 18:22:33 +00:00
txindexer.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
txindexer_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
types.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00