MCPcopy Index your code
hub / github.com/commonwarexyz/monorepo

github.com/commonwarexyz/monorepo @v2026.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2026.5.0 ↗ · + Follow
16,900 symbols 100,599 edges 968 files 4,579 documented · 27% updated 1d agov2026.5.0 · 2026-05-28★ 586408 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

commonware

License: MIT License: Apache 2.0 Discussions Benchmarks Coverage Ask DeepWiki X Follow

Primitives

Primitives are designed for deployment in adversarial environments. If you find an exploit, please refer to our security policy before disclosing it publicly (an exploit may equip a malicious party to attack users of a primitive).

  • actor: Safely coordinate concurrent components.
  • broadcast: Disseminate data over a wide-area network.
  • codec: Serialize structured data.
  • coding: Encode data to enable recovery from a subset of fragments.
  • collector: Collect responses to committable requests.
  • conformance: Automatically assert the stability of encoding and mechanisms over time.
  • consensus: Order opaque messages in a Byzantine environment.
  • cryptography: Generate keys, sign arbitrary messages, and deterministically verify signatures.
  • deployer: Deploy infrastructure across cloud providers.
  • glue: Default constructions that span multiple primitives.
  • math: Create and manipulate mathematical objects.
  • p2p: Communicate with authenticated peers over encrypted connections.
  • parallel: Parallelize fold operations with pluggable execution strategies.
  • resolver: Resolve data identified by a fixed-length key.
  • runtime: Execute asynchronous tasks with a configurable scheduler.
  • storage: Persist and retrieve data from an abstract store.
  • stream: Exchange messages over arbitrary transport.

Examples

Examples may include insecure code (i.e. deriving keypairs from an integer arguments) to make them easier to run. Examples are not intended to be used directly in production.

  • alto: A minimal (and wicked fast) blockchain built with the Commonware Library.
  • battleware: An onchain battle secured by a VRF, Timelock Encryption, and MMRs.
  • bridge: Send succinct consensus certificates between two networks.
  • chat: Send encrypted messages to a group of friends.
  • estimator: Simulate mechanism performance under realistic network conditions.
  • flood: Spam peers deployed to AWS EC2 with random messages.
  • log: Commit to a secret log and agree to its hash.
  • reshare: Reshare a threshold secret over an epoched log.
  • sync: Synchronize state between a server and client.

Miscellaneous

Sometimes, we opt to maintain software that is neither a primitive nor an example to make it easier to interact with the Commonware Library. Unless otherwise indicated, code in this section is intended to be used in production. Please refer to our security policy before disclosing an exploit publicly.

  • docs: Access information about Commonware at https://commonware.xyz.
  • docker: Dockerfiles used for cross-compilation and CI.
  • formatting: Format and parse encoded data.
  • invariants: Define and exercise invariants.
  • macros: Augment the development of primitives with procedural macros.
  • mcp: Interact with the Commonware Library via MCP at https://mcp.commonware.xyz.
  • pipeline: Mechanisms under development.
  • utils: Leverage common functionality across multiple primitives.

Stability

All public primitives (and primitive dialects) in the Commonware Library are annotated with a stability level:

Level Index Description
ALPHA 0 Breaking changes expected. No migration path provided.
BETA 1 Wire and storage formats stable. Breaking changes include a migration path.
GAMMA 2 API stable. Extensively tested and fuzzed.
DELTA 3 Battle-tested. Bug bounty eligible.
EPSILON 4 Feature-frozen. Only bug fixes and performance improvements accepted.

Stability is transitive in the Commonware Library; primitives only depend on primitives with equal or higher stability. All examples are considered to be at ALPHA stability (and will continue to be for the foreseeable future).

Users employing the Commonware Library can compile with the commonware_stability_<level> configuration flag to both view scoped documentation and enforce their application only depends on primitives of a minimum stability:

# Generate docs for only code with stability >= BETA (level 1)
RUSTFLAGS="--cfg commonware_stability_BETA" RUSTDOCFLAGS="--cfg commonware_stability_BETA -A rustdoc::broken_intra_doc_links" cargo doc --open

# Check if your application only uses commonware APIs with stability >= BETA
RUSTFLAGS="--cfg commonware_stability_BETA" cargo build -p my-app

Licensing

This repository is dual-licensed under both the Apache 2.0 and MIT licenses. You may choose either license when employing this code.

Contributing

We encourage external contributors to submit issues and pull requests to the Commonware Library. To learn more, please refer to our contributing guidelines.

All work is coordinated via the tracker. If something in the backlog looks particularly useful, leave a comment so we can prioritize it!

MCP Support (for LLMs)

Make your LLM more effective by connecting to the Commonware Library MCP server. Learn more here.

Claude Code

claude mcp add --transport http commonware-library https://mcp.commonware.xyz

Cursor

{
  "mcpServers": {
    "commonware-library": {
      "url": "https://mcp.commonware.xyz"
    }
  }
}

Support

If you have any questions about using the Commonware Library, we encourage you to post in GitHub Discussions. We're happy to help!

Extension points exported contracts — how you extend this code

Span (Interface)
Types that can be read from a variable-size byte sequence. `Span` is typically used to parse things like requests from [34 …
utils/src/sequence/mod.rs
Readable (Interface)
Read-only interface for a merkleized data structure. This trait covers structural reads (size, leaves, retained nodes, [8 …
storage/src/merkle/read.rs
Subject (Interface)
Identifies the subject of a signature or certificate. [6 implementers]
cryptography/src/certificate.rs
Producer (Interface)
Serves data requested by the network. [6 implementers]
resolver/src/p2p/mod.rs
FixedSize (Interface)
Trait for types with a known, fixed encoded size. Implementing this trait signifies that the encoded representation of [75 …
codec/src/codec.rs
Overflow (Interface)
Retained overflow messages for a mailbox policy. [16 implementers]
actor/src/mailbox.rs
Conformance (Interface)
Trait for types that can produce deterministic bytes for conformance testing. Implementations must be deterministic: th [23 …
conformance/src/lib.rs
Attributable (Interface)
Attributable is a trait that provides access to the signer index. This is used to identify which participant signed a gi [7 …
consensus/src/simplex/types.rs

Core symbols most depended-on inside this repo

new
called by 13349
actor/src/mailbox.rs
clone
called by 1798
consensus/src/simplex/mocks/reporter.rs
child
called by 1658
storage/src/index/benches/bench.rs
start
called by 1484
utils/src/range.rs
child
called by 1287
actor/src/mailbox.rs
collect
called by 1143
runtime/src/process/metered.rs
map
called by 864
utils/src/vec.rs
map
called by 778
cryptography/src/bls12381/primitives/group.rs

Shape

Function 8,641
Method 6,209
Class 1,496
Enum 378
Interface 176

Languages

Rust100%
TypeScript1%
Python1%

Modules by API surface

runtime/src/lib.rs187 symbols
runtime/src/iobuf/mod.rs175 symbols
storage/src/index/mod.rs172 symbols
storage/src/journal/authenticated.rs170 symbols
consensus/src/marshal/standard/mod.rs145 symbols
utils/src/bitmap/mod.rs129 symbols
storage/src/merkle/persisted/full.rs129 symbols
runtime/src/iobuf/pool.rs129 symbols
runtime/src/deterministic.rs127 symbols
cryptography/src/bls12381/dkg/feldman_desmedt.rs124 symbols
storage/src/merkle/proof.rs122 symbols
actor/src/mailbox.rs115 symbols

For agents

$ claude mcp add monorepo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page