Skip to content

fix(nano): fix nano_contracts_enabled on /version api#1387

Merged
glevco merged 1 commit intomasterfrom
feat/nano/enabled-api
Aug 28, 2025
Merged

fix(nano): fix nano_contracts_enabled on /version api#1387
glevco merged 1 commit intomasterfrom
feat/nano/enabled-api

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Aug 27, 2025

Motivation

The /version API was indirectly changed to return a string enum instead of a bool for the nano_contracts_enabled key, which made all clients believe the nano feature is active for all networks. This PR fixes this.

Acceptance Criteria

  • Refactor is_nano_active logic into its own utils function.
  • Change the nano_contracts_enabled key on the /version API to return a bool instead of an string enum.

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 27, 2025
@glevco glevco moved this from Todo to In Progress (Done) in Hathor Network Aug 27, 2025
@glevco glevco requested a review from pedroferreira1 August 27, 2025 17:36
@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Aug 27, 2025
@github-actions
Copy link

🐰 Bencher Report

Branchfeat/nano/enabled-api
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.91 m
(+14.23%)Baseline: 1.67 m
1.51 m
(78.79%)
2.01 m
(95.19%)
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.81%. Comparing base (d6690ec) to head (773db89).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
hathor/nanocontracts/utils.py 76.92% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1387      +/-   ##
==========================================
- Coverage   85.82%   85.81%   -0.02%     
==========================================
  Files         429      429              
  Lines       32423    32433      +10     
  Branches     5057     5056       -1     
==========================================
+ Hits        27828    27831       +3     
- Misses       3583     3587       +4     
- Partials     1012     1015       +3     

☔ 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 Review (WIP) to In Review (Done) in Hathor Network Aug 27, 2025
@glevco glevco merged commit f25fc0e into master Aug 28, 2025
13 of 14 checks passed
@glevco glevco deleted the feat/nano/enabled-api branch August 28, 2025 14:29
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Aug 28, 2025
@jansegre jansegre mentioned this pull request Aug 29, 2025
2 tasks
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Sep 18, 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