Skip to content

Commit a4f8973

Browse files
authored
Update readme (ordinals#399)
- Remove outdated information - Add contributing section - Add `CONTRIBUTING` file
1 parent 335becc commit a4f8973

File tree

2 files changed

+47
-98
lines changed

2 files changed

+47
-98
lines changed

CONTRIBUTING

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Contributing
2+
============
3+
4+
Unless you explicitly state otherwise, any contribution intentionally
5+
submitted for inclusion in the work by you shall be licensed as in
6+
LICENSE, without any additional terms or conditions.

README.md

+41-98
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
# Ordinals
1+
`ord`
2+
=====
23

3-
A scheme for assigning ordinal numbers to satoshis and tracking them across
4-
transactions, and a command-line utility, `ord` for querying information about
5-
ordinals.
4+
`ord` is an ordinal index, block explorer, and command-line ordinal wallet.
65

7-
Ordinal numbers can be used as an addressing scheme for NFTs. In such a scheme,
8-
the NFT creator would create a message that assigned a new NFT Y to the satoshi
9-
with ordinal X. The owner of the UTXO containing the satoshi with ordinal X
10-
owns NFT Y, and can transfer that ownership to another person with a
11-
transaction that sends ordinal Y to a UTXO that the new owner controls. The
12-
current owner can sign a message proving that they own a given UTXO, which also
13-
serves as proof of ownership of all the NFTs assigned to satoshis within that
14-
UTXO.
6+
Ordinals are serial numbers for satoshis, assigned in the order in which they
7+
are mined, and preserved across transactions.
158

169
See [the BIP](bip.mediawiki) for a comprehensive description of the assignment
1710
and transfer algorithm.
@@ -22,101 +15,51 @@ prioritized issues.
2215
Join [the Discord server](https://discord.gg/87cjuz4FYg) to chat with fellow
2316
ordinal degenerates.
2417

25-
## Index and Caveats
18+
Contributing
19+
------------
2620

27-
The `ord` command queries `bitcoind` for block data. Most commands require
28-
`--rpc-url` and `--cookie-file`, which take the URL of a `bitcoind`'s JSON RPC
29-
API and authentication cookie file respectively.
21+
Find an issue you like with the [good first
22+
issue](https://github.com/casey/ord/labels/good%20first%20issue) label. Before
23+
you start working, comment on the issue saying you're interested in working on
24+
it. The issue may already be implemented, out of date, or not fully fleshed
25+
out.
3026

31-
The index is stored in `index.redb`, and should not be concurrently modified
32-
while an instance of `ord` is running, or used by two `ord` instances
33-
simultaneously.
27+
`ord` is extensively tested, and all PRs with new functionality or bug fixes
28+
require tests. Before starting to write code, open a draft PR with failing
29+
tests that demonstrate the functionality to be written, or the bug to be fixed.
30+
This allows the maintainers to make sure that everyone is on the same page, and
31+
that there's a good strategy to test the PR. Once that's done, you can start
32+
writing the actual code.
3433

35-
Currently, reorganizations are detected but not handled, the index is slow to
36-
build and space-inefficient, and the full main chain has not yet been indexed.
34+
`ord` is licensed under the CC0, a no-strings-attached public domain dedication
35+
and fallback license. Your changes must be licensed under the CC0, without any
36+
additional terms or conditions
3737

38-
## Numbering
38+
Running `ord`
39+
-------------
3940

40-
Satoshis are assigned ordinal numbers in the order in which they are mined.
41-
Ordinals start at 0, for the first satoshi of the genesis block, and end with
42-
2099999997689999, the only satoshi mined in block 6929999, the last
43-
subsidy-paying block.
41+
`ord` requires a synced `bitcoind` node with `-txindex` to build the index of
42+
ordinal locations. `ord` communicates with `bitcoind` via RPC.
4443

45-
Ordinals depend only on how many satoshis *could* have been mined in previous
46-
blocks, not how many were *actually* mined.
44+
If `bitcoind` is run locally by the same user, without additional
45+
configuration, `ord` should find it automatically by reading the `.cookie` file
46+
from `bitcoind`'s datadir, and connecting using the default RPC port.
4747

48-
In particular, this means that block 124724, which underpaid the subsidy by one
49-
satoshi, does not reduce the ordinal ranges of subsequent blocks.
48+
If `bitcoind` is not on mainnet, is not run by the same user, has a non-default
49+
datadir, or a non-default port, you'll need to pass additional flags to `ord`.
50+
See `ord --help` for details.
5051

51-
The `range` command gives the half-open range of ordinals that could be mined
52-
in the block at a given height:
52+
Index
53+
-----
5354

54-
```
55-
$ ord range 0
56-
[0,5000000000)
57-
```
55+
The mainnet ordinal index is currently 50 GiB, and will increase in size in the
56+
future, both as the Bitcoin blockchain grows, and as additional tables are
57+
added to the index.
5858

59-
## Transfer
59+
The signet ordinal index is much smaller, clocking in at 1.3 GiB.
6060

61-
The ordinal numbers on satoshis input to a transaction are transferred to the
62-
transaction outputs in first-in-first-out order.
61+
Reorgs
62+
------
6363

64-
Satoshis paid as fees are considered to be inputs to the coinbase transaction,
65-
after an implicit input containing the block subsidy, in the same order that
66-
their parent transactions appear in the block.
67-
68-
If the coinbase transaction underpays the block subsidy or fees, those
69-
satoshis, along with their ordinal numbers, are permanently destroyed.
70-
71-
The `find` command gives the satpoint containing the satoshi with a given
72-
ordinal:
73-
74-
```
75-
$ ord find 0
76-
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0:0
77-
```
78-
79-
A satpoint is an outpoint, that is to say a transaction ID and output index,
80-
followed by the offset into the output itself, and gives the position of the
81-
satoshi within a particular output.
82-
83-
## Traits
84-
85-
Satoshis have traits, based on their ordinal.
86-
87-
NB: Traits should be considered *UNSTABLE* and subject to change.
88-
89-
The `traits` command prints out the traits of the satoshi with the given
90-
ordinal:
91-
92-
```
93-
$ ord traits 0
94-
even
95-
square
96-
cube
97-
luck: 0/1
98-
population: 0
99-
name: nvtdijuwxlo
100-
character: '\u{0}'
101-
shiny
102-
block: 0
103-
```
104-
105-
## Names
106-
107-
Each satoshi is assigned a name, consisting of lowercase ASCII characters,
108-
based on its ordinal. Satoshi 0 has name `nvtdijuwxlo`, and names get shorter
109-
as the ordinal number gets larger. This is to ensure that short names aren't
110-
locked in the genesis block output which is unspendable, and other outputs,
111-
which are unlikely to ever be spent.
112-
113-
The `name` command prints the ordinal of the satoshi with the given name:
114-
115-
```
116-
$ ord name nvtdijuwxlo
117-
0
118-
$ ord name hello
119-
2099999993937872
120-
$ ord name ''
121-
2099999997689999
122-
```
64+
Currently, reorganizations are detected but not handled. After reorgs happen,
65+
you'll need to delete `index.redb` and start over.

0 commit comments

Comments
 (0)