bdns

module
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0

README

bdns

CI Release Go Reference Go version License

[!WARNING] Experimental software. bdns is part of bstack, the applications and patterns built on BSV Layered Multicast. It is published to be built on and improved. Interfaces, formats and behavior may change rapidly between releases; pin an exact version. Nothing in the record specification is frozen yet (docs/spec.md).

DNS whose zones are published by their owners and whose servers compete. A zone is a chain of signed records carried by a BSV overlay. Every operator that takes the zone receives each change once, renders it for an ordinary DNS server, and answers on port 53.

What is built

Piece What Where
record codec the records, their leaves, the root and its proofs, admission zonerec/, docs/spec.md
overlay module admits a zone's records on a host and answers lookups (tm_bdns_<z>, ls_bdns) module/
bdns a publisher's command: create a zone, change its records, read them back verified cmd/bdns/, docs/command.md
bdns render the renderer: follows zones on an overlay host, verifies each state, and writes Knot DNS zone files with a catalog zone, and dnsmasq hosts files internal/render/, docs/render.md

A follower of another kind reads the stream bdns follow prints: docs/follow.md.

Try it

QUICKSTART.md: a zone published, proven and answered by a DNS server on one machine in about five minutes, with no coin and no Docker. A stand-in chain (cmd/devchain) and a development host (cmd/devhost) take the network's place.

Install

$ go install github.com/lightwebinc/bdns/cmd/bdns@latest

Go 1.27.4 or later. Or from a clone:

$ make build          # bin/bdns, and the quickstart's bin/devchain and bin/devhost
$ make docker-build   # the image, built locally

What it runs with

Part What
an overlay host a Go overlay host that mounts module/, which is written to bcommon's module contract, carries each zone's topics and answers ls_bdns (docs/spec.md sections 12 and 13). This repository holds the module and a development host for one machine (cmd/devhost), not a host for a network
a header source and a chain view every proof is checked against block headers from a source the reader names, woc:main or a node of its own (docs/command.md section 1, docs/render.md section 1)
coin a publisher's home keeps a pool of mined outputs, so no publish waits for a block (docs/command.md section 3)
a DNS server Knot DNS or dnsmasq reads what the renderer writes (docs/render.md sections 4 and 6)
a local checker only for a name answered from its members: the serving challenge is bweb's, run beside the renderer as bweb check (docs/render.md section 5.4)

Documentation

If you want to Read
Try it on one machine QUICKSTART.md
Publish a zone, change its records and read them back docs/command.md
Serve a site behind a publisher's name docs/command.md section 5
Run the renderer beside a DNS server docs/render.md
Follow a zone's changes from another program docs/follow.md
Implement a compatible publisher, host or renderer docs/spec.md
See what changed in a release CHANGELOG.md

Build and test

$ make verify             # gofmt, vet, go.mod tidy, third-party licenses, tests
$ make quickstart-check   # QUICKSTART.md, run end to end and checked

The back ends against real servers, when Docker and dnsmasq are there (docs/render.md section 11):

$ BDNS_TEST_KNOT=1 go test -run Integration ./internal/render

Security

Report a vulnerability privately: SECURITY.md. Contributing: CONTRIBUTING.md.

License

Apache 2.0; see LICENSE, NOTICE and LICENSE-THIRD-PARTY.

Directories

Path Synopsis
cmd
bdns command
Command bdns is a zone publisher's tool: it mints a zone's chains, changes their records, and reads them back from an overlay host, verified here.
Command bdns is a zone publisher's tool: it mints a zone's chains, changes their records, and reads them back from an overlay host, verified here.
devchain command
Command devchain is a local stand-in chain for trying bdns without a node, a settlement service or any coin: bcommon devkit's devchain (a node's JSON-RPC at /rpc, its asset API under /api/v1/ and a header source at /v1/root/<height> and /v1/tip, every transaction mined at once).
Command devchain is a local stand-in chain for trying bdns without a node, a settlement service or any coin: bcommon devkit's devchain (a node's JSON-RPC at /rpc, its asset API under /api/v1/ and a header source at /v1/root/<height> and /v1/tip, every transaction mined at once).
devhost command
Command devhost is a development overlay host for trying bdns on one machine: bdns's module with an overlay engine's part played over HTTP, everything in memory (internal/devhost).
Command devhost is a development overlay host for trying bdns on one machine: bdns's module with an overlay engine's part played over HTTP, everything in memory (internal/devhost).
internal
chainread
Package chainread reads a bdns chain from an overlay host and believes nothing the host says: every token is decoded and held to the chain's rules from seq 0, and every leaves object to the state that commits to it.
Package chainread reads a bdns chain from an overlay host and believes nothing the host says: every token is decoded and held to the chain's rules from seq 0, and every leaves object to the state that commits to it.
devhost
Package devhost is a development overlay host for bdns: bdns's module with an overlay engine's part played over HTTP and everything kept in memory.
Package devhost is a development overlay host for bdns: bdns's module with an overlay engine's part played over HTTP and everything kept in memory.
indverify
Package indverify is a second implementation of what a verifier of bdns proofs does, written from the specification (docs/spec.md sections 4 and 13) and RFC 9162 alone.
Package indverify is a second implementation of what a verifier of bdns proofs does, written from the specification (docs/spec.md sections 4 and 13) and RFC 9162 alone.
present
Package present turns DNS presentation form (RFC 1035 master file syntax) into bdns leaves and back.
Package present turns DNS presentation form (RFC 1035 master file syntax) into bdns leaves and back.
render
Package render is the bdns renderer: a daemon beside an overlay host that follows the zones its operator names, verifies every state itself, and writes configuration for an ordinary DNS server (docs/render.md).
Package render is the bdns renderer: a daemon beside an overlay host that follows the zones its operator names, verifies every state itself, and writes configuration for an ordinary DNS server (docs/render.md).
zonetest
Package zonetest builds bdns's transactions for tests: real keys, real signatures, each mined transaction in a block of its own against a stub header source.
Package zonetest builds bdns's transactions for tests: real keys, real signatures, each mined transaction in a block of its own against a stub header source.
Package module is bdns's overlay module, against bcommon's engine-neutral contract: tm_bdns_<z> for each chain BDNS_ZONES names, and ls_bdns for all of them.
Package module is bdns's overlay module, against bcommon's engine-neutral contract: tm_bdns_<z> for each chain BDNS_ZONES names, and ls_bdns for all of them.
Package zonerec is bdns's record codec: the four records a zone's topic carries, the leaves a state commits to, their root and their proofs (docs/spec.md).
Package zonerec is bdns's record codec: the four records a zone's topic carries, the leaves a state commits to, their root and their proofs (docs/spec.md).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL