Describe size limitations #51

Open
opened 2025-12-28 18:12:13 +00:00 by sami · 5 comments
Owner

Originally created by @realloc on GitHub (Aug 26, 2021).

There is no clear statement on the maximal sizes of object header, attribute, eACL records, etc. It may be important for different language implementations.

Originally created by @realloc on GitHub (Aug 26, 2021). There is no clear statement on the maximal sizes of object header, attribute, eACL records, etc. It may be important for different language implementations.
Author
Owner

@AnnaShaleva commented on GitHub (May 29, 2023):

The problem with missing object header size limitation affects the Neo Oracle service. One of Oracle NeoFS request types is getting header, and large header may be a problem for the Oracle node. Even if it won't fit in MaxOracleResponseSize limit, the Oracle node will try to load the whole header into memory before the response creation which may cause OOM. Ref. https://github.com/neo-project/neo-modules/pull/803.

@AnnaShaleva commented on GitHub (May 29, 2023): The problem with missing object header size limitation affects the Neo Oracle service. One of Oracle NeoFS request types is getting header, and large header may be a problem for the Oracle node. Even if it won't fit in `MaxOracleResponseSize` limit, the Oracle node will try to load the whole header into memory before the response creation which may cause OOM. Ref. https://github.com/neo-project/neo-modules/pull/803.
Author
Owner

@roman-khimov commented on GitHub (May 29, 2023):

Describing an existing limitation and adding a limit where it never existed are somewhat different. In some cases from above it's the first, but in some (like object header size) it's the second.

@roman-khimov commented on GitHub (May 29, 2023): Describing an existing limitation and adding a limit where it never existed are somewhat different. In some cases from above it's the first, but in some (like object header size) it's the second.
Author
Owner

@AnnaShaleva commented on GitHub (May 30, 2023):

It should be noted (thanks to @notimetoname digging) that although there's no explicit limit from the neo-fs side, the header itself is restricted by a single gRPC package (at least ObjectHead operation as far as object replications during ObjectPut). From the server-side gRPC client, this constraint is set to be max int32 value by default, and this default isn't changed anywhere. From the client side this value even smaller and set to be 4MB by default, this default isn't changed anywhere inside the neo-fs as far. Thus, if using neofs-api-go client, the user can't get header with size more than 4MB.

Thus, within the scope of this issue it would also be nice to provide the ability to edit client/server gRPC package size constraints as an option.

For now, consider neo-go Oracle response limit problem, we can be sure that the node is safe even if it doesn't restrict the received header size and no OOM could happen beause we have this implisit gRPC package limit. However, the C# node still may face with this issue. @roman-khimov, what do you think?

@AnnaShaleva commented on GitHub (May 30, 2023): It should be noted (thanks to @notimetoname digging) that although there's no explicit limit from the neo-fs side, the header itself is restricted by a single gRPC package (at least ObjectHead operation as far as object replications during ObjectPut). From the server-side gRPC client, this constraint is set to be [max int32 value by default](https://github.com/grpc/grpc-go/blob/9b9b364f6983ec56273447640563b677d3f7e152/clientconn.go#L99), and this default isn't changed anywhere. From the client side this value even smaller and set to be [4MB by default](https://github.com/grpc/grpc-go/blob/9b9b364f6983ec56273447640563b677d3f7e152/clientconn.go#L98), this default isn't changed anywhere inside the neo-fs as far. Thus, if using neofs-api-go client, the user can't get header with size more than 4MB. Thus, within the scope of this issue it would also be nice to provide the ability to edit client/server gRPC package size constraints as an option. For now, consider neo-go Oracle response limit problem, we can be sure that the node is safe even if it doesn't restrict the received header size and no OOM could happen beause we have this implisit gRPC package limit. However, the C# node still may face with this issue. @roman-khimov, what do you think?
Author
Owner

@roman-khimov commented on GitHub (May 30, 2023):

There has to be some sane NeoFS protocol limit for it, simple as that. 4M is too much, we've got 64M limit for the payload for the record. We need to take a closer look at this, but 4K seems to be a nice limit to me, at least I'd expect to see some value of that order for it.

@roman-khimov commented on GitHub (May 30, 2023): There has to be some sane NeoFS protocol limit for it, simple as that. 4M is too much, we've got 64M limit for the payload for the record. We need to take a closer look at this, but 4K seems to be a nice limit to me, at least I'd expect to see some value of that order for it.
Author
Owner

@cthulhu-rider commented on GitHub (May 30, 2023):

we can start with some small value 1-4K, so we'll be able to increase the limit if there is no other way

@cthulhu-rider commented on GitHub (May 30, 2023): we can start with some small value 1-4K, so we'll be able to increase the limit if there is no other way
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#51
No description provided.