Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions src/ethereum/forks/monad_next/fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,21 +1009,15 @@ def process_transaction(
# gas_refund_amount = tx_gas_left * effective_gas_price

# For non-1559 transactions effective_gas_price == tx.gas_price
# NOTE: commented out, see MIP-11 shim below
# TODO: uncomment and adjust after MIP-11 lands here
# priority_fee_per_gas = effective_gas_price - block_env.base_fee_per_gas
# transaction_fee = tx.gas * priority_fee_per_gas
priority_fee_per_gas = effective_gas_price - block_env.base_fee_per_gas
transaction_fee = tx.gas * priority_fee_per_gas

# Monad: gas is not refunded to the sender (note absence of
# create_ether(tx_state, sender, U256(gas_refund_amount)) here).
add_sender_authority(block_env.state, block_env.number, sender)

# MIP-11 shim: priority fees are routed to the staking distribution
# address and paid out to the proposer's validator and delegators. In
# tests no proposer is wired up, so distribution finds an unknown
# validator and the fees are burned rather than credited to the
# coinbase. Burn them here so post-state roots match a client that
# implements MIP-11 fully.
# transfer miner fees
create_ether(tx_state, block_env.coinbase, U256(transaction_fee))

for address in tx_output.accounts_to_delete:
destroy_account(tx_state, address)
Expand Down
5 changes: 2 additions & 3 deletions tests/monad_eight/reserve_balance/test_transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Op,
Transaction,
)
from execution_testing.forks import MONAD_EIGHT, MONAD_NEXT
from execution_testing.forks import MONAD_EIGHT
from execution_testing.forks.helpers import Fork
from execution_testing.test_types.helpers import compute_create_address
from execution_testing.tools.tools_code.generators import Initcode
Expand Down Expand Up @@ -1152,8 +1152,7 @@ def test_credit_with_transaction_fee(
gas_price = 10
base_fee_per_gas = 7
priority_gas_price = gas_price - base_fee_per_gas
# MIP-11 burns priority fees rather than crediting the coinbase.
reward = 0 if fork >= MONAD_NEXT else gas_limit * priority_gas_price
reward = gas_limit * priority_gas_price

tx_1 = Transaction(
gas_limit=gas_limit,
Expand Down