Skip to content

feat(nano): restrict usage of float and complex numbers#1396

Merged
jansegre merged 1 commit intomasterfrom
feat/nano/restrict-float
Sep 19, 2025
Merged

feat(nano): restrict usage of float and complex numbers#1396
jansegre merged 1 commit intomasterfrom
feat/nano/restrict-float

Conversation

@jansegre
Copy link
Member

@jansegre jansegre commented Sep 8, 2025

WARNING: this causes breakage with testnet-hotel, because some of the published OCBs use the float division operator.

Motivation

Some syntax still allows float and complex numbers, which could lead to different results in different hardware. We should lift these restrictions when we have a deterministic float implementation.

Acceptance Criteria

  • Forbid float literals in Blueprint code
  • Forbid complex literals in Blueprint code
  • Forbid use of float division (/) in Blueprint code

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

@jansegre jansegre self-assigned this Sep 8, 2025
@jansegre jansegre requested a review from msbrogli as a code owner September 8, 2025 14:49
@jansegre jansegre moved this from Todo to In Progress (Done) in Hathor Network Sep 8, 2025
@github-actions
Copy link

github-actions bot commented Sep 8, 2025

🐰 Bencher Report

Branchfeat/nano/restrict-float
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.94 m
(+15.08%)Baseline: 1.69 m
1.52 m
(78.20%)
2.03 m
(95.90%)
🐰 View full continuous benchmarking report in Bencher

@jansegre jansegre force-pushed the feat/nano/restrict-float branch from 0cc75da to c5f1a61 Compare September 8, 2025 14:58
@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.77%. Comparing base (93c1aa5) to head (338a532).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1396      +/-   ##
==========================================
- Coverage   85.83%   85.77%   -0.06%     
==========================================
  Files         430      430              
  Lines       33061    33071      +10     
  Branches     5171     5173       +2     
==========================================
- Hits        28377    28367      -10     
- Misses       3650     3665      +15     
- Partials     1034     1039       +5     

☔ 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 previously approved these changes Sep 8, 2025
@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Sep 8, 2025
msbrogli
msbrogli previously approved these changes Sep 8, 2025
@jansegre jansegre moved this from In Review (WIP) to In Review (Done) in Hathor Network Sep 8, 2025
@jansegre jansegre force-pushed the feat/nano/restrict-float branch from c5f1a61 to a0c2788 Compare September 9, 2025 14:40
@jansegre jansegre dismissed stale reviews from msbrogli and glevco via 070fd4d September 9, 2025 14:41
@jansegre jansegre force-pushed the feat/nano/restrict-float branch from a0c2788 to 070fd4d Compare September 9, 2025 14:41
glevco
glevco previously approved these changes Sep 11, 2025
@jansegre jansegre force-pushed the feat/nano/restrict-float branch from 070fd4d to 338a532 Compare September 18, 2025 21:42
@jansegre jansegre merged commit 9684e26 into master Sep 19, 2025
8 checks passed
@jansegre jansegre deleted the feat/nano/restrict-float branch September 19, 2025 14:47
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Sep 19, 2025
@jansegre jansegre mentioned this pull request Sep 26, 2025
2 tasks
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Sep 26, 2025
@jansegre jansegre mentioned this pull request Oct 16, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants