Payload checksum type is not fixed #115

Closed
opened 2025-12-28 18:12:37 +00:00 by sami · 1 comment
Owner

Originally created by @carpawell on GitHub (Aug 20, 2024).

Object header has payload checksums (not a homomorphic one) and there is no restriction about hashing algorithm. However, in practice, it is fixed and there is no sense in using TZ hash in regular hashing.

Current Behavior

Hash is not fixed and our nodes' behavior is undefined if we meet such objects. E.g., it is impossible to search by such hashes: nspcc-dev/neofs-sdk-go@256513c1b2/object/search.go (L336-L341).

Expected Behavior

Objects hashing with any algo that is not sha256 should be prohibited.

Possible Solution

Add comments to this field.

Steps to Reproduce

Use your eyes, look at nspcc-dev/neofs-api@01229b49e9/object/types.proto (L87-L88).

Regression

No.

Originally created by @carpawell on GitHub (Aug 20, 2024). <!-- Provide a general summary of the issue in the Title above --> Object header has payload checksums (not a homomorphic one) and there is no restriction about hashing algorithm. However, in practice, it is fixed and there is no sense in using TZ hash in regular hashing. ## Current Behavior Hash is not fixed and our nodes' behavior is undefined if we meet such objects. E.g., it is impossible to search by such hashes: https://github.com/nspcc-dev/neofs-sdk-go/blob/256513c1b29bbb59326eecdc0ae669cc67e33155/object/search.go#L336-L341. ## Expected Behavior Objects hashing with any algo that is not sha256 should be prohibited. ## Possible Solution Add comments to this field. ## Steps to Reproduce Use your eyes, look at https://github.com/nspcc-dev/neofs-api/blob/01229b49e9165e693a48e2b96ccad528df34b55e/object/types.proto#L87-L88. ## Regression No.
sami 2025-12-28 18:12:37 +00:00
  • closed this issue
  • added the
    bug
    U4
    S4
    I4
    labels
Author
Owner

@roman-khimov commented on GitHub (Dec 27, 2024):

Fixed in #316.

@roman-khimov commented on GitHub (Dec 27, 2024): Fixed in #316.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-api#115
No description provided.