-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Problem
When attempting to initialize NilDbUserClient using create_nil_db_user_client, getting validation errors due to missing required fields in the server response:
pydantic_core._pydantic_core.ValidationError: 2 validation errors for ReadAboutNodeResponse
public_key
Field required [type=missing, input_value={'started': '2025-06-12T0...b-nx8v.nillion.network'}, input_type=dict]
maintenance
Field required [type=missing, input_value={'started': '2025-06-12T0...b-nx8v.nillion.network'}, input_type=dict]
Code That Triggers the Error
import asyncio
from secretvaults.user import create_nil_db_user_client
from nildb_config import NILDB_NODES
async def create_client():
clients = []
for node in NILDB_NODES.values():
# This line fails with validation error
client = await create_nil_db_user_client(node['url'])
clients.append(client)
return clients
asyncio.run(create_client())Root Cause
The create_nil_db_user_client function calls the /about endpoint and expects the response to validate against ReadAboutNodeResponse, but the server response is missing required fields:
public_keymaintenance
The server response only contains:
{
"started": "2025-06-12T...",
"build": {...},
"did": "...",
"url": "https://nildb-nx8v.nillion.network"
}But the SDK expects:
{
"started": "...",
"build": {...},
"did": "...",
"url": "...",
"public_key": "...", // Missing
"maintenance": "..." // Missing
}Expected Solution
- Option 1: Update the server to include the missing fields in the
/aboutendpoint response - Option 2: Update the SDK to make these fields optional in
ReadAboutNodeResponse - Option 3: Provide alternative initialization method that doesn't require the
/aboutendpoint
Environment
- Python 3.12
- secretvaults SDK (latest)
- Ubuntu
- Node URL:
https://nildb-nx8v.nillion.network - User: codingtogetherforever
- Date: 2025-07-24 18:29:05 UTC
Impact
This prevents users from being able to initialize nilDB clients using the documented approach with create_nil_db_user_client.
Metadata
Metadata
Assignees
Labels
No labels