Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comprehensive unit testing of LFVM operations #751

Open
1 task done
HerbertJordan opened this issue Sep 10, 2024 · 6 comments
Open
1 task done

Comprehensive unit testing of LFVM operations #751

HerbertJordan opened this issue Sep 10, 2024 · 6 comments
Assignees

Comments

@HerbertJordan
Copy link
Collaborator

HerbertJordan commented Sep 10, 2024

This task focuses on testing properties of VM instructions, in particular code in instructions.go and super_instructions.go

Common properties to opcodes are:

  • minimum required version
  • static mode violation
  • dynamic cost computation, leading to out of gas or overflow
  • context calls are issued.

Properties common to certain ops are:

  • JUMPDEST check for any jump operation (except for JUMP_TO)
    • TestInstructions_JumpInstructionsCheckJUMPDEST
  • EIP-2929 COLD/WARM dynamic cost introduced in Berlin
    • SLOAD,
    • SSTORE
    • *CALL,
    • BALANCE,
    • EXT*
    • SELFDESTRUCT
  • Memory operations
    ...
@HerbertJordan HerbertJordan added this to the Release Ready LFVM milestone Sep 10, 2024
@LuisPH3
Copy link
Contributor

LuisPH3 commented Sep 11, 2024

Attempt to refactor existing end-to-end test #753

@LuisPH3
Copy link
Contributor

LuisPH3 commented Sep 21, 2024

  • minimum required version
  • static mode violation
  • dynamic cost
  • context calls are issued.

@LuisPH3
Copy link
Contributor

LuisPH3 commented Sep 21, 2024

note: opSwap2_Swap1_Pop_Jump never checked for jumpdest and is never tested for it.

@facuMH
Copy link
Contributor

facuMH commented Oct 7, 2024

After the merge of #837 #839 #841 #838 there should be still need to test specific branches of

  • Calldataload
  • opExp
  • opExtcodehash
  • opExtCodeCopy
  • returndatacopy

@facuMH
Copy link
Contributor

facuMH commented Oct 7, 2024

  • opLog also needs a test for memory expansion

@LuisPH3
Copy link
Contributor

LuisPH3 commented Oct 9, 2024

Regarding context calls, It would be interesting not only to test that calls are issued, but that the arguments passed to external context calls are correct as well:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants