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

EIP7702 Test Ideas #952

Open
19 of 22 tasks
winsvega opened this issue Nov 14, 2024 · 3 comments
Open
19 of 22 tasks

EIP7702 Test Ideas #952

winsvega opened this issue Nov 14, 2024 · 3 comments
Assignees
Labels
fork:prague Prague hardfork needs-discussion Needs discussion before proceeding type:test Type: Test

Comments

@winsvega
Copy link
Collaborator

winsvega commented Nov 14, 2024

7702 thoughts:

  • pointer to contract to pointer to contract loop
  • pointer to pointer
  • push pointer bytes to memory and try to create/create2/tx deploy (btw push eof bytes and create?)
    -- attempt to create fails, no contract is created
  • normal tx do not interact with pointers?
    -- Other normal tx can interact with previously assigned pointers
  • context opcodes, ext context opcodes logic when dealing with pointer account
    -- Balance and storage is of a pointer account, the rest seems to be of a target
  • pointer to precompile/sys
  • pointer to eof
  • access list interactions (check the disconunt of hot addresses if its in the accesslist or not + if set as a pointer)
  • if I call pointer -> contract, set/load storage x. then in the same tx, call contract directly. will it be hot call price? will storage load in contract be hot or cold?
  • pointer to static, check static context activated
  • static call to pointer to contract check static context is active
  • same as above but with reentry to first contract
  • contract with storage calls pointer to some contract, check storage modifications. Check tstore modificstions.
  • same as above but with reentry check storage/tstorage and no loop (reentry stops)
  • check if pointer calls the actual contract too, what happens to storage/tstorage
  • check reverts of account data when used multiple pointers and accounts had storages, created new, then all of it reverts
  • what if we point delegation to a newly created account that calls selfdestruct, will it remove the pointer contract?
  • multiple auth list combinations. Repeat, repeat 2 different auths
  • reset pointer back to eoa
  • check that new transaction type is rejected before fork transition block X

For test scenarios option (PR #808):

  • pointer to contract that revert/oog/suicide/return/errors with exception
  • callcode* pointer style account
@winsvega winsvega added type:test Type: Test needs-discussion Needs discussion before proceeding labels Nov 14, 2024
@winsvega
Copy link
Collaborator Author

winsvega commented Nov 18, 2024

From @MariusVanDerWijden

  • Tests for 7702 with pre-deployed delegations that are not of the correct size (should never happen, but we should have tests for it)
  • We should have a test for signature malleability in 7702
  • Also 7702 will change the speed of extcodesize, we should test whether this will be a problem
  • We should have a test, where a contract calls a delegation that delegates to a delegation and we check the gas of that. In our gas calculation, we only check for the delegation prefix (QUESTION: Delegation to a delegation means OOG so it will eat all the gas, this is already covered, did you mean something else?)

So we should charge for the resoulution of the second delegation, even if the second delegation will fail. I'm wondering if there can be consensus issues there

same for extcodecopy, extcodesize, extcodehash

@winsvega
Copy link
Collaborator Author

winsvega commented Dec 2, 2024

what if I have account A
now I point it to contract B
run some logic, it changes the storage of my account A
then I revoke the pointer, now I have EOA account with the storage
now I point it to contract C
run some logic. logic of contract C can now read of my storage in accoutn A ?
what if contract C has some critical data it reads from it's storage ?

have the existing daos and contracts been audited for potential vulnerabilities with 7702 ?

@danceratopz danceratopz added the fork:prague Prague hardfork label Dec 2, 2024
@winsvega
Copy link
Collaborator Author

can a contract with code sign delegation to point itself to another contract?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fork:prague Prague hardfork needs-discussion Needs discussion before proceeding type:test Type: Test
Projects
None yet
Development

No branches or pull requests

2 participants