You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Index statistic page.
* List of reserved named without corroborating Nostr events.
* Changelog update, update cargo.toml for v0.2.0.
* Bold the message on the uncorroborated claims screen.
* Clarifying language in the spec.
* Handle edge case where a name is being indexed twice because it was posted with the same NSID twice.
* CHANGELOG.md
* Updating SPEC to remove transfers and added an Appendix for changes and updates.
* Removing transfers from version 0x00
* Limiting names to 43 characters.
* Use Primal.net for user links.
* Index Stats was still using transfer_events table
Copy file name to clipboardexpand all lines: CHANGELOG.md
+13
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Changelog
2
2
3
+
## 0.2.0
4
+
5
+
This release includes a database migration, so make sure to back up your index before upgrading.
6
+
7
+
Features:
8
+
- Transfers have been removed, and names have been limited to 43 characters for vesion `0x00`. They will be enabled in the next version with a better designed.
9
+
- Primal.net is now used to npub links.
10
+
- New page to list blockchain claims for which there are no indexed record events.
11
+
- Index statistic page.
12
+
13
+
Bugs:
14
+
- Fixed a bug where a name was double-indexed because the same `OP_RETURN` was uploaded twice
Copy file name to clipboardexpand all lines: docs/SPEC.md
+13-11
Original file line number
Diff line number
Diff line change
@@ -14,28 +14,29 @@ Indexers (like a DNS name server) link on-chain claims to published Nostr events
14
14
15
15
### Blockchain
16
16
17
-
In order to claim a name, publish an output to the bitcoin blockchain in this format: `OP_RETURN <VERSION><TRANSACTION TYPE><NAME FINGERPRINT><NAMESPACE ID>`. All names have an associated owner, which just a private/public keypair. Public keys are always 32-byte X-Only Public Keys used everywhere in Nostr and Bitcoin Schnorr signatures.
17
+
In order to claim a name, publish an output to the bitcoin blockchain in this format: `OP_RETURN NOM <VERSION> <TRANSACTION TYPE> <NAME FINGERPRINT> <NAMESPACE ID>`. The spaces are for readability and not significant. Do not include spaces in the final `OP_RETURN`. All names have an associated owner, which just a private/public keypair. Public keys are always 32-byte X-Only Public Keys used everywhere in Nostr and Bitcoin Schnorr signatures.
18
+
19
+
`NOM` is just the byte string "NOM", a tag indicator to let the indexer know this ia Nomen output.
18
20
19
21
`VERSION` is reserved for future use, for incompatible changes to the protocol, or unlocking additional namespace. It is one byte and must currently be `0x00`.
20
22
21
23
`TRANSACTION TYPE` represents the type of claim being made on chain. It is one byte. It may be `0x00` which represents a new name being claimed, or `0x01` which represents an ownership change of the name (owned by a new keypair).
22
24
23
25
`NAME FINGERPRINT` is the first five bytes of the HASH-160 of the name. The purpose is to allow a name to be verified as unreserved, even if a Nostr event cannot be found to prove it.
24
26
25
-
`NAMESPACE ID` represents a HASH-160 (20-byte) hash of the ownership information for this name. If the `TRANSACTION TYPE` is `0x00` (new name) then the `NAMESPACE ID` is the HASH-160 of `<NAME><OWNER PUBKEY>`. If the `TRANSACTION TYPE`is `0x01` (ownership change), then the `NAMESPACE ID` is the HASH-160 of `<NAME><NEW OWNER PUBKEY>`.
27
+
`NAMESPACE ID` represents a HASH-160 (20-byte) hash of the ownership information for this name. If the `TRANSACTION TYPE` is `0x00` (new name) then the `NAMESPACE ID` is the HASH-160 of `<NAME><OWNER PUBKEY>`. Please be aware that the pubkey is a 32-byte byte string of the pubkey, not any textual representation such as bech32 or hexadecimal.
26
28
27
29
**Note:** The owner of the Bitcoin UTXO that generated the `OP_RETURN`, or the amount in the UTXO, do not matter. Bitcoin, in this case, is being utilized only as a decentralized timestamp server. The only thing that matters is the order of transaction outputs.
28
30
29
31
### Nostr
30
32
31
33
Nostr is the propogation layer of the protocol. The only required information on-chain is the information necessary to determination ownership of a name, and that is only in a shortened hash form.
32
34
33
-
There are currently three types of Nostr events. These are all parameterized replaceable events (all events are idempotent and thus replaceable).
35
+
There is one new kind of Nostr event. It is a parameterized replaceable event (all events are idempotent and thus replaceable).
| 38300 | NAME | Matches `0x00` tranaction type. Publishes records for a name. |
38
-
| 38301 | TRANSFER NAME | Match to `0x01` transaction type |
39
40
40
41
#### New Name
41
42
@@ -45,19 +46,13 @@ When the records need to be updated, the owner may just publish another name eve
45
46
46
47
**Note:** When receiving new events, and indexer should recalculate the namespace ID and compare to the `d` tag to validate the event, then use the namespace ID to link to blockchain for correct ordering. Indexers should also treat any blockchain transactions with mis-matching name fingerprints as invalid.
47
48
48
-
#### Transfer
49
-
50
-
After publishing a `0x01` transfer transaction, publish a `38301` kind Nostr event. The `d` tag for the event should be the lower case hex representation of the `NAMESPACE ID` published to the blockchain. Additionally, there should be a `nom` tag with the `name` value as the parameter. `content` must be lowercase hex encoded value of the pubkey of the **_new_** owner. The published event must be signed by the current owner of the name, in order to properly establish chain of custody.
51
-
52
-
**Note:** When receiving new events, and indexer should recalculate the namespace ID and compare to the `d` tag to validate the event, then use the namespace ID to link to blockchain for correct ordering. Unlike publishing new names, the namespace ID in this case is not constructed from the pubkey of the original owner, but the pubkey of the **_new_** owner.
53
-
54
49
## Appendix A: Name format
55
50
56
51
It is necessary to limit the characters used in names. While it might be tempting to allow any valid UTF-8 string, there are good reasons not to do this. In the Unicode standards, there are sometimes different ways to the construct the same character, invisible characters, or "whitespace" characters that may not necessarily be rendered, etc. This could allow for malicious individuals to trick unsuspecting users into clicking/pasting incorrect names.
57
52
58
53
While it is desirable to have a wide range of characters and languages be usable, for the time being it is necessary to restrict the use of characters to the basic characters typically used in domain names today.
59
54
60
-
Names must match the following regular expression `[0-9a-z\-]{3,256}` and must be ignored by indexers otherwise.
55
+
Names must match the following regular expression `[0-9a-z\-]{3,43}` and must be ignored by indexers otherwise.
61
56
62
57
## Appendix B: Protocol expansion
63
58
@@ -88,3 +83,10 @@ There are no restrictions on key/value pairs, but they are recommended by conven
88
83
|`WEB`| Full link for website (not necessarily the same as `DNS`) |
89
84
90
85
Others may arise later by addition or general public acceptance. The above listed are not required, but if the owner wishes to include any of this data in their records, it is recommended to use the above keys.
86
+
87
+
## Appendix ZZ: Changes and Updates
88
+
89
+
**2023-09-19**:
90
+
- Given the issues cited [here](https://github.com/ursuscamp/nomen/issues/6), the design of transfers in `0x00` is not good and has been removed. As of the time of publication, no transfers have been issued by any users, so this is a not a breaking change.
91
+
- A new version will be issued which will enable transfers, and an upgrade path will be available for version `0x00` names to `0x01` names. However, in order to link the `0x00` to `0x01` names on chain, the upgrade transaction will require the names to be put on chain in plain text, necessitating limiting them to a maximum of 43 bytes for now (80 byte OP_RETURN maximum - 5 bytes for Nomen metadata - 32 bytes for a public key). As of the time of publication, no names longer than 43 bytes have been issued, so this is a non-breaking change.
0 commit comments