test_auth_state_charges_survive_dispatch_revert()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py::test_auth_state_charges_survive_dispatch_revert@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py::test_auth_state_charges_survive_dispatch_revert --fork Amsterdam
The state gas charged for an applied authorization stays consumed when the dispatched call reverts, because the delegation persists.
A single authorization is applied in full, then the recipient (a
plain contract) reverts immediately. Per EIP-7702 the applied
delegation survives the revert, so the state it created -- the
authority's account leaf (NEW_ACCOUNT) and delegation indicator
(AUTH_BASE) -- remains, and the state gas that paid for it must
remain consumed. Only the dispatched frame's unused budget is
returned.
A regression that refills the authorization's state gas with the
frame's rollback would refund the sender 218,790
(NEW_ACCOUNT + AUTH_BASE) or 35,190 (AUTH_BASE) gas for
state that persists; the receipt's exact gas used pins this.
The same persistence must show in the block access list: the authority carries its nonce bump and delegation-code write even though the dispatched frame reverted, while the recipient appears with no recorded changes.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_oog.py
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.