Skip to content

fix(nano): Fix NCCreationResource to get contract information from the global state#1425

Merged
msbrogli merged 1 commit intomasterfrom
fix/nano-nc_creation-api
Sep 25, 2025
Merged

fix(nano): Fix NCCreationResource to get contract information from the global state#1425
msbrogli merged 1 commit intomasterfrom
fix/nano-nc_creation-api

Conversation

@msbrogli
Copy link
Member

@msbrogli msbrogli commented Sep 23, 2025

Motivation

NCCreationResource was previously getting contract information from the vertex that created that contract. But this does not work for contracts created by contracts. This PR fixes that.

Acceptance Criteria

  1. If a contract creation vertex is not found, get contract information from the best block's global state. In this case, the created_at is set to zero.

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

@msbrogli msbrogli requested a review from jansegre as a code owner September 23, 2025 15:37
@msbrogli msbrogli self-assigned this Sep 23, 2025
@msbrogli msbrogli moved this to In Progress (WIP) in Hathor Network Sep 23, 2025
@github-actions
Copy link

github-actions bot commented Sep 23, 2025

🐰 Bencher Report

Branchfix/nano-nc_creation-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
2.05 m
(+19.72%)Baseline: 1.71 m
1.54 m
(75.18%)
2.05 m
(99.77%)
🐰 View full continuous benchmarking report in Bencher

@msbrogli msbrogli force-pushed the fix/nano-nc_creation-api branch 2 times, most recently from 774adbf to 49b2dca Compare September 24, 2025 14:18
jansegre
jansegre previously approved these changes Sep 24, 2025
@msbrogli msbrogli force-pushed the fix/nano-nc_creation-api branch from 49b2dca to 7e26c0c Compare September 25, 2025 15:36
@msbrogli msbrogli force-pushed the fix/nano-nc_creation-api branch 3 times, most recently from 5a4b4c6 to 5548cde Compare September 25, 2025 17:01
@msbrogli msbrogli force-pushed the fix/nano-nc_creation-api branch from 5548cde to 33a2888 Compare September 25, 2025 17:02
@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.76%. Comparing base (8e6ea50) to head (33a2888).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
hathor/nanocontracts/resources/nc_creation.py 83.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1425      +/-   ##
==========================================
- Coverage   85.77%   85.76%   -0.02%     
==========================================
  Files         431      431              
  Lines       33115    33133      +18     
  Branches     5193     5196       +3     
==========================================
+ Hits        28406    28416      +10     
- Misses       3671     3677       +6     
- Partials     1038     1040       +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.

@msbrogli msbrogli merged commit 33a2888 into master Sep 25, 2025
8 checks passed
@msbrogli msbrogli deleted the fix/nano-nc_creation-api branch September 25, 2025 17:37
@github-project-automation github-project-automation bot moved this from In Progress (WIP) to Waiting to be deployed in Hathor Network Sep 25, 2025
This was referenced Sep 25, 2025
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Sep 26, 2025
@jansegre jansegre mentioned this pull request Oct 7, 2025
2 tasks
@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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants