Skip to content

Conversation

@smallhive
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.85%. Comparing base (19b1e75) to head (eef8b6f).
⚠️ Report is 89 commits behind head on master.

Files with missing lines Patch % Lines
pkg/morph/event/container/attributes.go 0.00% 21 Missing ⚠️
pkg/innerring/processors/container/handlers.go 0.00% 18 Missing ⚠️
pkg/innerring/processors/container/processor.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3728      +/-   ##
==========================================
- Coverage   26.88%   26.85%   -0.04%     
==========================================
  Files         658      659       +1     
  Lines       41829    41873      +44     
==========================================
- Hits        11246    11243       -3     
- Misses      29548    29595      +47     
  Partials     1035     1035              

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


cp.log.Debug("notification",
zap.String("type", "set attribute"),
zap.String("cID", string(e.CID)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
zap.String("cID", string(e.CID)),
zap.String("cID", base58.Encode(e.CID)),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

err := cp.cnrClient.Morph().NotarySignAndInvokeTX(e.NotaryRequest.MainTransaction, false)
if err != nil {
cp.log.Error("could not approve set attribute",
zap.String("cID", string(e.CID)),
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

}

err := cp.objectPool.Submit(func() {
err := cp.cnrClient.Morph().NotarySignAndInvokeTX(e.NotaryRequest.MainTransaction, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

so 3rd party can add attribute to my container w/o my approval?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think no. I consider, we will check this with token parameter inside contact setAttribute, when it be done in contracts

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
@smallhive smallhive force-pushed the notary-set-attribute branch from 18979b1 to eef8b6f Compare December 10, 2025 10:44

// set attribute
p.SetRequestType(containerEvent.SetAttributeNotaryEvent)
p.SetParser(containerEvent.ParseSetAttribute)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
p.SetParser(containerEvent.ParseSetAttribute)
p.SetParser(containerEvent.ParseSetAttribute)
pp = append(pp, p)


// ParseSetAttribute from NotaryEvent into container event structure.
func ParseSetAttribute(ne event.NotaryEvent) (event.Event, error) {
const expectedItemNumAnnounceLoad = 4
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const expectedItemNumAnnounceLoad = 4
const expectedItemNumSetAttribute = 4

// SetAttribute represents structure of notification about modified container attributes
// coming from NeoFS Container contract.
type SetAttribute struct {
CID []byte
Copy link
Member

Choose a reason for hiding this comment

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

we can validate it there. currently, any size of CID and any token can be signed by the alphabet and sent to the contract

@roman-khimov
Copy link
Member

Replaced by #3733.

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.

5 participants