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

dev: remove outside_execution checks & docs #1437

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

enitrat
Copy link
Collaborator

@enitrat enitrat commented Sep 23, 2024

execute_from_outside purpose is that validate and execute are limited in functionalities. We could not run all EVM checks in validate , and our move to a "real" Starknet chain required a solution to handle the underlying starknet transaction fee for our users.

Thus, we needed to implement a paymaster functionality.
All EVM tx rules validation are now handled in the execute part of a transaction to bypass the limitations of validate , and both these entrypoints have been disabled.
We use a fleet of relayer accounts to sponsor the Starknet cost of the transaction for our users, so that they don't have to worry about Starknet gas
For this, we implemented the execute_from_outside entrypoint as defined in SNIP-9

The outside_execution nonce is not signed, thus anyone can send a transaction to this entrypoint with any value for outside_execution and pass the first checks: it's indeed useless
However, there should not be a security risk: the EVM transaction sent

    calldata_len: felt,
    calldata: felt*,
    signature_len: felt,
    signature: felt*,

is signed by the EOA owner, and cannot be replayed

In the end: any checks on outside_execution is useless.

Time spent on this PR:

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Resolves #

What is the new behavior?

  • Remove checks from the Outside execution
  • Add some docs

This change is Reviewable

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.9%. Comparing base (73356ca) to head (ea300cb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1437     +/-   ##
=======================================
- Coverage   62.9%   62.9%   -0.1%     
=======================================
  Files         49      49             
  Lines       8393    8386      -7     
=======================================
- Hits        5282    5275      -7     
  Misses      3111    3111             
Flag Coverage Δ
62.9% <ø> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ClementWalter ClementWalter merged commit 27c2f38 into main Sep 23, 2024
9 checks passed
@ClementWalter ClementWalter deleted the dev/remove-outside-exec-checks branch September 23, 2024 20:08
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

Successfully merging this pull request may close these issues.

2 participants