nspcc-dev / neofs-node

NeoFS is a decentralized distributed object storage integrated with the Neo blockchain
https://fs.neo.org
GNU General Public License v3.0
31 stars 38 forks source link

Should a node validate objects it won't store? #2793

Open carpawell opened 3 months ago

carpawell commented 3 months ago

Now any SN tries to validate and check eACL rules on every request (even if it does not store/will not store an object). Should it do it? Sometimes it cannot even validate smth it does not have access to: https://github.com/nspcc-dev/neofs-node/pull/2792.

Possible Solution

If a node is just a middleware in the chain b/w a client and a server, just do what this node should do (split objects, forward requests, etc) and do not try to act like a target node.

Context

Object content validation is here, while placement creation logic (that can say where to put (mb this node is not part of a container at all)) is in the iteratePlacement function.

Your Environment

5c10c503ce7a9be8f25d53972ace416541c80f75

roman-khimov commented 3 months ago

Non-container nodes better just forward requests and not mess with them.