Skip to content

feat(nano): implement new get_current_code_blueprint_id syscall#1471

Merged
glevco merged 1 commit intomasterfrom
feat/nano/current-blueprint
Oct 20, 2025
Merged

feat(nano): implement new get_current_code_blueprint_id syscall#1471
glevco merged 1 commit intomasterfrom
feat/nano/current-blueprint

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Oct 16, 2025

Motivation

This is a 2-in-1 PR:

  • It fixes an issue where making a double proxy call would bypass the BlueprintId validation, meaning a contract would be able to call a method on itself when it should fail with NCInvalidSyscall('cannot call the same blueprint') instead. This is not a security problem, but rather a minor inconvenience as we could help developers prevent such mistakes.
  • Introduce a new get_current_code_blueprint_id syscall to get the BlueprintId of the currently running code instead of currently running contract. The same method is used to fix the issue above.

Acceptance Criteria

  • Implement new get_current_code_blueprint_id syscall.
  • Fix BlueprintId validation when making double proxy calls.

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 Oct 16, 2025
@glevco glevco moved this from Todo to In Progress (WIP) in Hathor Network Oct 16, 2025
@glevco glevco moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Oct 16, 2025
@glevco glevco force-pushed the feat/nano/current-blueprint branch from fecfae3 to f48f8ce Compare October 16, 2025 17:03
@glevco glevco force-pushed the feat/nano/current-blueprint branch from f48f8ce to a10ddb8 Compare October 16, 2025 17:30
@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1471      +/-   ##
==========================================
- Coverage   86.14%   86.05%   -0.09%     
==========================================
  Files         437      437              
  Lines       34037    34044       +7     
  Branches     5323     5324       +1     
==========================================
- Hits        29321    29298      -23     
- Misses       3673     3694      +21     
- Partials     1043     1052       +9     

☔ 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 (Done) to In Review (WIP) in Hathor Network Oct 17, 2025
@glevco glevco merged commit 2a304d0 into master Oct 20, 2025
12 of 14 checks passed
@glevco glevco deleted the feat/nano/current-blueprint branch October 20, 2025 15:54
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Oct 20, 2025
This was referenced Oct 20, 2025
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Oct 21, 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