Closed tahpot closed 1 year ago
Example response from /user/status
:
{
status: 'success',
result: {
databases: 2,
bytes: 58052,
storageLimit: 104857600,
usagePercent: 0.0006
},
signature: '0xb101725aa23e9dc2b51e584f579bdc21f04b956b342c6d0f5ff4a3875993a96e37e6fecf896a2b1be14d3eff0cfa798ec5adcb3cc5918ec1a74522d67874265e1b'
}
Example response from /status
:
{
status: 'success',
results: { maxUsers: 10000, currentUsers: 90, version: '1.2.0' },
signature: '0x43efe05bcb07e6ca0ee2822c8bcf2421f5640107f320404a86e0f36fffde98997604bbead86602f29a3339aa3973c56809c15a6165db1a568727bbd994e37f921c'
}
Support storage nodes setting a storage limit per user's application context and limiting the maximum number of users they support.
This will enable user's to pre-purchase specific amounts of storage capacity that will be enforced by storage nodes.
This can be enforced by checking the storage limit at the following endpoints:
/user/createDatabase
/user/updateDatabase
/auth/connect
This allows a user to obtain a refresh token, but not an access token. The user can also delete databases, but can't create or update them.
Tasks:
/auth/authenticate
will be updated to set a default per user storage limit.env
will be updated to specify the default storage limit for new users (10Mb default)/user/usage
will be updated to include the user's storage limit (in bytes) and utilization percentage_users
collection will store a new fieldstorageLimit
which is the maximum size in bytes the user can store/user/createDatabase
/user/updateDatabase
/auth/connect
.env
will be updated to specify the maximum number of users (10,000 default) for the node/status
that outputs (current version, maximum user count, current user count)Note: A user could exceed the storage limit during a given session, but there's no point as once their access token expires they will no longer have access to the data.
Note: A "user" is actually a combination of DID and application context