Skip to content

Support NEP-11 containers#3701

Merged
roman-khimov merged 2 commits intomasterfrom
container-nep-11
Dec 2, 2025
Merged

Support NEP-11 containers#3701
roman-khimov merged 2 commits intomasterfrom
container-nep-11

Conversation

@cthulhu-rider
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.17%. Comparing base (1bda439) to head (97e0b2c).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
pkg/morph/event/container/notifications.go 0.00% 32 Missing ⚠️
cmd/neofs-node/container.go 0.00% 29 Missing ⚠️
pkg/morph/client/container/list.go 0.00% 15 Missing ⚠️
cmd/neofs-node/cache.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3701      +/-   ##
==========================================
- Coverage   27.20%   27.17%   -0.03%     
==========================================
  Files         659      659              
  Lines       42008    42081      +73     
==========================================
+ Hits        11428    11437       +9     
- Misses      29516    29582      +66     
+ Partials     1064     1062       -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.

@cthulhu-rider cthulhu-rider force-pushed the container-nep-11 branch 3 times, most recently from d9e23a3 to c9154e5 Compare November 27, 2025 14:01
@cthulhu-rider cthulhu-rider marked this pull request as ready for review November 27, 2025 14:55

res, err := c.client.TestInvokeIterator(listMethod, iteratorPrefetchNumber, rawIdUser)
res, err := c.client.TestInvokeIterator(mtd, iteratorPrefetchNumber, args...)
if err != nil && isMethodNotFoundError(err, mtd) {
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to expect missing methods? i have never done this and relied on contract updates (which are done in the same repo now)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cuz otherwise SN would have to check min versions of contracts before launching

i have never done this and relied on contract updates

too naive to me, contract are not managed by SN

although i understand this'd be a bit easier

func subscribeToContainerTransfer(c *cfg, h func(id cid.ID, from, to user.ID)) {
const eventName = "Transfer"
registerEventParserOnceContainer(c, eventName, containerEvent.RestoreTransfer)
addContainerAsyncNotificationHandler(c, eventName, func(e event.Event) {
Copy link
Member

Choose a reason for hiding this comment

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

can there be problems related to async owner changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actions are idempotent now

Copy link
Member

@carpawell carpawell Dec 2, 2025

Choose a reason for hiding this comment

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

i meant if there are two transfers close in time, can the cache inside SN has a race with undefined results?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, only listing cache. It was like that before

@cthulhu-rider cthulhu-rider force-pushed the container-nep-11 branch 2 times, most recently from 6350723 to 2ddb63e Compare November 28, 2025 17:09
@roman-khimov
Copy link
Member

Rebase, please.

If new methods are missing, SN falls back to the old one.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
This makes SN to listen to container NEP-11 transfer events and update
GET/LIST caches.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
@roman-khimov roman-khimov merged commit af84826 into master Dec 2, 2025
20 of 22 checks passed
@roman-khimov roman-khimov deleted the container-nep-11 branch December 2, 2025 19:29
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