|
| 1 | +# VAAS Design Rationale |
| 2 | + |
| 3 | +> This document supersedes [`PLAN.old.md`](PLAN.old.md), the original rewrite |
| 4 | +> plan drafted before the port from `interchain-security`. `PLAN.old.md` is |
| 5 | +> kept for historical reference only; the present document is the |
| 6 | +> authoritative statement of why VAAS is shaped the way it is. |
| 7 | +
|
| 8 | +This is a forward-facing reference for contributors. For the per-feature |
| 9 | +historical diff against the `interchain-security` codebase VAAS was ported |
| 10 | +from, see [`REWRITE_SUMMARY.md`](REWRITE_SUMMARY.md); for protocol-level |
| 11 | +mechanics, see [`docs/consumer-lifecycle.md`](docs/consumer-lifecycle.md) and |
| 12 | +[`AGENTS.md`](AGENTS.md). |
| 13 | + |
| 14 | +VAAS is a **simplified** Interchain Security: a Cosmos provider chain lends |
| 15 | +its full validator set to one or more consumer chains, automatically, with no |
| 16 | +opt-in/out and no power shaping. The simplification is the product, not a |
| 17 | +work-in-progress. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Guiding Principles |
| 22 | + |
| 23 | +1. **All validators validate everything.** There is no per-consumer |
| 24 | + selection. The active provider set, capped at |
| 25 | + `MaxProviderConsensusValidators`, is the consumer set. |
| 26 | +2. **No cross-chain economics inside the protocol.** No reward distribution, |
| 27 | + no per-consumer commission rates, no slash throttling, no slash meters. |
| 28 | + Consumers stand up their own fee/reward models; the protocol carries only |
| 29 | + validator-set state and security signals. |
| 30 | +3. **IBC v2 only.** No channel handshake, no ordered channels, no port |
| 31 | + reservations. VAAS modules register on `ibcRouterV2` under the application |
| 32 | + IDs `vaasprovider` and `vaasconsumer`; consumer launch relies on a relayer |
| 33 | + creating the IBC v2 clients and the provider discovering its consumer |
| 34 | + client at the next epoch boundary. |
| 35 | +4. **Forward-only consumer lifecycle.** `REGISTERED → INITIALIZED → LAUNCHED |
| 36 | + → STOPPED → DELETED`, with a single rollback path (failed launch → back to |
| 37 | + `REGISTERED`). Standalone-to-consumer changeover is not currently |
| 38 | + supported; see [`docs/consumer-transition.md`](docs/consumer-transition.md) |
| 39 | + for the future-work considerations. |
| 40 | +5. **Provider authority for control-plane messages.** `OnSendPacket` requires |
| 41 | + the keeper's authority as signer; consumers never send packets back |
| 42 | + (`OnRecvPacket` on the provider is a failure path; `OnSendPacket` on the |
| 43 | + consumer is rejected). Misbehaviour reports travel as ordinary provider |
| 44 | + transactions, not IBC packets. |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## Why the Simplifications |
| 49 | + |
| 50 | +### Removed: Partial Set Security (PSS), Top N, Opt-in, Power Shaping |
| 51 | + |
| 52 | +The `interchain-security` codebase supports renting *subsets* of the |
| 53 | +validator set per consumer with caps, allowlists, denylists, priority lists, |
| 54 | +and inactive-validator participation (ADR-017). VAAS targets deployments |
| 55 | +where the provider guarantees its entire active set to every consumer. |
| 56 | +Removing PSS deletes a large surface area: per-validator opt-in state, |
| 57 | +per-consumer power-shaping parameters, "has-to-validate" queries, and the |
| 58 | +messages that maintain them (`MsgOptIn`, `MsgOptOut`, |
| 59 | +`MsgSetConsumerCommissionRate`). |
| 60 | + |
| 61 | +The trade-off is rigidity: a consumer cannot pick a smaller validator set. |
| 62 | +That is intentional. Smaller sets do not inherit the BFT assumption of the |
| 63 | +full set, there is no assumption that can be made about smaller sets, no |
| 64 | +security guarantee. The simplification also drastically reduces the |
| 65 | +complexity of the system. |
| 66 | + |
| 67 | +### Removed: Slash Packet Throttling, Slash Meters, Slash Retry |
| 68 | + |
| 69 | +ICS throttles slash packets to bound the impact of a misbehaving or |
| 70 | +adversarial consumer on the provider's validator set. VAAS removes the |
| 71 | +throttle, the meter, and the retry queue. Consumer-initiated slashing for |
| 72 | +downtime is *not currently performed by the provider*; equivocation evidence |
| 73 | +(double-sign, light-client) is submitted as a provider transaction |
| 74 | +(`MsgSubmitConsumerDoubleVoting`, `MsgSubmitConsumerMisbehaviour`) and |
| 75 | +slashed using per-consumer infraction parameters. Downtime slashing via slash |
| 76 | +packets is an open design question (see open issues / PRs). |
| 77 | + |
| 78 | +### Removed: Consumer Reward Distribution |
| 79 | + |
| 80 | +ICS pipes a fraction of consumer fees back to the provider as validator |
| 81 | +rewards. VAAS leaves the consumer fee model entirely to the consumer chain. |
| 82 | +This eliminates a category of cross-chain accounting and the related |
| 83 | +provider-side state (reward denom registration, fee pool addressing, etc.). |
| 84 | + |
| 85 | +### Kept: Per-Consumer Infraction Parameters |
| 86 | + |
| 87 | +Each consumer carries its own `infraction_parameters` (double-sign and |
| 88 | +downtime slash fractions, jail durations, tombstone flag). This is the one |
| 89 | +place per-consumer customisation survives — the protocol cannot decide |
| 90 | +slash severity centrally because consumers vary in security profile. |
| 91 | + |
| 92 | +### Kept: Key Assignment |
| 93 | + |
| 94 | +Validators may assign per-consumer consensus keys via |
| 95 | +`MsgAssignConsumerKey`. Keys are ed25519 only and prune on unbonding, with |
| 96 | +checks that prevent key reuse across consumers. |
| 97 | + |
| 98 | +--- |
| 99 | + |
| 100 | +## Active Work and Open Questions |
| 101 | + |
| 102 | +Live work is tracked in GitHub issues and pull requests, not in this file — |
| 103 | +this list points to the rough areas, not the specific tickets. |
| 104 | + |
| 105 | +- **Genesis import/export**. Several entry points in the provider and |
| 106 | + consumer modules still need correct round-trip support. The provider |
| 107 | + `InitGenesis` path uses the chain-ID field as the consumer-id key, which |
| 108 | + needs cleaning up. |
| 109 | +- **Per-consumer infraction parameters at runtime**. The parameters are |
| 110 | + stored per consumer but the equivocation handling path needs to consume |
| 111 | + them consistently. |
| 112 | +- **Provider-side downtime slashing.** Whether (and how) consumers should be |
| 113 | + able to request downtime slashing on the provider is an open design |
| 114 | + question; a draft PR proposes a slash-packet-based path. |
| 115 | +- **Timeout policy.** A VSC packet timeout currently has heavy consequences |
| 116 | + (consumer removal); whether this is the right default is open. |
| 117 | +- **Standalone-to-consumer transition.** The `PreVAAS` / `PrevStandaloneChain` |
| 118 | + collections and the `standaloneStakingKeeper` plumbing in the consumer |
| 119 | + module are dead today but preserved deliberately as a reference for a |
| 120 | + future transition implementation; see |
| 121 | + [`docs/consumer-transition.md`](docs/consumer-transition.md). |
| 122 | + |
| 123 | +## Explicit Non-Goals |
| 124 | + |
| 125 | +The following are intentionally **not** part of VAAS and should not be added |
| 126 | +back without a strong, documented reason: |
| 127 | + |
| 128 | +- Partial Set Security (Top N, opt-in/out, allow/deny lists) |
| 129 | +- Per-consumer power shaping (caps, priority lists) |
| 130 | +- Slash packet throttling / slash meters |
| 131 | +- Cross-chain reward distribution |
| 132 | +- Per-consumer commission rates |
| 133 | +- IBC v1 channel routing for VAAS messages |
| 134 | +- Inactive provider validators participating in consumer security (ADR-017) |
0 commit comments