Skip to content

Fake persisted block#3494

Merged
cthulhu-rider merged 1 commit intomasterfrom
update-verify-n3-scripts
Jul 31, 2025
Merged

Fake persisted block#3494
cthulhu-rider merged 1 commit intomasterfrom
update-verify-n3-scripts

Conversation

@smallhive
Copy link
Contributor

It requires to compensate BlockHeight behaviour with persisting block. Details in row 538 https://github.com/nspcc-dev/neo-go/blob/44d7da54f41ce82d852cf7320d6ed00fb3c1eb96/pkg/core/interop/context.go#L528-L544

It requires to compensate BlockHeight behaviour with persisting block. Details in row 538 https://github.com/nspcc-dev/neo-go/blob/44d7da54f41ce82d852cf7320d6ed00fb3c1eb96/pkg/core/interop/context.go#L528-L544

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 23.47%. Comparing base (e444485) to head (face3b5).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
internal/crypto/n3.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3494   +/-   ##
=======================================
  Coverage   23.46%   23.47%           
=======================================
  Files         669      669           
  Lines       50233    50233           
=======================================
+ Hits        11785    11790    +5     
+ Misses      37526    37523    -3     
+ Partials      922      920    -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.

@roman-khimov roman-khimov requested a review from AnnaShaleva July 31, 2025 06:22
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that netmap contract saves current Ledger index as "epoch block":
https://github.com/nspcc-dev/neofs-contract/blob/63a8deaafd21ce741d026e3e3973093596e41932/contracts/netmap/contract.go#L400

This means that an epoch ticking transaction added into block N will save N-1 as the time when epoch tick happened. Then verification context will use this N-1 as height and scripts (contracts) in RPC would get N-2 from Ledger. The patch corrects things as with N passed verification script would get N-1, same as epoch tick transaction.

@cthulhu-rider cthulhu-rider merged commit c96ae2c into master Jul 31, 2025
16 of 21 checks passed
@cthulhu-rider cthulhu-rider deleted the update-verify-n3-scripts branch July 31, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants