com.r3corda.node.services.persistence / DataVendingService / <init>

# <init>

`DataVendingService(net: MessagingService, storage: StorageService)`

This class sets up network message handlers for requests from peers for data keyed by hash. It is a piece of simple glue that sits between the network layer and the database layer.

Note that in our data model, to be able to name a thing by hash automatically gives the power to request it. There are no access control lists. If you want to keep some data private, then you must be careful who you give its name to, and trust that they will not pass the name onwards. If someone suspects some data might exist but does not have its name, then the 256-bit search space theyd have to cover makes it physically impossible to enumerate, and as such the hash of a piece of data can be seen as a type of password allowing access to it.

Additionally, because nodes do not store invalid transactions, requesting such a transaction will always yield null.