chore(refactor): split transactions.py:calculate_intrinsic_cost() into helper functions for maintainability#2714
Conversation
|
ty for taking a look at this. i think you can further extend this: where is |
|
Thanks for the review @felix314159 . I extended the split so the seams are now concept-pure:
So future access-list floor-token work should no longer cross the intrinsic access-list seam. |
transactions.py:calculate_intrinsic_cost() into helper functions for maintainability
|
thanks for the swift commit! there is a bit more to do:
the context of the issue you are solving is that the script |
|
this makes sense. My current changes are scoped narrow, but I see your point that the actual merge-base goal is broader. I understand the remaining work as:
am i missing anything? |
|
whether you missed something or not can only be answered after seeing the code :D but your plan looks reasonable |
…refactoring-into-helper-functions # Conflicts: # src/ethereum/forks/amsterdam/transactions.py
|
hey @felix314159 Done:
Verification:
I also checked current If you think there is a refactor that would reduce these conflicts, I’m happy to make a followup change here. |
🗒️ Description
Refactor Amsterdam transaction intrinsic-gas accounting into small neutral helper functions to reduce merge-conflict pressure in
transactions.py.This change keeps behavior unchanged and only restructures the intrinsic-cost pipeline in
src/ethereum/forks/amsterdam/transactions.py.calculate_intrinsic_cost()now delegates to helper seamsfor:
Amsterdam behavior is preserved:
A lightweight regression test file was added to cover legacy calldata, contract creation, access-list transactions, and set-code authorization gas.
🔗 Related Issues or PRs
Fixes #2708.
✅ Checklist
eest.ethereum.org/main/dev/precommit/):
just staticmessage and should start
type(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Verification run:
Cute Animal Picture