Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Security – Makechain
Skip to content

Security

Overview of cryptographic primitives, authorization, consensus guarantees, replay protection, rate limiting, and P2P security.

Cryptographic primitives

PrimitiveAlgorithmSizeUsage
Message hashBLAKE332 bytesBLAKE3(MessageData)
Message signatureEd2551964 bytesEd25519.sign(hash, key)
Signer keyEd2551932 bytesPublic key identifying the signer
State rootBLAKE332 bytesMerkle root of all state after a block
ETH claimEIP-191 + secp256k1 + keccak25665 bytesEthereum address linking
SOL claimEd2551964 bytesSolana address linking

Claim message format: makechain:verify:<mid>.


Authorization model

Key scopes

ScopeLevelPermissions
OWNERHighestManage keys, remove projects, manage collaborators, all lower-scope actions
SIGNINGMiddleCreate projects, push commits, update refs, add verifications, fork
AGENTLowestRestricted to specific projects via allowed_projects

Check order

  1. Key lookup — signing key registered for the message's mid
  2. Scope check — key scope meets minimum for the message type
  3. Project accessmid is owner or collaborator
  4. Agent restriction — target project in key's allowed_projects

KEY_ADD and KEY_REMOVE skip the signer pre-check (relayed from onchain registry).

Collaborators

Collaborators get write access. Only the owner can add/remove them. The owner cannot be a collaborator on their own project.


Consensus security

Simplex BFT properties:

  • Fault tolerance3f + 1 validators, tolerates f Byzantine
  • Finality — 2-chain rule, ~300ms
  • Leader election — round-robin

Committed blocks include a BLAKE3 hash verified before storage as a defense-in-depth check.


Replay protection

Timestamp windows

ParameterDefaultEffect
max_timestamp_age_secs600 (10 min)Reject old messages
max_timestamp_drift_secs30Reject future messages

Hash deduplication

Mempool deduplicates by hash. A committed message index lets gossip receivers reject already-finalized messages.

Network isolation

Messages include a network field. The node rejects messages for a different network, preventing cross-network replay.

Ref nonces

Monotonically increasing nonce on each ref prevents reordering even when CAS hashes match.


Rate limiting

Token-bucket on the gRPC API: burst 100, refill 10/sec. Exceeding returns RESOURCE_EXHAUSTED.


P2P security

  • Authenticated encryption — all peer connections via commonware-p2p. Peers identified by Ed25519 keys.
  • Gossip validation — inbound messages pass full envelope verification and are checked against the committed message index.
  • Channel quotas — three Simplex channels (votes, certificates, resolver) with independent quotas.
  • Misbehavior blocking — strike-based system. Peers sending invalid messages accumulate strikes and get blocked.

Storage limits

ResourceLimit
Projects per storage unit10
Commits per project10,000 (oldest unprotected pruned)
Refs per project200
Collaborators per project50
Keys per account100
Verifications per account50

See storage limits for the full allocation model.