Merged
Conversation
8a12406 to
caa70ac
Compare
msbrogli
previously approved these changes
Aug 6, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1348 +/- ##
==========================================
+ Coverage 85.69% 85.71% +0.01%
==========================================
Files 425 426 +1
Lines 32259 32270 +11
Branches 5025 5025
==========================================
+ Hits 27645 27660 +15
+ Misses 3602 3600 -2
+ Partials 1012 1010 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
caa70ac to
32b8694
Compare
ca71a4d to
c42478c
Compare
jansegre
previously approved these changes
Aug 7, 2025
c42478c to
a642840
Compare
32b8694 to
e880df3
Compare
The base branch was changed.
e880df3 to
aca527d
Compare
jansegre
approved these changes
Aug 7, 2025
|
| Branch | refactor/nano/imports |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 1.71 m(+3.78%)Baseline: 1.64 m | 1.48 m (86.72%) | 1.81 m (94.34%) |
msbrogli
approved these changes
Aug 7, 2025
This was referenced Aug 12, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #1347
Motivation
This PR provides a few improvements in how the custom
__import__function is provided for blueprints. Currently, it uses the actualbuiltins.__import__function internally, but this is not necessary, as we can simply return the allowed and pre-imported objects directly. This adds a new security layer as now it's impossible to call the builtin function, even indirectly, from blueprints.It also moves the
ALLOWED_IMPORTSobjects to its own file, to improve organization, and it will be easier to implement custom shells for the allowed objects in a future PR, to provide immutability.Acceptance Criteria
ALLOWED_IMPORTSto its own file, and provide the pre-imported objects in it.builtins.__import__function itself.typingmodule — it works, and finds more exposed cases.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged