- Bootstrap: built-in /dnsaddr/allmende.stinnesbeck.com (TXT records at _dnsaddr.<name>), resolved at every redial with the last good answer kept; --bootstrap takes /p2p/ or /dnsaddr/ entries, --no-default-bootstrap drops the built-in one. Stopping never waits for a stuck resolver. - Remembered peers in peers.json (saved every 5 min and on shutdown, redialled at the next start) - Private Kademlia DHT (/allmende prefix), advertised and looked up per region with quick first attempts and a backoff; --no-dht turns it off - NAT traversal: port mapping, hole punching, AutoRelay through bootstrap nodes - --public: DHT server and relay for a bootstrap node; prints the TXT records - Docker, NixOS module (public, defaultBootstrap, QUIC/UDP) and docs updated - e2e: bootstrap node scenario, seed cache restart, and polling that really polls Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
version,
|
|
}:
|
|
|
|
buildGoModule {
|
|
pname = "allmende";
|
|
inherit version;
|
|
|
|
# Only what the Go build reads, so editing docs or tests does not rebuild.
|
|
# web/dist is the pre-built UI that the binary embeds.
|
|
src = lib.fileset.toSource {
|
|
root = ../.;
|
|
fileset = lib.fileset.unions [
|
|
../go.mod
|
|
../go.sum
|
|
../cmd
|
|
../internal
|
|
../web/embed.go
|
|
../web/dist
|
|
];
|
|
};
|
|
|
|
# Changes whenever go.mod or go.sum do: set it to lib.fakeHash, build, and
|
|
# copy the hash from the error.
|
|
vendorHash = "sha256-cls1bwmv+BbBwGx5mfNcihENUuojR5Pog5tfVzBKPU8=";
|
|
|
|
subPackages = [ "cmd/allmende" ];
|
|
env.CGO_ENABLED = "0";
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
# The tests start libp2p nodes and need loopback networking and mDNS, which
|
|
# the build sandbox does not give. `make test` runs them.
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
description = "A free, distributed marketplace for buying, selling and renting";
|
|
license = lib.licenses.agpl3Only;
|
|
mainProgram = "allmende";
|
|
};
|
|
}
|