Skip to content

Drop old migrations#556

Merged
cthulhu-rider merged 4 commits intomasterfrom
drop-old-migrations
Nov 28, 2025
Merged

Drop old migrations#556
cthulhu-rider merged 4 commits intomasterfrom
drop-old-migrations

Conversation

@roman-khimov
Copy link
Member

No description provided.

@roman-khimov
Copy link
Member Author

This obviously conflicts with any other PR, so better be merged quickly.

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 32.25806% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.42%. Comparing base (4c3f80e) to head (4b61dd0).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
contracts/netmap/contract.go 30.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #556      +/-   ##
==========================================
- Coverage   63.29%   62.42%   -0.88%     
==========================================
  Files          29       29              
  Lines        3196     3063     -133     
==========================================
- Hits         2023     1912     -111     
+ Misses       1167     1145      -22     
  Partials        6        6              

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

0.21.0 corresponds to NeoFS 0.45.0 released Feb 2025, in the node itself we're
already at 0.50.0 that removed node-internal migrations for pre-0.46.0. All of
the networks already use updated contracts with Node2 network maps so old
methods can be safely dropped.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
MaintenanceModeAllowed is unused since NeoFS 0.47.0 (Jun 2025), AuditFee since
0.48.0 (Jul 2025), there are no networks that use lower versions, so we can
remove old settings automatically with contracts update to avoid "unknown"
configurations in adm output.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Contracts 0.22.0 correspond to NeoFS version 0.46.0, we're at least 0.49.0
everywhere and node has already dropped internal pre-0.46.0 migrations.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
It's dangerous, migration tests are supposed to always work, so I do want
tests to fail if some state dumps are outdated. Otherwise it's too easy
to forget about them and think that it's all fine when in fact it's not.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
// all of the node structure to contract.
// Node2 stores data related to a single NeoFS storage node. It follows
// the model defined in NeoFS API specification.
type Node2 struct {
Copy link
Member

Choose a reason for hiding this comment

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

is it safe to rename to Node?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes and no. Will require changes to all code using bindings. Not worth it to me.

// 'version' method and checks can the Contract be updated similar to
// common.CheckVersion. If not, SkipUnsupportedVersions skips corresponding
// test.
func SkipUnsupportedVersions(tb testing.TB, c *Contract, updPrms ...any) {
Copy link
Contributor

Choose a reason for hiding this comment

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

so we gonna just drop stale dumps?

Copy link
Member Author

Choose a reason for hiding this comment

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

Replace with current ones, just like we do now. We drop migrations from time to time anyway and my concern is that this invalidates migration tests silently.

Copy link
Contributor

Choose a reason for hiding this comment

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

dont mind, legit with dump deletions

@cthulhu-rider cthulhu-rider merged commit 0d79e94 into master Nov 28, 2025
8 of 10 checks passed
@cthulhu-rider cthulhu-rider deleted the drop-old-migrations branch November 28, 2025 09:55
roman-khimov added a commit to nspcc-dev/neofs-node that referenced this pull request Dec 12, 2025
updateStateIR is gone in contracts since nspcc-dev/neofs-contract#556
(0.26.0 changeset), so it no longer works. Fixes test failure:

    2025-12-12T13:37:24.776Z	warn	innerring/network.go:106	external request: can't invoke updateSateIR method in netmap	{"node pub key": "ed92cf9dde91bf35d7d806130ce7c22cbdb639dbb59e77b0fb87287359cbf88dcb6d7faf4cf86b4c1a928b74601dbda357445ffd0baa36a29bc16be0cc5b737f", "error": "chain/client: contract execution finished with state FAULT; exception: at instruction 76 (SYSCALL): System.Contract.Call failed: method not found: updateStateIR/2"}

Signed-off-by: Roman Khimov <roman@nspcc.ru>
roman-khimov added a commit to nspcc-dev/neofs-node that referenced this pull request Dec 12, 2025
updateStateIR is gone in contracts since nspcc-dev/neofs-contract#556
(0.26.0 changeset), so it no longer works. Fixes test failure:

    2025-12-12T13:37:24.776Z	warn	innerring/network.go:106	external request: can't invoke updateSateIR method in netmap	{"node pub key": "ed92cf9dde91bf35d7d806130ce7c22cbdb639dbb59e77b0fb87287359cbf88dcb6d7faf4cf86b4c1a928b74601dbda357445ffd0baa36a29bc16be0cc5b737f", "error": "chain/client: contract execution finished with state FAULT; exception: at instruction 76 (SYSCALL): System.Contract.Call failed: method not found: updateStateIR/2"}

Signed-off-by: Roman Khimov <roman@nspcc.ru>
carpawell added a commit that referenced this pull request Dec 18, 2025
It is going to be deleted during migration to v0.26.0, and it should not be
added again. Refs #556.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
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