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

STP test vectors #782

Open
3 tasks
OlivierBBB opened this issue Jun 21, 2024 · 0 comments
Open
3 tasks

STP test vectors #782

OlivierBBB opened this issue Jun 21, 2024 · 0 comments
Assignees
Labels

Comments

@OlivierBBB
Copy link
Collaborator

We need to test the STP module thoroughly. For this should test all possible combinations of the following parameters

Test dimensions

  • instruction is CALL, CALLCODE or [DELEGATECALL/STATICCALL]
    • DELEGATECALL/STATICCALL are indistinguishable from the pov of pricing AFAICT and can't transfer value
    • CALL and CALLCODE can transfer value
    • CALL can lead to the creation of an account, none of the other CALL-type instructions can
  • CALL or CALLCODE transfers value / transfers no value
  • target address exists / does not exist in the state prior to the CALL [matters only for CALL]
  • target address is warm / cold [matters for every instruction]
  • STP raises outOfGasException / does not

We further need to check the value of our computations for

  • GAS_UPFRONT
  • GAS_STIPEND column in the nonzero value case, zero value case
  • GAS_PAID_OUT_OF_POCKET if gas parameter is
    • 0
    • normal size (few thousands, say)
    • huge ~ 1<<128
    • truly huge: 1<<128, 1<<128 + 1, ~ 1<<256

Ideally we would replace our hand made computations with Besu stuff ...

Test scenarios

This leads to

  • CALL: 2 * 2 * 2 * 2 = 16 possible STP scenarios
  • CALLCODE: 8 possible STP scenarios
  • DELEGATECALL/STATICCALL: 4 possible STP scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants