Skip to content

feat(nano): block usage of more builtins#1344

Merged
glevco merged 1 commit intomasterfrom
feat/nano/block-type-builtin
Aug 5, 2025
Merged

feat(nano): block usage of more builtins#1344
glevco merged 1 commit intomasterfrom
feat/nano/block-type-builtin

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Aug 1, 2025

Motivation

The type() builtin is currently allowed on OCBs, but since it can be used to do introspection, getting the class of an object (which would equivalent to obj.__class__) and its metaclass, we should disallow unless we're sure it's safe.

Acceptance Criteria

  • Disable type(), object(), and super() on OCBs.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Aug 1, 2025
@glevco glevco moved this from Todo to In Progress (WIP) in Hathor Network Aug 1, 2025
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🐰 Bencher Report

Branchfeat/nano/block-type-builtin
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark 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.67 m
(+1.75%)Baseline: 1.64 m
1.48 m
(88.45%)
1.81 m
(92.50%)
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.61%. Comparing base (b090d0c) to head (3964a13).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1344      +/-   ##
==========================================
- Coverage   85.63%   85.61%   -0.03%     
==========================================
  Files         424      424              
  Lines       32119    32119              
  Branches     4997     4997              
==========================================
- Hits        27506    27498       -8     
- Misses       3611     3617       +6     
- Partials     1002     1004       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glevco glevco moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Aug 1, 2025
@glevco glevco force-pushed the feat/nano/block-type-builtin branch 2 times, most recently from 578507b to ed949a4 Compare August 4, 2025 17:29
@glevco glevco force-pushed the feat/nano/block-type-builtin branch from ed949a4 to 3964a13 Compare August 5, 2025 00:23
@glevco glevco changed the title feat(nano): block usage of type builtin feat(nano): block usage of more builtins Aug 5, 2025
@github-project-automation github-project-automation bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Aug 5, 2025
@glevco glevco merged commit 14195bb into master Aug 5, 2025
8 checks passed
@glevco glevco deleted the feat/nano/block-type-builtin branch August 5, 2025 03:09
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Aug 5, 2025
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Aug 5, 2025
This was referenced Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants