Skip to content

fix(nano): avoid exception when generating json#1421

Merged
jansegre merged 1 commit intomasterfrom
fix/nano/json-exception
Oct 27, 2025
Merged

fix(nano): avoid exception when generating json#1421
jansegre merged 1 commit intomasterfrom
fix/nano/json-exception

Conversation

@jansegre
Copy link
Member

@jansegre jansegre commented Sep 19, 2025

Motivation

Calling a method from a voided contract could make generating the JSON of a transaction fail.

Acceptance Criteria

  • Add accept_failed_execution: bool to nano_header.get_blueprint_id so JSON can be generated
  • Add test that reproduces a situation that would trigger the error

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 19, 2025
@jansegre jansegre moved this from Todo to In Progress (WIP) in Hathor Network Sep 19, 2025
@github-actions
Copy link

github-actions bot commented Sep 19, 2025

🐰 Bencher Report

Branchfix/nano/json-exception
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.76 m
(+1.73%)Baseline: 1.73 m
1.56 m
(88.47%)
2.08 m
(84.78%)
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.11%. Comparing base (0b898fa) to head (0b9c70f).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
hathor/transaction/headers/nano_header.py 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1421      +/-   ##
==========================================
- Coverage   86.12%   86.11%   -0.01%     
==========================================
  Files         437      437              
  Lines       33966    33967       +1     
  Branches     5315     5316       +1     
==========================================
- Hits        29253    29251       -2     
- Misses       3672     3674       +2     
- Partials     1041     1042       +1     

☔ 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.

@jansegre
Copy link
Member Author

jansegre commented Oct 1, 2025

Not needed after #1423

@jansegre jansegre closed this Oct 1, 2025
@github-project-automation github-project-automation bot moved this from In Progress (WIP) to Waiting to be deployed in Hathor Network Oct 1, 2025
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Oct 1, 2025
@jansegre jansegre reopened this Oct 24, 2025
@jansegre jansegre moved this from Done to In Progress (Done) in Hathor Network Oct 24, 2025
@jansegre jansegre moved this from In Progress (Done) to In Progress (WIP) in Hathor Network Oct 24, 2025
@jansegre jansegre force-pushed the fix/nano/json-exception branch 2 times, most recently from 796f453 to 70b7f15 Compare October 25, 2025 00:06
@jansegre jansegre force-pushed the fix/nano/json-exception branch from 70b7f15 to 0b9c70f Compare October 25, 2025 00:07
@jansegre jansegre moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Oct 25, 2025
@jansegre jansegre marked this pull request as ready for review October 25, 2025 00:07
@jansegre jansegre requested a review from msbrogli as a code owner October 25, 2025 00:07
@jansegre jansegre requested a review from glevco October 25, 2025 00:09
@jansegre jansegre moved this from In Progress (Done) to In Review (WIP) in Hathor Network Oct 27, 2025
@jansegre jansegre merged commit d9c67bf into master Oct 27, 2025
13 of 14 checks passed
@jansegre jansegre deleted the fix/nano/json-exception branch October 27, 2025 17:08
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Oct 27, 2025
This was referenced Oct 27, 2025
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Oct 29, 2025
This was referenced Dec 2, 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