test_delegation_persists_on_execution_oog()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py::test_delegation_persists_on_execution_oog@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py::test_delegation_persists_on_execution_oog --fork Amsterdam
Once the top-frame preparation completes, an out-of-gas in the dispatched call does NOT roll the applied delegations back.
Two valid authorizations on third-party authorities are paid in
full and the recipient (a plain contract, so it adds no top-frame
charge) is dispatched with only enough execution budget for a single
opcode. The recipient runs that opcode and then runs out of gas on
the next, so the frame halts during execution and consumes the full
gas_limit.
The execution snapshot is taken after preparation, so the applied delegations survive the halt -- matching the EIP-7702 "dispatch reverts, delegation remains" rule -- while the recipient is unchanged.
With value set, the transfer to the recipient happens inside
the execution snapshot, so the halt that keeps the delegations in
place reverses the transfer: the recipient stays at balance zero
and the sender pays only the gas.
The block access list mirrors this split: both authorities carry their persisted nonce bump and delegation-code write, while the recipient -- accessed for dispatch but whose (reverted) value transfer leaves no net change -- appears with no recorded changes.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py
974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.