Skip to content

Commit

Permalink
added semantic versioning, abstracts and motivations.
Browse files Browse the repository at this point in the history
  • Loading branch information
vilenarios committed Sep 1, 2024
1 parent 1421483 commit f5acb99
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 168 deletions.
68 changes: 44 additions & 24 deletions arns/arns-core-01.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
# ARNS-CORE-01
# ARNS-CORE-1

## Overview
## Status:

The core Arweave Name specification for an AO process contains the specific details required by AR.IO Gateways to resolve the corresponding ArNS names and their Arweave Transaction IDs. This is the most basic building block and is primarily meant to be layered on top of or below other functionality.
**Draft**

## Language of Implementation
## Version:

| Version | Description | Date |
| ------- | ----------------------------------------------------- | ---------- |
| 1.0.0 | Initial version of the **ARNS-CORE-1** specification. | 2024-09-01 |

## Abstract

The **ARNS-CORE-1** specification defines the foundational processes required for resolving Arweave Name System (ArNS) names to their corresponding Arweave Transaction IDs and Owners. It provides the essential framework upon which other functionalities and extensions are built, ensuring consistent name resolution across the AR.IO network.

## Motivation

The **ARNS-CORE-1** specification provides the essential building blocks for resolving Arweave Names within the Arweave Name System (ArNS). It defines the minimal structure and processes needed to map human-readable names to Arweave Transaction IDs, ensuring consistent and reliable name resolution across AR.IO gateways.

This specification establishes a standardized record format and a set of core handlers that are crucial for any ArNS implementation. By adhering to these foundational requirements, developers can build additional functionalities on top of a stable and predictable resolution framework, ensuring interoperability and ease of use within the Arweave ecosystem.

### Language of Implementation

All examples and code snippets in this specification are written in Lua. This choice ensures compatibility with the AO Processes and the Arweave ecosystem.

However, developers are not restricted to using Lua exclusively when building new features or extending functionalities around ArNS. While Lua is recommended for direct integration with existing infrastructure, other programming languages can be used, provided they adhere to the protocols and specifications outlined in this document.

## Specification Requirements
## Specification

The **ARNS-CORE-01** Specification includes the following requirements for valid, resolvable Records:
### Overview

The **ARNS-CORE-1** Specification includes the following requirements for valid, resolvable Records:

**Records Table**:

Expand All @@ -32,24 +50,24 @@ The **ARNS-CORE-01** Specification includes the following requirements for valid
- Must include handlers to read a single `Record` and multiple `Records`.
- Must include a handler to read the `State` of the ANP, which includes all `Records` and the current `Owner`.

## Resolvability
**Resolvability**:

Arweave Name owners can configure their process code and parameters as they wish, but all of the above rules are also enforced at each ArNS Name Resolver that is part of AR.IO Gateways.

Primarily, any Arweave Name that is to be resolved by the AR.IO Network must have an active registration in the ArNS Registry. Additionally, Records within the Arweave Name process must be valid, or else ArNS Resolvers or AR.IO Gateways may not resolve them.

ANTs may not be resolvable under the following scenarios:
Arweave Names may not be resolvable under the following scenarios:

- Poor performing code.
- Invalid records or malformed state.
- Broken handlers, incorrect handler responses, or conflicting process code.
- Subdomains exceeding the amount paid for (registered) within the ArNS Registry.

## Objects
### Objects

The **ARNS-CORE-01** specification includes all the objects needed to support ArNS Name resolution.
The **ARNS-CORE-1** specification includes all the objects needed to support ArNS Name resolution.

### ARNS-CORE-01 Objects
#### ARNS-CORE-1 Objects

```
Records = Records or {
Expand All @@ -60,9 +78,11 @@ Records = Records or {
}
```

## Handler Action Map, Parameters, and Responses
### Handlers

#### Action Map

The following actions are handled in the **ARNS-CORE-01** specification:
The following actions are handled in the **ARNS-CORE-1** specification:

```
ARNSCoreSpecActionMap = {
Expand All @@ -73,23 +93,23 @@ ARNSCoreSpecActionMap = {
}
```

### Record
#### Record

Retrieves the ID and time to live (seconds) for an undername contained in the `Records` table. Executable by anonymous users.

#### Parameters
##### Parameters

| Name | Type | Description |
| ---------- | ------ | ------------------------------------------------------------------------- |
| Sub-Domain | string | The undername record to retrieve, e.g., `@`, `ardrive`, or `dapp_ardrive` |

#### Rules
##### Rules

- Must specify a valid `Sub-Domain` parameter (string) as a message tag.
- The name must exist in the `Records` table.
- Must add `X-`forwarded tags to the response notice.

#### Action
##### Action

```
Send({
Expand All @@ -99,7 +119,7 @@ Send({
})
```

#### Responses
##### Responses

**Invalid Record**

Expand All @@ -125,23 +145,23 @@ Send({
}
```

### State
#### State

Returns specific information about the state of the **ARNS-CORE-01** process, including all `Records` and its current `Owner`. Executable by anonymous users.
Returns specific information about the state of the **ARNS-CORE-1** process, including all `Records` and its current `Owner`. Executable by anonymous users.

#### Parameters
##### Parameters

No parameters necessary.

#### Rules
##### Rules

- Must return a state object as JSON in the data field of the response notice.
- The state object must include:
- The entire `Records` table as JSON.
- The current process `Owner`.
- Must add `X-`forwarded tags to the response notice.

#### Action
##### Action

```
Send({
Expand All @@ -150,7 +170,7 @@ Send({
})
```

#### Responses
##### Responses

**Valid `State`**

Expand Down
Loading

0 comments on commit f5acb99

Please sign in to comment.