diff --git a/.github/workflows/book.yaml b/.github/workflows/book.yaml new file mode 100644 index 0000000000..23172fd305 --- /dev/null +++ b/.github/workflows/book.yaml @@ -0,0 +1,42 @@ +name: Book + +on: + pull_request: + branches: + - master + push: + branches: + - master + +defaults: + run: + shell: bash + +jobs: + book: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.0.0 + + - uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: latest + + - name: Install mdbook-linkcheck + run: | + mkdir -p mdbook-linkcheck + cd mdbook-linkcheck + wget https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip + unzip mdbook-linkcheck.x86_64-unknown-linux-gnu.zip + chmod +x mdbook-linkcheck + pwd >> $GITHUB_PATH + + - run: mdbook build book + + - name: Deploy Pages + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/master' + with: + github_token: ${{secrets.GITHUB_TOKEN}} + publish_branch: gh-pages + publish_dir: book/build diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml deleted file mode 100644 index 9ecb08eba8..0000000000 --- a/.github/workflows/build-docs.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Build Docs - -on: - pull_request: - branches: - - master - -defaults: - run: - shell: bash - -jobs: - build-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.0.0 - - uses: shalzz/zola-deploy-action@v0.16.1 - env: - BUILD_DIR: docs - BUILD_ONLY: true - BUILD_FLAGS: --drafts diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml deleted file mode 100644 index d28b558acd..0000000000 --- a/.github/workflows/deploy-docs.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Deploy Docs - -on: - push: - branches: - - master - -defaults: - run: - shell: bash - -jobs: - deploy-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.0.0 - - uses: shalzz/zola-deploy-action@v0.16.1 - env: - BUILD_DIR: docs - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 7a8fcf4170..dc28d04a4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /.idea/ /.vagrant /benchmark +/book/build /docs/public /index.lmdb /index.redb diff --git a/book/book.toml b/book/book.toml new file mode 100644 index 0000000000..7b9ca585d6 --- /dev/null +++ b/book/book.toml @@ -0,0 +1,15 @@ +[book] +title = "Ordinal Hunter's Manual" +language = "en" +multilingual = false +src = "src" + +[build] +build-dir = "build" +create-missing = false + +[output.html] +cname = "docs.ordinals.com" +git-repository-url = "https://github.com/casey/ord" + +[output.linkcheck] diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md new file mode 100644 index 0000000000..c6d345e2de --- /dev/null +++ b/book/src/SUMMARY.md @@ -0,0 +1,10 @@ +# Summary + +- [Theory](./theory.md) +- [FAQ](./faq.md) +- [Ordinal Hunting](./hunting.md) + +- [Bounties](./bounty.md) + - [Bounty 0: 100,000 sats Claimed!](./bounty/0.md) + - [Bounty 1: 200,000 sats Claimed!](./bounty/1.md) + - [Bounty 2: 300,000 sats](./bounty/2.md) diff --git a/docs/content/bounty/_index.md b/book/src/bounty.md similarity index 75% rename from docs/content/bounty/_index.md rename to book/src/bounty.md index 0f45a64e58..cbe914e200 100644 --- a/docs/content/bounty/_index.md +++ b/book/src/bounty.md @@ -1,21 +1,13 @@ -+++ -title = "Ordinal Bounties" -page_template = "bounty.html" -template = "bounties.html" -sort_by = "date" -aliases = ["bounties"] -+++ - -Hints ------ +Ordinal Bounty Hunting Hints +============================ - There are no ordinal wallets or transaction construction libraries. However, ordinal theory is extremely simple. A clever hacker should be able to write code to manipulate ordinals in no time. -- For more information about ordinals, check out the [FAQ](/faq) for an +- 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 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 diff --git a/docs/content/bounty/0.md b/book/src/bounty/0.md similarity index 85% rename from docs/content/bounty/0.md rename to book/src/bounty/0.md index 7b9e751c89..1b4ac95d7b 100644 --- a/docs/content/bounty/0.md +++ b/book/src/bounty/0.md @@ -1,10 +1,5 @@ -+++ -title = "Ordinal Bounty 0" -date = 2022-08-19 -[extra] -claimed = true -reward = "100,000 sats" -+++ +Ordinal Bounty 0 +================ Criteria -------- diff --git a/docs/content/bounty/1.md b/book/src/bounty/1.md similarity index 86% rename from docs/content/bounty/1.md rename to book/src/bounty/1.md index a02655fcc2..9373abc2dd 100644 --- a/docs/content/bounty/1.md +++ b/book/src/bounty/1.md @@ -1,10 +1,5 @@ -+++ -title = "Ordinal Bounty 1" -date = 2022-08-24 -[extra] -claimed = true -reward = "200,000 sats" -+++ +Ordinal Bounty 1 +================ Criteria -------- diff --git a/docs/content/bounty/2.md b/book/src/bounty/2.md similarity index 85% rename from docs/content/bounty/2.md rename to book/src/bounty/2.md index b3236aa192..5f25d4d963 100644 --- a/docs/content/bounty/2.md +++ b/book/src/bounty/2.md @@ -1,10 +1,5 @@ -+++ -title = "Ordinal Bounty 2" -date = 2022-10-03 -[extra] -claimed = false -reward = "300,000 sats" -+++ +Ordinal Bounty 2 +================ Criteria -------- diff --git a/docs/content/faq.md b/book/src/faq.md similarity index 99% rename from docs/content/faq.md rename to book/src/faq.md index 448225ee99..39173d07e1 100644 --- a/docs/content/faq.md +++ b/book/src/faq.md @@ -1,6 +1,6 @@ -+++ -title = "FAQ" -+++ +Ordinal FAQ +=========== + How many ordinals will there be? -------------------------------- diff --git a/docs/content/hunting.md b/book/src/hunting.md similarity index 99% rename from docs/content/hunting.md rename to book/src/hunting.md index b1caeda4f0..eb275c150c 100644 --- a/docs/content/hunting.md +++ b/book/src/hunting.md @@ -1,6 +1,5 @@ -+++ -title = "Ordinal Hunting" -+++ +Ordinal Hunting +=============== Ordinal hunting is difficult but rewarding. The feeling of owning a wallet full of UTXOs, redolent with the scent of rare and exotic ordinals, is beyond diff --git a/book/src/theory.md b/book/src/theory.md new file mode 100644 index 0000000000..9a265b7cd6 --- /dev/null +++ b/book/src/theory.md @@ -0,0 +1,255 @@ +Ordinal Theory +============== + +Ordinals are numbering scheme for satoshis that allows tracking and +transferring individual sats. These numbers are called +[ordinals](https://ordinals.com). Satoshis are numbered in the order in which +they're mined, and transferred from transaction inputs to transaction outputs +in first-in-first-out order. More details are available in [the +BIP](https://github.com/casey/ord/blob/master/bip.mediawiki). + +Ordinals don't require a separate token, another blockchain, or any changes to +Bitcoin. They work right now. + +Ordinals have a few different representations: + +- *Integer notation*: + [`2099994106992659`](https://ordinals.com/ordinal/2099994106992659). The + number is the ordinal number, and the "°" is the Romance language ordinal + symbol. + +- *Decimal notation*: + [`3891094.16797`](https://ordinals.com/ordinal/3891094.16797)The first number + is the block height in which the ordinal was created, the second the offset + of the ordinal 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). + We'll get to that in a moment. + +- *Percentile notation*: + [`99.99971949060254%`](https://ordinals.com/ordinal/99.99971949060254%25) . + The ordinals position in Bitcoin's supply, expressed as a percentage. + +- *Name*: [`satoshi`](https://ordinals.com/ordinal/satoshi). + +Arbitrary assets, such as NFTs, security tokens, accounts, or stablecoins can +be attached to Ordinals. + +Ordinals is an open-source project, developed [on +GitHub](https://github.com/casey/ord). The project consists of a BIP describing +the ordinal scheme, an index that communicates with a Bitcoin Core node to +track the location of all ordinals, a wallet that allows making ordinal-aware +transactions, a block explorer for interactive exploration of the blockchain, +functionality for minting ordinal NFTs, and this manual. + +Rarity +------ + +Humans are collectors, and since ordinals can be tracked and transferred, +people will naturally want to collect them. Ordinal theorists can decide for +themselves which sats are rare and desirable, but there are some hints. + +Bitcoin has periodic events, some frequent, some more uncommon, and these +naturally lend themselves to a system of rarity. These periodic events are: + +- *Blocks*: A new block is mined approximately every 10 minutes, from now until + the end of time. + +- *Difficulty adjustments*: Every 2016 blocks, or approximately every two + weeks, the Bitcoin network responds to changes in hashrate by adjusting the + difficulty target which blocks must meet in order to be accepted. + +- *Halvings*: Every 210,000 blocks, or roughly every four years, the amount of + new sats created in every block is cut in half. + +- *Cycles*: Every six halvings, something magical happens: the halving and the + difficulty adjustment coincide. This is called a conjunction, and the time + period between conjunctions a cycle. A conjunction occurs roughly every 24 + years. The first conjunction should happen some time in 2032. + +This gives us the following rarity levels: + +- `common`: Any sat that is not the first sat of its block +- `uncommon`: The first sat of each block +- `rare`: The first sat of each difficulty adjustment period +- `epic`: The first sat of each halving epoch +- `legendary`: The first sat of each cycle +- `mythic`: The first sat of the genesis block + +Which brings us to degree notation, which unambiguously represents an ordinal +in a way that makes rarity easy to see at a glance: + +``` +A°B′C″D‴ +│ │ │ ╰─ Index of sat in the block +│ │ ╰─── Index of block in difficulty adjustment period +│ ╰───── Index of block in halving epoch +╰─────── Cycle, numbered starting from 0 +``` + +Ordinal theorists often use the terms "hour", "minute", "second", and "third" +for *A*, *B*, *C*, and *D*, respectively. + +Now for some examples. This ordinal is common: + +``` +1°1′1″1‴ +│ │ │ ╰─ Not first sat in block +│ │ ╰─── Not first block in difficutly adjustment period +│ ╰───── Not first block in halving epoch +╰─────── Second cycle +``` + + +This ordinal is uncommon: + +``` +1°1′1″0‴ +│ │ │ ╰─ First sat in block +│ │ ╰─── Not first block in difficutly adjustment period +│ ╰───── Not first block in halving epoch +╰─────── Second cycle +``` + +This ordinal is rare: + +``` +1°1′0″0‴ +│ │ │ ╰─ First sat in block +│ │ ╰─── First block in difficulty adjustment period +│ ╰───── Not the first block in halving epoch +╰─────── Second cycle +``` + +This ordinal is epic: + +``` +1°0′1″0‴ +│ │ │ ╰─ First sat in block +│ │ ╰─── Not first block in difficulty adjustment period +│ ╰───── First block in halving epoch +╰─────── Second cycle +``` + +This ordinal is legendary: + +``` +1°0′0″0‴ +│ │ │ ╰─ First sat in block +│ │ ╰─── First block in difficulty adjustment period +│ ╰───── First block in halving epoch +╰─────── Second cycle +``` + +And this ordinal is mythic: + +``` +0°0′0″0‴ +│ │ │ ╰─ First sat in block +│ │ ╰─── First block in difficulty adjustment period +│ ╰───── First block in halving epoch +╰─────── First cycle +``` + +If the block offset is zero, it may be omitted. This is the uncommon ordinal +from above: + +``` +1°1′1″ +│ │ ╰─ Not first block in difficutly adjustment period +│ ╰─── Not first block in halving epoch +╰───── Second cycle +``` + +Ordinal Supply +-------------- + +### Total Supply + +- `common`: 2.1 quadrillion +- `uncommon`: 6,929,999 +- `rare`: 3437 +- `epic`: 32 +- `legendary`: 5 +- `mythic`: 1 + +### Current Supply + +- `common`: 1.9 quadrillion +- `uncommon`: 745,855 +- `rare`: 369 +- `epic`: 3 +- `legendary`: 0 +- `mythic`: 1 + +At the moment, even uncommon ordinals are quite rare. As of this writing, +745,855 uncommon ordinals have been mined - one per 25.6 bitcoin in +circulation. + +Names +----- + +Each ordinal has a name, consisting of the letters *A* through *Z*, that get +shorter the larger the ordinal is. They could start short and get longer, but +then all the good, short names would be trapped in the unspendable genesis +block. + +As an example, 1905530482684727°'s name is "iaiufjszmoba". The name of the last +ordinal to be mined is "a". Every combination of 10 characters or less is out +there, or will be out there, some day. + +Exotics +------- + +Ordinals may be prized for reasons other than their name or rarity. This might +be due to a quality of the number itself, like having an integer square or cube +root. Or it might be due to a connection to a historical event, such as +ordinals from block 477,120, the block in which SegWit activated, or ordinal +2099999997689999°, the last ordinal that will ever be mined. + +Such ordinals are termed "exotic". Which ordinals are exotic and what makes +them so is subjective. Ordinal theorists are are encouraged to seek out exotics +based on criteria of their own devising. + +Archaeology +----------- + +A lively community of archaeologists devoted to cataloging and collecting early +NFTs has sprung up. [Here's a great summary of historical NFTs by +Chainleft.](https://mirror.xyz/chainleft.eth/MzPWRsesC9mQflxlLo-N29oF4iwCgX3lacrvaG9Kjko) + +A commonly accepted cut-off for early NFTs is March 19th, 2018, the date the +first ERC-721 contract, [SU SQUARES](https://tenthousandsu.com/), was deployed +on Ethereum. + +Whether or not ordinals are of interest to NFT archaeologists is an open +question! In one sense, ordinals were created in early 2022, when the Ordinals +specification was finalized. In this sense, they are not of historical +interest. + +In another sense though, ordinals were in fact created by Satoshi Nakamoto in +2009 when he mined the Bitcoin genesis block. In this sense, ordinals, and +especially early ordinals, are certainly of historical interest. + +Many ordinal theorists favor the latter view. This is not least because the +ordinals were independently discovered on at least two separate occasions, long +before the era of modern NFTs began. + +On August 21st, 2012, Charlie Lee [posted a proposal to add proof-of-stake to +Bitcoin to the Bitocin Talk +forum](https://bitcointalk.org/index.php?topic=102355.0). This wasn't an asset +scheme, but did use the ordinal algorithm, and was implemented but never +deployed. + +On October 8th, 2012, jl2012 [posted a scheme to the the same +forum](https://bitcointalk.org/index.php?topic=117224.0) which uses decimal +notation and has all the important properties of ordinals. The scheme was +discussed but never implemented. + +These independent inventions of ordinals indicate in some way that ordinals +were discovered, or rediscovered, and not invented. The ordinals are an +inevitability of the mathematics of Bitcoin, stemming not from their modern +documentation, but from their ancient genesis. They are the culmination of a +sequence of events set in motion with the mining of the first block, so many +years ago. diff --git a/docs/config.toml b/docs/config.toml deleted file mode 100644 index 4f0cb3efe9..0000000000 --- a/docs/config.toml +++ /dev/null @@ -1,8 +0,0 @@ -base_url = "https://docs.ordinals.com" -compile_sass = false -build_search_index = false - -[markdown] -highlight_code = true - -[extra] diff --git a/docs/static/CNAME b/docs/static/CNAME deleted file mode 100644 index 03bfd32778..0000000000 --- a/docs/static/CNAME +++ /dev/null @@ -1 +0,0 @@ -docs.ordinals.com diff --git a/docs/static/favicon.ico b/docs/static/favicon.ico deleted file mode 120000 index 5ca3e9ed5f..0000000000 --- a/docs/static/favicon.ico +++ /dev/null @@ -1 +0,0 @@ -../../static/favicon.png \ No newline at end of file diff --git a/docs/static/index.css b/docs/static/index.css deleted file mode 120000 index df4aecbb0c..0000000000 --- a/docs/static/index.css +++ /dev/null @@ -1 +0,0 @@ -../../static/index.css \ No newline at end of file diff --git a/docs/static/modern-normalize.css b/docs/static/modern-normalize.css deleted file mode 120000 index a93b2fd08a..0000000000 --- a/docs/static/modern-normalize.css +++ /dev/null @@ -1 +0,0 @@ -../../static/modern-normalize.css \ No newline at end of file diff --git a/docs/templates/base.html b/docs/templates/base.html deleted file mode 100644 index c17504cd0f..0000000000 --- a/docs/templates/base.html +++ /dev/null @@ -1,15 +0,0 @@ - - -
- - - -