shard-common

module
v0.10.1 Latest Latest
Warning

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

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

README

shard-common

CI Release Go Reference Go Report Card License

Shared protocol primitives for the BSV transaction sharding pipeline. Imported by shard-proxy, shard-listener, retry-endpoint, and subtx-generator.

Packages

Package Purpose
frame Wire format codec: BRC-12/124/128 frames, BRC-127 announce, BRC-130 fragments, BRC-131 blocks, BRC-132 subtree data, BRC-134 anchor txs, BRC-135 block headers, BRC-137 shard manifest
shard TxID → IPv6 multicast group derivation (consistent-hash); control groups
seqhash XXH64 per-flow HashKey computation
sequence Per-shard monotonic counters (sync/atomic, zero-alloc)
txidset Two-tier TxID dedup (LRU + optional Redis SETNX); fail-open on Redis errors

Documentation

Requirements

  • Go 1.25 or later

Build

go build ./...
go test ./...

License

Apache 2.0 — see LICENSE.

Directories

Path Synopsis
BRC-135 block header frame encode/decode.
BRC-135 block header frame encode/decode.
Package seqhash provides the hash function used to compute HashKey values in BRC-124/BRC-128 frames.
Package seqhash provides the hash function used to compute HashKey values in BRC-124/BRC-128 frames.
Package sequence provides per-shard monotonic sequence counters.
Package sequence provides per-shard monotonic sequence counters.
Package shard derives IPv6 multicast group addresses from BSV transaction IDs for deterministic packet-level sharding across the BSV sharding pipeline.
Package shard derives IPv6 multicast group addresses from BSV transaction IDs for deterministic packet-level sharding across the BSV sharding pipeline.
Package txidset implements a two-tier TxID claim store used by both the proxy ingress dedup gate and the listener per-deployment egress dedup gate.
Package txidset implements a two-tier TxID claim store used by both the proxy ingress dedup gate and the listener per-deployment egress dedup gate.

Jump to

Keyboard shortcuts

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