Skip to content

Commit

Permalink
Use "sat" in place of "ordinal" (#979)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Dec 16, 2022
1 parent e6f4b38 commit 0b0561e
Show file tree
Hide file tree
Showing 56 changed files with 736 additions and 795 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ord"
description = "Bitcoin satoshi ordinal number utility"
description = "Bitcoin ordinal theory utility"
version = "0.2.1"
license = "CC0-1.0"
edition = "2021"
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

`ord` is an index, block explorer, and command-line wallet.

Ordinals are serial numbers for satoshis, assigned in the order in which they
are mined, and preserved across transactions.
Ordinal theory imbues satoshis with numismatic value, allowing them to
collected and traded as curios.

Ordinal numbers are serial numbers for satoshis, assigned in the order in which
they are mined, and preserved across transactions.

See [the BIP](bip.mediawiki) for a comprehensive description of the assignment
and transfer algorithm.
Expand Down Expand Up @@ -38,7 +41,7 @@ Syncing
-------

`ord` requires a synced `bitcoind` node with `-txindex` to build the index of
ordinal locations. `ord` communicates with `bitcoind` via RPC.
satoshi locations. `ord` communicates with `bitcoind` via RPC.

If `bitcoind` is run locally by the same user, without additional
configuration, `ord` should find it automatically by reading the `.cookie` file
Expand Down
36 changes: 0 additions & 36 deletions ROADMAP.md

This file was deleted.

2 changes: 1 addition & 1 deletion bin/graph
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Block:

pat = re.compile(
'''Block (?P<height>[0-9]+) at.*with (?P<transactions>[0-9]+) transactions.*
.*Wrote (?P<ranges>[0-9]+) ordinal ranges from .* outputs in (?P<time>[0-9]+) ms'''
.*Wrote (?P<ranges>[0-9]+) sat ranges from .* outputs in (?P<time>[0-9]+) ms'''
)

blocks = [
Expand Down
2 changes: 1 addition & 1 deletion docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- [Guides](guides.md)
- [Explorer](guides/explorer.md)
- [Inscriptions](guides/inscriptions.md)
- [Ordinal Hunting](guides/ordinal-hunting.md)
- [Sat Hunting](guides/sat-hunting.md)
- [Bounties](bounties.md)
- [Bounty 0: 100,000 sats Claimed!](bounty/0.md)
- [Bounty 1: 200,000 sats Claimed!](bounty/1.md)
Expand Down
11 changes: 6 additions & 5 deletions docs/src/bounties.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ Ordinal Bounty Hunting Hints
ordinal theory is extremely simple. A clever hacker should be able to write
code from scratch to manipulate satoshis using ordinal theory in no time.

- For more information about ordinals, check out the [FAQ](./faq.md) for an
overview, the [BIP](https://github.com/casey/ord/blob/master/bip.mediawiki)
for the technical details, and the [ord repo](https://github.com/casey/ord)
for the `ord` wallet and block explorer.
- For more information about ordinal theory, check out the [FAQ](./faq.md) for
an overview, the
[BIP](https://github.com/casey/ord/blob/master/bip.mediawiki) for the
technical details, and the [ord repo](https://github.com/casey/ord) for the
`ord` wallet and block explorer.

- Satoshi was the original developer of ordinal theory. However, he knew that
others would consider it heretical and dangerous, so he hid his knowledge,
and it was lost to the sands of time. This potent theory is only now being
rediscovered. You can help by researching rare ordinals.
rediscovered. You can help by researching rare satoshis.

Good luck and godspeed!
4 changes: 2 additions & 2 deletions docs/src/bounty/0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Ordinal Bounty 0
Criteria
--------

Send an ordinal whose number ends with a zero to the submission address:
Send a sat whose ordinal number ends with a zero to the submission address:

✅: [1857578125803250](https://ordinals.com/ordinal/1857578125803250)

❌: [1857578125803251](https://ordinals.com/ordinal/1857578125803251)

The ordinal must be the first ordinal of the output you send.
The sat must be the first sat of the output you send.

Reward
------
Expand Down
4 changes: 2 additions & 2 deletions docs/src/bounty/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Ordinal Bounty 1
Criteria
--------

The transaction that submits a UTXO containing the oldest ordinal, i.e., that
with the lowest number, amongst all submitted UTXOs will be judged the winner.
The transaction that submits a UTXO containing the oldest sat, i.e., that with
the lowest number, amongst all submitted UTXOs will be judged the winner.

The bounty is open for submissions until block 753984—the first block of
difficulty adjustment period 374. Submissions included in block 753984 or later
Expand Down
6 changes: 3 additions & 3 deletions docs/src/bounty/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Ordinal Bounty 2
Criteria
--------

Send an <span class=uncommon>uncommon</span> ordinal to the submission address:
Send an <span class=uncommon>uncommon</span> sat to the submission address:

✅: [347100000000000](https://ordinals.com/ordinal/347100000000000)
✅: [347100000000000](https://ordinals.com/sat/347100000000000)

❌: [6685000001337](https://ordinals.com/ordinal/6685000001337)
❌: [6685000001337](https://ordinals.com/sat/6685000001337)

Confirm that the submission address has not received transactions before submitting your entry. Only the first successful submission will be rewarded.

Expand Down
17 changes: 8 additions & 9 deletions docs/src/bounty/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Ordinal bounty 3 has two parts, both of which are based on *ordinal names*.
Ordinal names are a modified base-26 encoding of ordinal numbers. To avoid
locking short names inside the unspendable genesis block coinbase reward,
ordinal names get *shorter* as the ordinal number gets *longer*. The name of
ordinal 0, the first ordinal to be mined is `nvtdijuwxlp` and the name of
ordinal 2,099,999,997,689,999, the last ordinal to be mined, is `a`.
sat 0, the first sat to be mined is `nvtdijuwxlp` and the name of sat
2,099,999,997,689,999, the last sat to be mined, is `a`.

The bounty is open for submissions until block 840000—the first block after the
fourth halvening. Submissions included in block 840000 or later will not be
Expand All @@ -18,9 +18,8 @@ considered.
Both parts use [frequency.tsv](frequency.tsv), a list of words and the number
of times they occur in the [Google Books Ngram
dataset](http://storage.googleapis.com/books/ngrams/books/datasetsv2.html).
filtered to only include the names of ordinals which will have been mined by
the end of the submission period, that appear at least 5000 times in the
corpus.
filtered to only include the names of sats which will have been mined by the
end of the submission period, that appear at least 5000 times in the corpus.

`frequency.tsv` is a file of tab-separated values. The first column is the
word, and the second is the number of times it appears in the corpus. The
Expand All @@ -30,8 +29,8 @@ occurring.
`frequency.tsv` was compiled using [this
program](https://github.com/casey/onegrams).

To search an ordinal wallet for ordinals with a name in `frequency.tsv`, use
the following [`ord`](https://github.com/casey/ord) command:
To search an `ord` wallet for sats with a name in `frequency.tsv`, use the
following [`ord`](https://github.com/casey/ord) command:

```
ord wallet satoshis --tsv frequency.tsv
Expand All @@ -41,15 +40,15 @@ ord wallet satoshis --tsv frequency.tsv

*Rare sats pair best with rare words.*

The transaction that submits the UTXO containing the ordinal whose name appears
The transaction that submits the UTXO containing the sat whose name appears
with the lowest number of occurrences in `frequency.tsv` shall be the winner of
part 0.

### Part 1

*Popularity is the font of value.*

The transaction that submits the UTXO containing the ordinal whose name appears
The transaction that submits the UTXO containing the sat whose name appears
with the highest number of occurrences in `frequency.tsv` shall be the winner
of part 1.

Expand Down
10 changes: 5 additions & 5 deletions docs/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ artifacts.
How does ordinal theory work?
-----------------------------

Ordinal number are assigned to satoshis in the ordinal in which they are mined.
Ordinal numbers are assigned to satoshis in the order in which they are mined.
The first satoshi in the first block has ordinal number 0, the second has
ordinal number 1, and the last satoshi of the first block has ordinal number
4,999,999,999.
Expand Down Expand Up @@ -91,8 +91,8 @@ Where can I find the nitty-gritty details?

[The BIP!](https://github.com/casey/ord/blob/master/bip.mediawiki)

Why are ordinal inscriptions called "digital artifacts" instead of "NFTs"?
--------------------------------------------------------------------------
Why are sat inscriptions called "digital artifacts" instead of "NFTs"?
----------------------------------------------------------------------

An inscription is an NFT, but the term "digital artifact" is used instead,
because it's simple, suggestive, and familiar.
Expand All @@ -105,8 +105,8 @@ Additionally, "NFT" feels like financial terminology, and the both word
"fungible" and sense of the word "token" as used in "NFT" is uncommon outside
of financial contexts.

How do ordinal inscriptions compare to…
---------------------------------------
How do sat inscriptions compare to…
-----------------------------------

### Ethereum NFTs?

Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Ordinal Theory Guides
=====================

See the the table of contents for a list of guides, including a guide to the
explorer, a guide for ordinal hunters, and a guide to inscriptions.
explorer, a guide for sat hunters, and a guide to inscriptions.
4 changes: 2 additions & 2 deletions docs/src/guides/explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ the genesis block coinbase transaction:

[4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0](https://ordinals.com/search/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0)

### Ordinal
### Sats

Ordinals can be searched by integer, their position within the entire bitcoin
Sats can be searched by integer, their position within the entire bitcoin
supply:

[2099994106992659](https://ordinals.com/search/2099994106992659)
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions docs/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ name, *ordinals*.
Technical details are available in [the
BIP](https://github.com/casey/ord/blob/master/bip.mediawiki).

Ordinals do not require a separate token, another blockchain, or any changes to
Bitcoin. They work right now.
Ordinal theory does not require a separate token, another blockchain, or any
changes to Bitcoin. It works right now.

Ordinal numbers have a few different representations:

- *Integer notation*:
[`2099994106992659`](https://ordinals.com/ordinal/2099994106992659) The
[`2099994106992659`](https://ordinals.com/sat/2099994106992659) The
ordinal number, assigned according to the order in which the satoshi was
mined.

- *Decimal notation*:
[`3891094.16797`](https://ordinals.com/ordinal/3891094.16797) The first
[`3891094.16797`](https://ordinals.com/sat/3891094.16797) The first
number is the block height in which the satoshi was mined, the second the
offset of the satoshi within the block.

- *Degree notation*:
[`3°111094′214″16797‴`](https://ordinals.com/ordinal/3%C2%B0111094%E2%80%B2214%E2%80%B316797%E2%80%B4).
[`3°111094′214″16797‴`](https://ordinals.com/sat/3%C2%B0111094%E2%80%B2214%E2%80%B316797%E2%80%B4).
We'll get to that in a moment.

- *Percentile notation*:
[`99.99971949060254%`](https://ordinals.com/ordinal/99.99971949060254%25) .
[`99.99971949060254%`](https://ordinals.com/sat/99.99971949060254%25) .
The satoshi's position in Bitcoin's supply, expressed as a percentage.

- *Name*: [`satoshi`](https://ordinals.com/ordinal/satoshi). An encoding of the
- *Name*: [`satoshi`](https://ordinals.com/sat/satoshi). An encoding of the
ordinal number using the characters `a` through `z`.

Arbitrary assets, such as NFTs, security tokens, accounts, or stablecoins can
Expand Down
14 changes: 7 additions & 7 deletions src/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ pub(crate) struct Decimal {
offset: u64,
}

impl From<Ordinal> for Decimal {
fn from(ordinal: Ordinal) -> Self {
impl From<Sat> for Decimal {
fn from(sat: Sat) -> Self {
Self {
height: ordinal.height(),
offset: ordinal.third(),
height: sat.height(),
offset: sat.third(),
}
}
}
Expand All @@ -28,21 +28,21 @@ mod tests {
#[test]
fn decimal() {
assert_eq!(
Ordinal(0).decimal(),
Sat(0).decimal(),
Decimal {
height: Height(0),
offset: 0
}
);
assert_eq!(
Ordinal(1).decimal(),
Sat(1).decimal(),
Decimal {
height: Height(0),
offset: 1
}
);
assert_eq!(
Ordinal(2099999997689999).decimal(),
Sat(2099999997689999).decimal(),
Decimal {
height: Height(6929999),
offset: 0
Expand Down
12 changes: 6 additions & 6 deletions src/degree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ impl Display for Degree {
}
}

impl From<Ordinal> for Degree {
fn from(ordinal: Ordinal) -> Self {
let height = ordinal.height().n();
impl From<Sat> for Degree {
fn from(sat: Sat) -> Self {
let height = sat.height().n();
Degree {
hour: height / (CYCLE_EPOCHS * SUBSIDY_HALVING_INTERVAL),
minute: height % SUBSIDY_HALVING_INTERVAL,
second: height % DIFFCHANGE_INTERVAL,
third: ordinal.third(),
third: sat.third(),
}
}
}
Expand All @@ -34,9 +34,9 @@ impl From<Ordinal> for Degree {
mod tests {
use super::*;

fn case(ordinal: u64, hour: u64, minute: u64, second: u64, third: u64) {
fn case(sat: u64, hour: u64, minute: u64, second: u64, third: u64) {
assert_eq!(
Degree::from(Ordinal(ordinal)),
Degree::from(Sat(sat)),
Degree {
hour,
minute,
Expand Down
Loading

0 comments on commit 0b0561e

Please sign in to comment.