Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload checksum type is not fixed #304

Open
carpawell opened this issue Aug 20, 2024 · 0 comments
Open

Payload checksum type is not fixed #304

carpawell opened this issue Aug 20, 2024 · 0 comments
Labels
bug Something isn't working I4 No visible changes S4 Routine U4 Nothing urgent

Comments

@carpawell
Copy link
Member

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

// Hash of payload bytes
neo.fs.v2.refs.Checksum payload_hash = 6 [json_name = "payloadHash"];
.

Regression

No.

@carpawell carpawell added bug Something isn't working U4 Nothing urgent labels Aug 20, 2024
@carpawell carpawell changed the title Payload checksum is not fixed Payload checksum type is not fixed Aug 20, 2024
@roman-khimov roman-khimov added S4 Routine I4 No visible changes labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

2 participants