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

[Access] add config to limit script execution range - v0.33 #5282

Merged
merged 4 commits into from
Jan 26, 2024

Conversation

peterargue
Copy link
Contributor

Backports: #5075

Limit the block range an AN will use for executing scripts and getting accounts when configured to use local data.

This is a stop-gap solution for node upgrades before #5040 is completed.

Usage:

When a cadence/fvm upgrade is planned: after the stop height is known and before it is reached, add the --script-execution-min-height flag passing the stop height and update the AN to the new version. This will cause the AN to stop locally executing scripts for any height below the stop height.

When running a "historic" node, set

  • --script-execution-min-height to the first block supported by the current version
  • --script-execution-max-height to the last block supported by the current version
    The node will then locally execute scripts for blocks between the heights (inclusive), and fall back to ENs for the rest.

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2024

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (2a90ae6) 55.46% compared to head (1a5a792) 55.43%.

Files Patch % Lines
engine/access/rpc/backend/script_executor.go 0.00% 38 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            v0.33    #5282      +/-   ##
==========================================
- Coverage   55.46%   55.43%   -0.03%     
==========================================
  Files         995      995              
  Lines       95603    95630      +27     
==========================================
- Hits        53029    53017      -12     
- Misses      38599    38635      +36     
- Partials     3975     3978       +3     
Flag Coverage Δ
unittests 55.43% <0.00%> (-0.03%) ⬇️

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.

@peterargue peterargue merged commit 9d03c27 into v0.33 Jan 26, 2024
53 checks passed
@peterargue peterargue deleted the petera/access-min-script-exec-block-v0.33 branch January 26, 2024 00:24
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.

4 participants