{"id":29646196,"url":"https://github.com/bsv-blockchain/go-subtree","last_synced_at":"2026-05-19T11:06:53.565Z","repository":{"id":302208398,"uuid":"1011592043","full_name":"bsv-blockchain/go-subtree","owner":"bsv-blockchain","description":"A Go library for efficiently managing Bitcoin SV Subtree transaction structures.","archived":false,"fork":false,"pushed_at":"2025-07-21T18:34:58.000Z","size":508,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-21T22:30:17.982Z","etag":null,"topics":["bitcoin","blockchain","bsv","golang","subtree","teranode"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsv-blockchain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"bsv-blockchain"}},"created_at":"2025-07-01T04:07:17.000Z","updated_at":"2025-07-21T18:35:01.000Z","dependencies_parsed_at":"2025-07-01T06:33:26.198Z","dependency_job_id":null,"html_url":"https://github.com/bsv-blockchain/go-subtree","commit_stats":null,"previous_names":["bsv-blockchain/go-subtree"],"tags_count":0,"template":false,"template_full_name":"bsv-blockchain/go-template","purl":"pkg:github/bsv-blockchain/go-subtree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsv-blockchain%2Fgo-subtree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsv-blockchain%2Fgo-subtree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsv-blockchain%2Fgo-subtree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsv-blockchain%2Fgo-subtree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsv-blockchain","download_url":"https://codeload.github.com/bsv-blockchain/go-subtree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsv-blockchain%2Fgo-subtree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266411481,"owners_count":23924334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","blockchain","bsv","golang","subtree","teranode"],"created_at":"2025-07-22T02:02:12.724Z","updated_at":"2026-02-07T23:16:26.501Z","avatar_url":"https://github.com/bsv-blockchain.png","language":"Go","funding_links":["https://github.com/sponsors/bsv-blockchain"],"categories":[],"sub_categories":[],"readme":"# 🚀 go-subtree\n\u003e A Go library for efficiently managing Bitcoin SV Subtree transaction structures\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eCI\u0026nbsp;/\u0026nbsp;CD\u003c/th\u003e\n      \u003cth\u003eQuality\u0026nbsp;\u0026amp;\u0026nbsp;Security\u003c/th\u003e\n      \u003cth\u003eDocs\u0026nbsp;\u0026amp;\u0026nbsp;Meta\u003c/th\u003e\n      \u003cth\u003eCommunity\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd valign=\"top\" align=\"left\"\u003e\n        \u003ca href=\"https://github.com/bsv-blockchain/go-subtree/releases\"\u003e\n          \u003cimg src=\"https://img.shields.io/github/release-pre/bsv-blockchain/go-subtree?logo=github\u0026style=flat\" alt=\"Latest Release\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n        \u003ca href=\"https://github.com/bsv-blockchain/go-subtree/actions\"\u003e\n          \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/bsv-blockchain/go-subtree/fortress.yml?branch=master\u0026logo=github\u0026style=flat\" alt=\"Build Status\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n\t\t\u003ca href=\"https://github.com/bsv-blockchain/go-subtree/actions\"\u003e\n          \u003cimg src=\"https://github.com/bsv-blockchain/go-subtree/actions/workflows/codeql-analysis.yml/badge.svg?style=flat\" alt=\"CodeQL\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n\t\t\u003ca href=\"https://sonarcloud.io/project/overview?id=bsv-blockchain_go-subtree\"\u003e\n          \u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=bsv-blockchain_go-subtree\u0026metric=alert_status\u0026style-flat\" alt=\"SonarCloud\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd valign=\"top\" align=\"left\"\u003e\n        \u003ca href=\"https://goreportcard.com/report/github.com/bsv-blockchain/go-subtree\"\u003e\n          \u003cimg src=\"https://goreportcard.com/badge/github.com/bsv-blockchain/go-subtree?style=flat\" alt=\"Go Report Card\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n\t\t\u003ca href=\"https://codecov.io/gh/bsv-blockchain/go-subtree/tree/master\"\u003e\n          \u003cimg src=\"https://codecov.io/gh/bsv-blockchain/go-subtree/branch/master/graph/badge.svg?style=flat\" alt=\"Code Coverage\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n\t\t\u003ca href=\"https://scorecard.dev/viewer/?uri=github.com/bsv-blockchain/go-subtree\"\u003e\n          \u003cimg src=\"https://api.scorecard.dev/projects/github.com/bsv-blockchain/go-subtree/badge?logo=springsecurity\u0026logoColor=white\" alt=\"OpenSSF Scorecard\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n\t\t\u003ca href=\".github/SECURITY.md\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/security-policy-blue?style=flat\u0026logo=springsecurity\u0026logoColor=white\" alt=\"Security policy\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd valign=\"top\" align=\"left\"\u003e\n        \u003ca href=\"https://golang.org/\"\u003e\n          \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/bsv-blockchain/go-subtree?style=flat\" alt=\"Go version\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n        \u003ca href=\"https://pkg.go.dev/github.com/bsv-blockchain/go-subtree?tab=doc\"\u003e\n          \u003cimg src=\"https://pkg.go.dev/badge/github.com/bsv-blockchain/go-subtree.svg?style=flat\" alt=\"Go docs\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n        \u003ca href=\".github/AGENTS.md\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/AGENTS.md-found-40b814?style=flat\u0026logo=openai\" alt=\"AGENTS.md rules\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n        \u003ca href=\"Makefile\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/Makefile-supported-brightgreen?style=flat\u0026logo=probot\u0026logoColor=white\" alt=\"Makefile Supported\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n\t\t\u003ca href=\".github/dependabot.yml\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dependencies-automatic-blue?logo=dependabot\u0026style=flat\" alt=\"Dependabot\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd valign=\"top\" align=\"left\"\u003e\n        \u003ca href=\"https://github.com/bsv-blockchain/go-subtree/graphs/contributors\"\u003e\n          \u003cimg src=\"https://img.shields.io/github/contributors/bsv-blockchain/go-subtree?style=flat\u0026logo=contentful\u0026logoColor=white\" alt=\"Contributors\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n\t\t\u003ca href=\"https://github.com/bsv-blockchain/go-subtree/commits/master\"\u003e\n\t\t  \u003cimg src=\"https://img.shields.io/github/last-commit/bsv-blockchain/go-subtree?style=flat\u0026logo=clockify\u0026logoColor=white\" alt=\"Last commit\"\u003e\n\t\t\u003c/a\u003e\u003cbr/\u003e\n        \u003ca href=\"https://github.com/sponsors/bsv-blockchain\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/sponsor-BSV-181717.svg?logo=github\u0026style=flat\" alt=\"Sponsor\"\u003e\n        \u003c/a\u003e\u003cbr/\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003cbr/\u003e\n\n## 🗂️ Table of Contents\n* [Installation](#-installation)\n* [Documentation](#-documentation)\n* [Examples \u0026 Tests](#-examples--tests)\n* [Benchmarks](#-benchmarks)\n* [Code Standards](#-code-standards)\n* [AI Compliance](#-ai-compliance)\n* [Maintainers](#-maintainers)\n* [Contributing](#-contributing)\n* [License](#-license)\n\n\u003cbr/\u003e\n\n## 📦 Installation\n\n**go-subtree** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy).\n```shell script\ngo get -u github.com/bsv-blockchain/go-subtree\n```\n\n\u003cbr/\u003e\n\n## 📚 Documentation\n\n- **API Reference** – Dive into the godocs at [pkg.go.dev/github.com/bsv-blockchain/go-subtree](https://pkg.go.dev/github.com/bsv-blockchain/go-subtree)\n- **Usage Examples** – Browse practical patterns either the [examples directory](examples)\n- **Benchmarks** – Check the latest numbers in the [benchmark results](#benchmark-results)\n- **Test Suite** – Review both the [unit tests](subtree_test.go) and [fuzz tests](subtree_fuzz_test.go) (powered by [`testify`](https://github.com/stretchr/testify))\n\n\u003e **Good to know:** `go-subtree` ships with *zero* runtime dependencies.  \n\u003e The only external package we use is `testify`—and that's strictly for tests.\n\n\u003cbr/\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eRepository Features\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n* **Continuous Integration on Autopilot** with [GitHub Actions](https://github.com/features/actions) – every push is built, tested, and reported in minutes.\n* **Pull‑Request Flow That Merges Itself** thanks to [auto‑merge](.github/workflows/auto-merge-on-approval.yml) and hands‑free [Dependabot auto‑merge](.github/workflows/dependabot-auto-merge.yml).\n* **One‑Command Builds** powered by battle‑tested [Make](https://www.gnu.org/software/make) targets for linting, testing, releases, and more.\n* **First‑Class Dependency Management** using native [Go Modules](https://github.com/golang/go/wiki/Modules).\n* **Uniform Code Style** via [gofumpt](https://github.com/mvdan/gofumpt) plus zero‑noise linting with [golangci‑lint](https://github.com/golangci/golangci-lint).\n* **Confidence‑Boosting Tests** with [testify](https://github.com/stretchr/testify), the Go [race detector](https://blog.golang.org/race-detector), crystal‑clear [HTML coverage](https://blog.golang.org/cover) snapshots, and automatic uploads to [Codecov](https://codecov.io/).\n* **Hands‑Free Releases** delivered by [GoReleaser](https://github.com/goreleaser/goreleaser) whenever you create a [new Tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging).\n* **Relentless Dependency \u0026 Vulnerability Scans** via [Dependabot](https://dependabot.com), [Nancy](https://github.com/sonatype-nexus-community/nancy), and [govulncheck](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck).\n* **Security Posture by Default** with [CodeQL](https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning), [OpenSSF Scorecard](https://openssf.org), and secret‑leak detection via [gitleaks](https://github.com/gitleaks/gitleaks).\n* **Automatic Syndication** to [pkg.go.dev](https://pkg.go.dev/) on every release for instant godoc visibility.\n* **Polished Community Experience** using rich templates for [Issues \u0026 PRs](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository).\n* **All the Right Meta Files** (`LICENSE`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SUPPORT.md`, `SECURITY.md`) pre‑filled and ready.\n* **Code Ownership** clarified through a [CODEOWNERS](.github/CODEOWNERS) file, keeping reviews fast and focused.\n* **Zero‑Noise Dev Environments** with tuned editor settings (`.editorconfig`) plus curated *ignore* files for [VS Code](.editorconfig), [Docker](.dockerignore), and [Git](.gitignore).\n* **Label Sync Magic**: your repo labels stay in lock‑step with [.github/labels.yml](.github/labels.yml).\n* **Friendly First PR Workflow** – newcomers get a warm welcome thanks to a dedicated [workflow](.github/workflows/pull-request-management.yml).\n* **Standards‑Compliant Docs** adhering to the [standard‑readme](https://github.com/RichardLitt/standard-readme/blob/master/spec.md) spec.\n* **Instant Cloud Workspaces** via [Gitpod](https://gitpod.io/) – spin up a fully configured dev environment with automatic linting and tests.\n* **Out‑of‑the‑Box VS Code Happiness** with a preconfigured [Go](https://code.visualstudio.com/docs/languages/go) workspace and [`.vscode`](.vscode) folder with all the right settings.\n* **Optional Release Broadcasts** to your community via [Slack](https://slack.com), [Discord](https://discord.com), or [Twitter](https://twitter.com) – plug in your webhook.\n* **AI Compliance Playbook** – machine‑readable guidelines ([AGENTS.md](.github/AGENTS.md), [CLAUDE.md](.github/CLAUDE.md), [.cursorrules](.cursorrules), [sweep.yaml](.github/sweep.yaml)) keep ChatGPT, Claude, Cursor \u0026 Sweep aligned with your repo’s rules.\n* **Pre-commit Hooks for Consistency** powered by [pre-commit](https://pre-commit.com) and the [.pre-commit-config.yaml](.pre-commit-config.yaml) file—run the same formatting, linting, and tests before every commit, just like CI.\n* **Automated Hook Updates** keep the [.pre-commit-config.yaml](.pre-commit-config.yaml) current via a weekly [workflow](.github/workflows/update-pre-commit-hooks.yml).\n* **DevContainers for Instant Onboarding** – Launch a ready-to-code environment in seconds with [VS Code DevContainers](https://containers.dev/) and the included [.devcontainer.json](.devcontainer.json) config.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eLibrary Deployment\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nThis project uses [goreleaser](https://github.com/goreleaser/goreleaser) for streamlined binary and library deployment to GitHub. To get started, install it via:\n\n```bash\nbrew install goreleaser\n```\n\nThe release process is defined in the [.goreleaser.yml](.goreleaser.yml) configuration file.\n\nTo generate a snapshot (non-versioned) release for testing purposes, run:\n\n```bash\nmake release-snap\n```\n\nThen create and push a new Git tag using:\n\n```bash\nmake tag version=x.y.z\n```\n\nThis process ensures consistent, repeatable releases with properly versioned artifacts and citation metadata.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eMakefile Commands\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nView all `makefile` commands\n\n```bash script\nmake help\n```\n\nList of all current commands:\n\n\u003c!-- make-help-start --\u003e\n```text\nbench                 ## Run all benchmarks in the Go application\nbuild-go              ## Build the Go application (locally)\ncitation              ## Update version in CITATION.cff (use version=X.Y.Z)\nclean-mods            ## Remove all the Go mod cache\ncoverage              ## Show test coverage\ndiff                  ## Show git diff and fail if uncommitted changes exist\nfumpt                 ## Run fumpt to format Go code\ngenerate              ## Run go generate in the base of the repo\ngodocs                ## Trigger GoDocs tag sync\ngovulncheck-install   ## Install govulncheck (pass VERSION= to override)\ngovulncheck           ## Scan for vulnerabilities\nhelp                  ## Display this help message\ninstall-go            ## Install using go install with specific version\ninstall-releaser      ## Install GoReleaser\ninstall-stdlib        ## Install the Go standard library for the host platform\ninstall-template      ## Kick-start a fresh copy of go-template (run once!)\ninstall               ## Install the application binary\nlint-version          ## Show the golangci-lint version\nlint                  ## Run the golangci-lint application (install if not found)\nloc                   ## Total lines of code table\nmod-download          ## Download Go module dependencies\nmod-tidy              ## Clean up go.mod and go.sum\npre-build             ## Pre-build all packages to warm cache\nrelease-snap          ## Build snapshot binaries\nrelease-test          ## Run release dry-run (no publish)\nrelease               ## Run production release (requires github_token)\ntag-remove            ## Remove local and remote tag (use version=X.Y.Z)\ntag-update            ## Force-update tag to current commit (use version=X.Y.Z)\ntag                   ## Create and push a new tag (use version=X.Y.Z)\ntest-ci-no-race       ## CI test suite without race detector\ntest-ci               ## CI test runs tests with race detection and coverage (no lint - handled separately)\ntest-cover-race       ## Runs unit tests with race detector and outputs coverage\ntest-cover            ## Unit tests with coverage (no race)\ntest-fuzz             ## Run fuzz tests only (no unit tests)\ntest-no-lint          ## Run only tests (no lint)\ntest-parallel         ## Run tests in parallel (faster for large repos)\ntest-race             ## Unit tests with race detector (no coverage)\ntest-short            ## Run tests excluding integration tests (no lint)\ntest                  ## Default testing uses lint + unit tests (fast)\nuninstall             ## Uninstall the Go binary\nupdate-linter         ## Upgrade golangci-lint (macOS only)\nupdate-releaser       ## Reinstall GoReleaser\nupdate                ## Update dependencies\nvet-parallel          ## Run go vet in parallel (faster for large repos)\nvet                   ## Run go vet only on your module packages\n```\n\u003c!-- make-help-end --\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eGitHub Workflows\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n\n### 🎛️ The Workflow Control Center\n\nAll GitHub Actions workflows in this repository are powered by a single configuration file: [**.env.shared**](.github/.env.shared) – your one-stop shop for tweaking CI/CD behavior without touching a single YAML file! 🎯\n\nThis magical file controls everything from:\n- **🚀 Go version matrix** (test on multiple versions or just one)\n- **🏃 Runner selection** (Ubuntu or macOS, your wallet decides)\n- **🔬 Feature toggles** (coverage, fuzzing, linting, race detection)\n- **🛡️ Security tool versions** (gitleaks, nancy, govulncheck)\n- **🤖 Auto-merge behaviors** (how aggressive should the bots be?)\n- **🏷️ PR management rules** (size labels, auto-assignment, welcome messages)\n\n\u003e **Pro tip:** Want to disable code coverage? Just flip `ENABLE_CODE_COVERAGE=false` in [.env.shared](.github/.env.shared) and push. No YAML archaeology required!\n\n\u003cbr/\u003e\n\n| Workflow Name                                                                      | Description                                                                                                            |\n|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [auto-merge-on-approval.yml](.github/workflows/auto-merge-on-approval.yml)         | Automatically merges PRs after approval and all required checks, following strict rules.                               |\n| [codeql.yml](.github/workflows/codeql-analysis.yml)                                         | Analyzes code for security vulnerabilities using [GitHub CodeQL](https://codeql.github.com/).                          |\n| [dependabot-auto-merge.yml](.github/workflows/dependabot-auto-merge.yml)           | Automatically merges [Dependabot](https://github.com/dependabot) PRs that meet all requirements.                       |\n| [fortress.yml](.github/workflows/fortress.yml)                                     | Runs the GoFortress security and testing workflow, including linting, testing, releasing, and vulnerability checks.    |\n| [pull-request-management.yml](.github/workflows/pull-request-management.yml)       | Labels PRs by branch prefix, assigns a default user if none is assigned, and welcomes new contributors with a comment. |\n| [scorecard.yml](.github/workflows/scorecard.yml)                                   | Runs [OpenSSF](https://openssf.org/) Scorecard to assess supply chain security.                                        |\n| [stale.yml](.github/workflows/stale-check.yml)                                     | Warns about (and optionally closes) inactive issues and PRs on a schedule or manual trigger.                           |\n| [sync-labels.yml](.github/workflows/sync-labels.yml)                               | Keeps GitHub labels in sync with the declarative manifest at [`.github/labels.yml`](./.github/labels.yml).             |\n| [update-python-dependencies.yml](.github/workflows/update-python-dependencies.yml) | Updates Python dependencies for pre-commit hooks in the repository.                                                    |\n| [update-pre-commit-hooks.yml](.github/workflows/update-pre-commit-hooks.yml)       | Automatically update versions for [pre-commit](https://pre-commit.com/) hooks                                          |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eUpdating Dependencies\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nTo update all dependencies (Go modules, linters, and related tools), run:\n\n```bash\nmake update\n```\n\nThis command ensures all dependencies are brought up to date in a single step, including Go modules and any tools managed by the Makefile. It is the recommended way to keep your development environment and CI in sync with the latest versions.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003ePre-commit Hooks\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nSet up the optional [pre-commit](https://pre-commit.com) hooks to run the same formatting, linting, and tests defined in [AGENTS.md](.github/AGENTS.md) before every commit:\n\n```bash\npip install pre-commit\npre-commit install\n```\n\nThe hooks are configured in [.pre-commit-config.yaml](.pre-commit-config.yaml) and mirror the CI pipeline.\n\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n## 🧪 Examples \u0026 Tests\n\nAll unit tests and [examples](examples) run via [GitHub Actions](https://github.com/bsv-blockchain/go-bt/actions) and use [Go version 1.24.x](https://go.dev/doc/go1.24). View the [configuration file](.github/workflows/fortress.yml).\n\nRun all tests (fast):\n\n```bash script\nmake test\n```\n\nRun all tests with race detector (slower):\n```bash script\nmake test-race\n```\n\n\u003cbr/\u003e\n\n## ⚡ Benchmarks\n\nRun the Go [benchmarks](subtree_benchmark_test.go):\n\n```bash script\nmake bench\n```\n\n\u003cbr/\u003e\n\n### Benchmark Results\n\n| Benchmark Name                     |  Iterations |      ns/op |       B/op | allocs/op |\n|------------------------------------|------------:|-----------:|-----------:|----------:|\n| NewTxInpoints                      |   4,245,616 |      300.7 |        644 |         3 |\n| Subtree_Deserialize                |          13 | 85,003,877 | 67,109,206 |         9 |\n| Subtree_DeserializeNodesFromReader |          13 | 82,279,602 | 50,331,666 |         2 |\n| Subtree_DeserializeFromReader      |          14 | 82,479,347 | 67,108,952 |         7 |\n| SubtreeNodeIndex                   |   2,659,832 |      440.5 |         45 |         1 |\n| Subtree_AddNode                    | 135,712,501 |      11.85 |          0 |         0 |\n| Subtree_Serialize                  |  36,528,111 |      46.54 |        155 |         0 |\n| Subtree_SerializeNodes             | 100,000,000 |      10.94 |         32 |         0 |\n\n\u003e These benchmarks reflect fast, allocation-free lookups for most retrieval functions, ensuring optimal performance in production environments.\n\u003e Performance benchmarks for the core functions in this library, executed on an Apple M1 Max (ARM64).\n\n\u003cbr/\u003e\n\n## 🛠️ Code Standards\nRead more about this Go project's [code standards](.github/CODE_STANDARDS.md).\n\n\u003cbr/\u003e\n\n## 🤖 AI Compliance\nThis project documents expectations for AI assistants using a few dedicated files:\n\n- [AGENTS.md](.github/AGENTS.md) — canonical rules for coding style, workflows, and pull requests used by [Codex](https://chatgpt.com/codex).\n- [CLAUDE.md](.github/CLAUDE.md) — quick checklist for the [Claude](https://www.anthropic.com/product) agent.\n- [.cursorrules](.cursorrules) — machine-readable subset of the policies for [Cursor](https://www.cursor.so/) and similar tools.\n- [sweep.yaml](.github/sweep.yaml) — rules for [Sweep](https://github.com/sweepai/sweep), a tool for code review and pull request management.\n\nEdit `AGENTS.md` first when adjusting these policies, and keep the other files in sync within the same pull request.\n\n\u003cbr/\u003e\n\n## 👥 Maintainers\n| [\u003cimg src=\"https://github.com/icellan.png\" height=\"50\" alt=\"Siggi\" /\u003e](https://github.com/icellan) | [\u003cimg src=\"https://github.com/ordishs.png\" height=\"50\" alt=\"Simon\" /\u003e](https://github.com/ordishs) | [\u003cimg src=\"https://github.com/freemans13.png\" height=\"50\" alt=\"Stu\" /\u003e](https://github.com/freemans13) | [\u003cimg src=\"https://github.com/liam.png\" height=\"50\" alt=\"Liam\" /\u003e](https://github.com/liam) | [\u003cimg src=\"https://github.com/gokutheengineer.png\" height=\"50\" alt=\"Gokhan\" /\u003e](https://github.com/gokutheengineer) |\n|:--------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------:|\n|                                [Siggi](https://github.com/icellan)                                 |                                [Simon](https://github.com/ordishs)                                 |                                  [Stu](https://github.com/freemans13)                                  |                               [Liam](https://github.com/liam)                               |                                    [Gokhan](https://github.com/gokutheengineer)                                     |\n\n\u003cbr/\u003e\n\n## 🤝 Contributing\nView the [contributing guidelines](.github/CONTRIBUTING.md) and please follow the [code of conduct](.github/CODE_OF_CONDUCT.md).\n\n### How can I help?\nAll kinds of contributions are welcome :raised_hands:!\nThe most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:.\nYou can also support this project by [becoming a sponsor on GitHub](https://github.com/sponsors/bsv-blockchain) :clap:\n\n[![Stars](https://img.shields.io/github/stars/bsv-blockchain/go-subtree?label=Please%20like%20us\u0026style=social\u0026v=1)](https://github.com/bsv-blockchain/go-subtree/stargazers)\n\n\u003cbr/\u003e\n\n## 📝 License\n\n[![License](https://img.shields.io/badge/license-OpenBSV-blue?style=flat\u0026logo=springsecurity\u0026logoColor=white)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsv-blockchain%2Fgo-subtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsv-blockchain%2Fgo-subtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsv-blockchain%2Fgo-subtree/lists"}