Verify storage policy in proto/binary/JSON decoders #282

Open
opened 2025-12-28 18:07:39 +00:00 by sami · 3 comments
Owner

Originally created by @cthulhu-rider on GitHub (Oct 15, 2025).

See checks in nspcc-dev/neofs-sdk-go@05e793c06b/netmap/node_info.go (L37). I'd expect the same thing here, so Verify() can be called right in the PlacementPolicy.fromProtoMessage

Originally posted by @roman-khimov in https://github.com/nspcc-dev/neofs-sdk-go/pull/736#discussion_r2432324517

Originally created by @cthulhu-rider on GitHub (Oct 15, 2025). See checks in https://github.com/nspcc-dev/neofs-sdk-go/blob/05e793c06b1e751c35c64bee65e7da5f4f2556fd/netmap/node_info.go#L37. I'd expect the same thing here, so `Verify()` can be called right in the PlacementPolicy.fromProtoMessage _Originally posted by @roman-khimov in https://github.com/nspcc-dev/neofs-sdk-go/pull/736#discussion_r2432324517_
Author
Owner

@cthulhu-rider commented on GitHub (Oct 15, 2025):

see also #638

@cthulhu-rider commented on GitHub (Oct 15, 2025): see also #638
Author
Owner

@cthulhu-rider commented on GitHub (Oct 15, 2025):

also, behavior should be the same for all types across the lib

@cthulhu-rider commented on GitHub (Oct 15, 2025): also, behavior should be the same for all types across the lib
Author
Owner

@roman-khimov commented on GitHub (Oct 15, 2025):

My point is that there are proto/* things for "strange" structures, one can decode into these basic structs and go. While upper-lever netmap/object/etc types should be designed for safer use, like when you unmarshal them from any source you don't get something that's broken by definition.

@roman-khimov commented on GitHub (Oct 15, 2025): My point is that there are `proto/*` things for "strange" structures, one can decode into these basic structs and go. While upper-lever netmap/object/etc types should be designed for safer use, like when you unmarshal them from any source you don't get something that's broken by definition.
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-sdk-go#282
No description provided.