Overview
This proposal suggests establishing a standard for offchain subname gateways to publish subname events to OrbisDB (a decentralized database on the Ceramic Network). By standardizing how these events are published, offchain subnames can become first-class citizens in the ENS ecosystem with capabilities previously limited to onchain names, while enabling reliable and efficient indexing.
Motivation
Offchain subnames provide scalability and cost benefits but currently exist in isolated silos, with each gateway storing data in separate databases that can only be accessed through gateway-specific APIs, making ecosystem-wide discoverability and integration challenging. By standardizing the publication of offchain subname events to a decentralized database like OrbisDB, we can:
- Enable offchain subnames to become full âfirst-class citizensâ in ENS with capabilities similar to that of onchain names
- Allow for reliable and efficient indexing of offchain subnames
- Create consistency across different gateway implementations
- Enhance discoverability and usability of offchain subnames
Specification
This standard proposes that all offchain subname gateways publish events to OrbisDB on the Ceramic Network in a standardized format that captures the three key states of a subname:
Event Types
Events can be broken down into three types:
SUBDOMAIN_CREATED
: When a subname is initially createdSUBDOMAIN_UPDATED
: When a subnameâs records or other properties are modifiedSUBDOMAIN_DELETED
: When a subname is deleted
Data Structure
Events would be published with the following standard structure:
{
"controller": "[controller address in did:pkh format]",
"payload": {
"ensName": "[parent domain]",
"subdomainName": "[subname]",
"chainId": 1,
"metadata": {
"contentHash": "",
"addresses": [{
"address": "[ethereum address]",
"coinType": 60
}],
"textRecords": [
{
"key": "[record key]",
"value": "[record value]"
}
]
}
},
"createdAt": "[timestamp]",
"eventType": "[SUBDOMAIN_CREATED|SUBDOMAIN_UPDATED|SUBDOMAIN_DELETED]",
"indexed_at": "[indexing timestamp]"
}
For SUBDOMAIN_DELETED
events, only the ensName
, subdomainName
, and chainId
fields are required in the payload.
Why OrbisDB
OrbisDB was selected as the recommended database solution for this standard for several compelling reasons:
- Decentralization: As a database built on the Ceramic Network, OrbisDB aligns with ENSâs ethos of reducing central points of failure. This ensures that offchain subname data remains resilient and censorship-resistant.
- Permissionless Access: Any service can read from OrbisDB without special permissions or API keys, ensuring that subname data remains openly accessible to all ecosystem participants.
- Verifiable Publication: OrbisDB leverages DIDs (Decentralized Identifiers) for authentication, allowing gateway operators to sign their published events. This creates a verifiable trail of subname operations that can be cryptographically validated.
- Scalability: OrbisDB is designed to handle high throughput of events, which is crucial for supporting the potentially large volume of offchain subname operations across the ENS ecosystem.
- SQL Capabilities: OrbisDB provides SQL query capabilities, making it easier for developers to efficiently query and filter subname data.
Implementation Example
We have already implemented this standard at JustaName, demonstrating its feasibility. A complete implementation showing all three event types (creation, updates, and deletion) is available and can be viewed at status.justaname.id. This public dashboard provides a live view of our offchain subname events as theyâre published to OrbisDB, maintaining the consistent data structure described in this specification.
Benefits
For ENS Users
- Greater consistency in how offchain subnames function across various services
- Improved discoverability of offchain subnames
- More reliable resolution of offchain subnames
For Developers
- Easier integration with offchain subnames through standardized indexing (ENSNode)
- Ability to build applications that can interact with both onchain and offchain subnames consistently
- Reduced development overhead when working with multiple offchain subname providers
For the ENS Ecosystem
- Enhanced capabilities for offchain subnames to match those of onchain subnames
- Improved scalability of the ENS ecosystem through efficient offchain solutions
- Establishment of best practices for offchain data publication
Next Steps
If this temp check receives favorable feedback, the next step would be to:
- Draft the specification as an ENS Improvement Proposal (ENSIP)
- Create documentation and tools to help gateways implement the standard
- Assist indexers, mainly ENSNode, in implementing support for indexing these standardized events
Questions for the Community
- Are there additional fields or event types that should be included in the standard?
- Should we consider other decentralized databases beyond OrbisDB/Ceramic?
- What tooling would be helpful to facilitate adoption of this standard?
- Whatâs the best approach for sharing and discovering gateway-specific OrbisDB identifiers to ensure consistent access to each gatewayâs events? Should we create a central registry, use ENS records to store this information, or implement another discovery mechanism?