verida / storage-node

ISC License
3 stars 5 forks source link

Users are always created when authenticating #77

Closed tahpot closed 3 months ago

tahpot commented 7 months ago

The authenticate() method always creates a user if they don't exist.

When sending an inbox message, the sender must authenticate with the storage node of the recipient. This code results in a new user being created for the sender, which in turn takes up a storage slot on the node, even though the sender doesn't need any storage capacity.

When the storage node is full, this also means users can't send inbox messages to recipients on that node as there is no capacity for the sender to create a new user... this is bad.

Proposed fix is to modify authenticate() to specify if a user should be created or not, then update the inbox sending code in the protocol to not create a user if sending an inbox message.

tahpot commented 5 months ago

Screenshot_2024-04-05_at_4 25 57_pm

This node is full, so perhaps there's an issue that breaks replication when the node is full as well? Perhaps it's not possible to create the replication user necessary to initiate replication?

tahpot commented 3 months ago

This issue was identified when sending inbox messages. It turns out there was a bug in the SDK causing this issue, so the problem will be resolved there.

https://github.com/verida/verida-js/issues/438