<commit_before>blockname - bitcoin dns cache
=============================

This is a simple bitcoin-based DNS cache, using the blockchain as a backup cache for normal DNS resolution as well as to resolve alternative domains and TLDs (completely distributed, no registrars).

Simply publish your own domain name as a valid `OP_RETURN` output on *any* transaction with the format `*myname.com\01\02\03\04`, these are called `hint` transactions:

* first byte is always the dot character, `0x46` 
* followed by up to 32 valid [domain name](http://en.wikipedia.org/wiki/Domain_name) characters
* the last 4 bytes are the IPv4 address octets to use as the next resolution server

The blockchain resolver will attempt to resolve all domains with traditional DNS, and only when they fail will it use any names that come from the cache hints.

In the background the resolver will continuously index all newly broadcast transactions that have a valid hints, storing only the unique hints that have the largest value transactions (larger inputs/outputs will replace smaller ones for the same domain name).

-----------------

> WIP - experimenting w/ re-purposing the blockcast project

Publishing a document
---

First, we'll need a Bitcoin private key and matching public address. Our public address can be thought of as our user ID. In order to post we'll need to make sure that our address has some Bitcoin.

In our examples we're going to use the helloblock test faucet to get our private key, public address and unspent outputs.<commit_msg>change the syntax to be text only, easier to support/read<commit_after>blockname - bitcoin dns cache
=============================

This is a simple bitcoin-based DNS cache, using the blockchain as a backup cache for normal DNS resolution as well as to resolve alternative domains and TLDs (completely distributed, no registrars).

Simply publish your own domain name as a valid `OP_RETURN` output on *any* transaction with the text format `.myname.com11223344`, these are called `hint` transactions:

* first byte is always the dot character, `.` 
* followed by up to 31 valid [domain name](http://en.wikipedia.org/wiki/Domain_name) characters
* the last 8 characters are always the IPv4 address octets hex encoded, this address is used as the dns server to forward the query to

The blockchain resolver will attempt to resolve all domains with traditional DNS, and only when they fail will it use any names that come from the cache hints.

In the background the resolver will continuously index all newly broadcast transactions that have a valid hints, storing only the unique hints that have the largest value transactions (larger inputs/outputs will replace smaller ones for the same domain name).

-----------------

> WIP - experimenting w/ re-purposing the blockcast project

Publishing a document
---

First, we'll need a Bitcoin private key and matching public address. Our public address can be thought of as our user ID. In order to post we'll need to make sure that our address has some Bitcoin.

In our examples we're going to use the helloblock test faucet to get our private key, public address and unspent outputs.
{'fraction_non_alphanumeric': 0.07072939690558888, 'fraction_numerical': 0.008525418377012947, 'mean_word_length': 4.306532663316583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '153620', 'n_tokens_mistral': 791, 'n_tokens_neox': 738, 'n_words': 469}