Add extend-runtime endowment
Fixes: https://github.com/MetaMask/snaps/issues/1604 PR for extension: https://github.com/MetaMask/metamask-extension/pull/20543
This PR will add implementation for a new endowment that will allow snaps to run computation-heavy => time consuming tasks for a longer time.
The approach for dynamic extension of a snap runtime to a certain levels is accomplished by setting up a new way of communication channel through the notification system between Execution Environment and Snap Controller.
Codecov Report
Patch coverage: 100.00% and project coverage change: +0.06% :tada:
Comparison is base (
0c52d61) 95.74% compared to head (ddcb9ec) 95.80%. Report is 14 commits behind head on main.
:exclamation: Current head ddcb9ec differs from pull request most recent head fe757b1. Consider uploading reports for the commit fe757b1 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #1624 +/- ##
==========================================
+ Coverage 95.74% 95.80% +0.06%
==========================================
Files 239 241 +2
Lines 5410 5489 +79
Branches 837 853 +16
==========================================
+ Hits 5180 5259 +79
Misses 230 230
| Files Changed | Coverage Δ | |
|---|---|---|
| ...snaps-controllers/src/services/ExecutionService.ts | 100.00% <ø> (ø) |
|
| ...es/snaps-controllers/src/snaps/endowments/index.ts | 100.00% <ø> (ø) |
|
| packages/snaps-utils/src/manifest/validation.ts | 100.00% <ø> (ø) |
|
| ...ntrollers/src/services/AbstractExecutionService.ts | 89.58% <100.00%> (+0.14%) |
:arrow_up: |
| ...ages/snaps-controllers/src/snaps/SnapController.ts | 96.63% <100.00%> (+0.13%) |
:arrow_up: |
| ...ges/snaps-controllers/src/snaps/endowments/enum.ts | 100.00% <100.00%> (ø) |
|
| ...controllers/src/snaps/endowments/extend-runtime.ts | 100.00% <100.00%> (ø) |
|
| ...cution-environments/src/common/BaseSnapExecutor.ts | 88.66% <100.00%> (+0.23%) |
:arrow_up: |
| ...nvironments/src/common/endowments/extendRuntime.ts | 100.00% <100.00%> (ø) |
|
| ...cution-environments/src/common/endowments/index.ts | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.