Skip to content

About

Auto-research agent for Bitcoin protocol research

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Solving Bitcoin

A shared Bitcoin research toolbox for Codex, OpenCode, and other agents.

Solving Bitcoin is an experimental research effort for discovering, testing, and improving Bitcoin constructions. This repository currently provides reusable tools and integrations; it does not implement a dedicated research agent.

The goal is to build research systems that can move from literature → hypothesis → implementation → experiment → verification, grounded in primary sources and executable against Bitcoin itself.

Use the toolbox

git submodule update --init --recursive
python3 tools/toolbox.py setup
python3 tools/toolbox.py configure
python3 tools/toolbox.py doctor
  • Research MCPs: Bitcoin Knowledge Base, IACR ePrint, and alphaXiv.
  • Local tools: primitive catalog queries, bounded Script tracing, focused Rust tests, and pinned Bitcoin Core regtest suites.
  • Clients: generated Codex/OpenCode configurations and a common AGENTS.md.
  • Sources: a machine-readable directory in sources.json.

See setup and tool reference for prerequisites, client launchers, OAuth sign-in, examples, and limitations. ePrint search covers recent RSS entries; alphaXiv needs user authentication. Installed tools and experiment outputs stay local.

Research Loop

Research → Construct → Execute → Verify → Improve

Research agents combine Bitcoin protocol literature, cryptography research, existing constructions, and Bitcoin Core source code to propose and investigate ideas.

Those ideas are then implemented and tested in reproducible local environments rather than evaluated through reasoning alone.

Research Infrastructure

Local setup

Clone this repository with its pinned Bitcoin Script library:

git clone --recurse-submodules https://github.com/solving-bitcoin/autoresearch-agent.git

For an existing checkout:

git submodule update --init --recursive

The bitcoin-scripts/ submodule provides implementations, tests, and a knowledge catalog. Read its AGENTS.md before working with it. Codex and OpenCode should use this pinned checkout for reproducible experiments. An existing sibling checkout remains independent and can still be used for development.

Knowledge Base

A versioned, citation-grounded research library spanning:

Research agents provide literature discovery, source retrieval, citation tracking, synthesis, code inspection, and cross-referencing across these collections.

Experimental Environment

Research should produce executable artifacts.

The lab provides tools for:

  • Bitcoin Script execution and tracing
  • rust-bitcoin experimentation
  • Bitcoin Core and libbitcoinkernel
  • Local Bitcoin Core regtest nodes
  • Automated testing and benchmarking
  • Reproducible protocol experiments

Research can be orchestrated through model-agnostic agents such as OpenCode, allowing different hosted or local models to work against the same research and experimentation infrastructure.

The environment is designed to be local, inspectable, citation-grounded, reproducible, and model-agnostic.

Research Roadmap

1. Optimize existing primitives

Search the space of known constructions for implementations that are smaller, cheaper, faster, or otherwise better.

These problems have objective evaluation functions and parallelize well, making them useful early targets for autonomous research.

Related optimization competitions include:

2. Invent new Bitcoin Script primitives

Discover reusable constructions that can be expressed using Bitcoin's existing scripting and transaction capabilities.

The output is not just an idea, but ideally an implementation, test vectors, benchmarks, and an explanation of why the construction works.

3. Invent new Bitcoin protocols

Compose existing and newly discovered primitives into novel protocols with useful security, privacy, scalability, or functionality properties.

Research agents should be able to move between literature, Bitcoin Core behavior, implementation, adversarial analysis, and experiments when evaluating a protocol.

4. Explore new cryptographic primitives

Longer term, apply the same research loop to cryptographic constructions themselves.

Search → Construct → Attack → Test → Verify → Improve

Potential evaluation tools include automated adversarial testing, fuzzing, formal verification, benchmarks, and proofs of soundness.

Principles

Ground research in sources. Claims should be traceable to papers, technical discussions, code, or experimental evidence.

Run the idea. A construction should be executable wherever possible.

Use Bitcoin Core as ground truth. Protocol reasoning should ultimately be checked against the reference implementation.

Make experiments reproducible. Sources, software revisions, test environments, and results should be inspectable and repeatable.

Separate evidence from speculation. Research agents should make clear whether a conclusion comes from primary sources, implementation behavior, experimental evidence, or a new hypothesis.

Optimize before inventing. Start with problems that have clear evaluation functions, then progressively move toward more open-ended discovery.


Research → Construct → Execute → Verify → Improve

About

Auto-research agent for Bitcoin protocol research

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages