ac-byzantine-consensus
Agreement when some participants may be malicious or arbitrarily broken: the Byzantine failure model and how it differs from crash faults, the 3f+1 replica arithmetic that makes it survivable, three-phase commit and the prepare and commit rounds PBFT runs, view changes when the primary itself is the fault, client quorums and how a reply is trusted, signed versus MAC-based message authentication, and the written Byzantine record. It explains the model and its arithmetic; it never recommends a protocol. Use when asking "byzantine fault", "byzantine agreement", "PBFT", "3f plus 1", "view change", "byzantine generals", "malicious replica", "signed messages versus MACs", "why do byzantine systems need more replicas". Not for crash-fault consensus of the Raft or Paxos family (ac-consensus-protocols), not for quorum intersection in majority systems (ac-consensus-protocols), not for security hardening of the endpoints themselves (ac-security-engineer).
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- ac-byzantine-consensus
- status
- seedling
- license
- MIT
- metadata
- { "domain": "software-engineering" }
- description
- Agreement when some participants may be malicious or arbitrarily broken: the Byzantine failure model and how it differs from crash faults, the 3f+1 replica arithmetic that makes it survivable, three-phase commit and the prepare and commit rounds PBFT runs, view changes when the primary itself is the fault, client quorums and how a reply is trusted, signed versus MAC-based message authentication, and the written Byzantine record. It explains the model and its arithmetic; it never recommends a protocol. Use when asking "byzantine fault", "byzantine agreement", "PBFT", "3f plus 1", "view change", "byzantine generals", "malicious replica", "signed messages versus MACs", "why do byzantine systems need more replicas". Not for crash-fault consensus of the Raft or Paxos family (ac-consensus-protocols), not for quorum intersection in majority systems (ac-consensus-protocols), not for security hardening of the endpoints themselves (ac-security-engineer).
02 资源文件 10
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md378 B
- 参考文档subskills/byzantine-record.md3.2 KB
- 参考文档subskills/byzantine-versus-crash.md3.2 KB
- 参考文档subskills/client-quorums.md3.0 KB
- 参考文档subskills/replica-arithmetic.md3.0 KB
- 参考文档subskills/signatures-versus-macs.md3.3 KB
- 参考文档subskills/three-phase-commit.md3.2 KB
- 参考文档subskills/view-changes.md3.1 KB
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Byzantine consensus
Overview
Crash-fault consensus assumes a failed node stops and says nothing false. Byzantine consensus makes no such assumption: a faulty node may send different messages to different peers, lie about what it received, and actively work against the outcome. The consequence is arithmetic — tolerating f Byzantine faults requires 3f+1 replicas rather than 2f+1, and every guarantee must hold against an adversary choosing the worst messages at the worst moments.
This skill covers that model and the machinery built on it: why 3f+1 is the minimum, how the three-phase prepare-commit structure lets replicas converge on one order despite equivocation, how view change replaces a primary that may itself be the fault, and how a client decides a reply is trustworthy without trusting any single node. It ends at the boundary of the crash-fault family, which belongs to another skill.
Primary sources: https://pmg.csail.mit.edu/papers/osdi99.pdf and https://en.wikipedia.org/wiki/Byzantine_fault.
When to use
- Reading or evaluating a system that claims Byzantine fault tolerance.
- Reasoning about why a deployment needs 3f+1 replicas and what f it buys.
- Following a view change when the primary is suspected faulty.
- Deciding between signed messages and MACs for message authentication.
When NOT to use
- For crash-fault protocols of the Raft or Paxos family (use ac-consensus-protocols).
- For quorum intersection in majority systems (use ac-consensus-protocols).
- For hardening the endpoints themselves (use ac-security-engineer).
Subskill Index
| Leaf | Domain segment | Scope (one line) |
|---|---|---|
subskills/byzantine-versus-crash.md |
software-engineering/byzantine-versus-crash |
The failure model: what a Byzantine node may do that a crashed one cannot. |
subskills/replica-arithmetic.md |
software-engineering/replica-arithmetic |
Why 3f+1 is the minimum, and the quorum sizes it produces. |
subskills/three-phase-commit.md |
software-engineering/three-phase-commit |
Pre-prepare, prepare, and commit, and what each round eliminates. |
subskills/view-changes.md |
software-engineering/view-changes |
Replacing a suspected primary without losing committed work. |
subskills/client-quorums.md |
software-engineering/client-quorums |
How a client trusts a reply without trusting any single node. |
subskills/signatures-versus-macs.md |
software-engineering/signatures-versus-macs |
Authentication cost, message counts, and the recovery post-surgery. |
subskills/byzantine-record.md |
software-engineering/byzantine-record |
The written record of f, quorums, authentication, and evidence. |
Status and honest limits
Byzantine tolerance is expensive: more replicas, more message rounds, more cryptographic work, and a threat model that must be stated to mean anything. A deployment that never names its f has not chosen a fault tolerance, and a system that mixes the crash-fault vocabulary with Byzantine claims is usually one or the other. Nothing here recommends a protocol, and no Byzantine system tolerates faults in the clients or in the code every replica shares — the model covers the replicas, not the software's own correctness.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.