Skip to content

neofs: adapt helper to SDK ObjectHash removal#4255

Draft
End-rey wants to merge 1 commit into
masterfrom
drop-object-hash
Draft

neofs: adapt helper to SDK ObjectHash removal#4255
End-rey wants to merge 1 commit into
masterfrom
drop-object-hash

Conversation

@End-rey
Copy link
Copy Markdown
Contributor

@End-rey End-rey commented May 12, 2026

@End-rey End-rey self-assigned this May 12, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.58%. Comparing base (1e736f2) to head (8700aaa).

Files with missing lines Patch % Lines
pkg/services/helpers/neofs/neofs.go 0.00% 10 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4255   +/-   ##
=======================================
  Coverage   83.57%   83.58%           
=======================================
  Files         359      359           
  Lines       44177    44182    +5     
=======================================
+ Hits        36922    36928    +6     
- Misses       5440     5444    +4     
+ Partials     1815     1810    -5     

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

@AnnaShaleva AnnaShaleva added this to the v0.119.0 milestone May 12, 2026
@AnnaShaleva AnnaShaleva added the dependencies Dealing with project dependencies label May 12, 2026
Copy link
Copy Markdown
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

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

Why draft? The code itself looks good, is something missing?

return nil, err
}
if len(hashes) == 0 {
return nil, fmt.Errorf("%w: empty response", ErrInvalidRange)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to preserve behaviour compatibility. Does c.ObjectRangeInit return an error in the similar case when c.ObjectHash returned an empty list of hashes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. ObjectRangeInit does not provide the same signal by itself, so I added an explicit compatibility check. This restores the old behaviour for non-empty ranges. Full equivalence for the 0|0 case would still require consulting ObjectHead, because an empty stream can also be valid for an empty payload.
Do we need that extra ObjectHead check as well, or is restoring compatibility for non-empty ranges enough here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It affects Oracle behaviour, so I'd say we need a full compatibility in this case. Let me check the C# node.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@End-rey End-rey force-pushed the drop-object-hash branch from dd2cf46 to 8700aaa Compare May 12, 2026 12:46
Update neofs-sdk-go to `v1.0.0-rc.18.0.20260508161611-2131d01b3469`.

Remove `ObjectHash` from the local NeoFS client interface and handle range hash
requests via `ObjectRangeInit` with local SHA-256 calculation, preserving the
existing JSON output format.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
@End-rey End-rey requested a review from AnnaShaleva May 12, 2026 12:49
@End-rey
Copy link
Copy Markdown
Contributor Author

End-rey commented May 12, 2026

Why draft?

I've created a draft for now, because the changes to the SDK haven't been merged into the master branch yet.

Copy link
Copy Markdown
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.

OK as a quick stub to make things going.

@AnnaShaleva AnnaShaleva added the blocked Can't be done because of something label May 12, 2026
@AnnaShaleva
Copy link
Copy Markdown
Member

AnnaShaleva commented May 12, 2026

Affects Oracles, will be merged after Gorgon. (or even may be removed at all, need to check other usages)

@AnnaShaleva AnnaShaleva modified the milestones: v0.119.0, v0.120.0 May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Can't be done because of something dependencies Dealing with project dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants