This document summarizes the rewrite of the CCV (Cross-Chain Validation) provider and consumer modules from github.com/cosmos/interchain-security/v7 into a new vaas folder as a standalone Go module with package path github.com/allinbits/vaas.
The rewrite simplifies the interchain security modules by removing several features while keeping the core functionality for validator set synchronization between provider and consumer chains.
| Feature | Reason |
|---|---|
| Partial Set Security (PSS) | All validators now validate all consumers - no opt-in/out |
| Top N Chains | Part of PSS removal |
| Opt-In Chains | Part of PSS removal |
| Power Shaping | No caps, allowlists, denylists, priority lists |
| Per-Consumer Commission Rates | Validators use same commission as provider |
| Slash Packet Throttling | Removed all slash meter logic |
| Consumer Reward Distribution | No cross-chain rewards |
| Inactive Provider Validators (ADR-017) | Only active provider validators can validate consumers |
| Feature | Reason |
|---|---|
| Slash Packet Sending | All slash-related removed |
| Slash Packet Throttling/Retry | All slash-related removed |
| Reward Distribution to Provider | Consistent with provider removal |
| Standalone-to-Consumer Changeover | Only new chains as consumers |
| Outstanding Downtime Flag | Part of slash removal |
- Consumer Lifecycle Management (REGISTERED → INITIALIZED → LAUNCHED → STOPPED → DELETED)
- Key Assignment (validators can use different keys per consumer)
- Per-Consumer Infraction Parameters (custom slash/jail params per consumer)
- VSC Packet Generation at epoch boundaries
- IBC Channel Management
- Double Voting Evidence handling
- Light Client Misbehavior Detection (logging only)
- Consumer Metadata storage
- Minimum validators check for launch
- Chain ID update before launch
- Existing client/connection reuse
- VSC Packet Handling (validator set updates)
- Cross-Chain Validator Storage
- Historical Info Tracking (for IBC evidence)
- IBC Channel Management
- Module Parameters
msg_server.go:
CreateConsumer: Removed power shaping and reward denom setup (kept per-consumer infraction parameters)UpdateConsumer: Removed power shaping (kept per-consumer infraction parameters)SetConsumerCommissionRate: Returns error (feature removed)OptIn: Simplified to no-op with optional key assignmentOptOut: Returns error (PSS removed)
relay.go:
BeginBlockCIS: Now a no-op (slash throttling removed)OnRecvSlashPacket: Removed slash meter logic, packets handled directlyHandleSlashPacket: Uses per-consumer infraction parameters viaGetInfractionParametersQueueVSCPackets: Removed activeValidators parameter
validator_set_update.go:
ComputeNextValidators: Simplified - all validators validate all consumers, no power shapingComputeConsumerNextValSet: Removed PSS logic and power shaping parameters
consumer_lifecycle.go:
BeginBlockLaunchConsumers: Removed activeValidatorsLaunchConsumer: Simplified signature, removedHasActiveConsumerValidatorcheckDeleteConsumerChain: Removed PSS/power shaping cleanup calls
genesis.go:
InitGenesis: RemovedInitializeSlashMetercall
consumer_equivocation.go:
- Uses per-consumer infraction parameters via
GetInfractionParameters
grpc_query.go:
QueryThrottleState: Returns empty valuesQueryRegisteredConsumerRewardDenoms: Returns empty listQueryConsumerChainOptedInValidators: Returns all consumer validatorsQueryConsumerValidators: Simplified to remove power shapingGetConsumerChain: Removed power shaping (kept per-consumer infraction parameters)hasToValidate: Simplified - always returns true for active validators
keeper.go:
- Added
CreateProviderConsensusValidatorfunction
validator_set_storage.go:
- Added
SetLastProviderConsensusValSetandGetLastProviderConsensusValSet
ibc_module.go:
ProviderFeePoolAddrset to empty string (rewards removed)
genesis.go:
- Removed
SetOutstandingDowntimeandSetLastTransmissionBlockHeight - Simplified export to not export removed features
validators.go:
IsValidatorJailed: Always returns false (slash functionality removed)SlashWithInfractionReason: Logs but doesn't send slash packet, returns zero
module.go:
- Removed migrations (ConsensusVersion = 1)
- Simplified
EndBlockto remove changeover and distribution
ibc_module.go:
- Removed distribution transfer channel initialization
genesis.go:
NewRestartGenesisState: RemovedOutstandingDowntimeandLastTransmissionBlockHeightparameters
denom_helpers.go:
- Added
ValidateIBCDenomfunction
vaas/
├── go.mod # module github.com/allinbits/vaas
├── go.sum
├── REWRITE_SUMMARY.md # This document
├── testutil/
│ ├── crypto/ # Test crypto utilities
│ └── keeper/ # Test keeper utilities
└── x/
└── ccv/
├── provider/
│ ├── keeper/ # Provider keeper implementation
│ ├── types/ # Provider types (includes .pb.go files)
│ ├── client/cli/ # CLI commands
│ ├── module.go # Module definition
│ └── ibc_module.go # IBC callbacks
├── consumer/
│ ├── keeper/ # Consumer keeper implementation
│ ├── types/ # Consumer types (includes .pb.go files)
│ ├── client/cli/ # CLI commands
│ ├── module.go # Module definition
│ └── ibc_module.go # IBC callbacks
└── types/ # Shared types
x/vaas/consumer/keeper- Genesis, keeper, params, validators testsx/vaas/consumer/types- Genesis, keys, params testsx/vaas/provider/keeper- Consumer equivocation, hooks, keeper, key assignment, msg server, params, permissionless testsx/vaas/provider/types- Genesis, keys, msg, params testsx/vaas/types- Shared params, utils, wire tests
- Provider: relay, staking keeper interface, validator set update, consumer lifecycle, genesis, grpc query
- Consumer: relay (slash packet sending)
cd vaas
go build ./...
go test ./...- No opt-in/out: All validators on the provider automatically validate all consumer chains
- No power shaping: Consumer chains get the full provider validator set (up to MaxProviderConsensusValidators)
- Per-consumer infraction params: Each consumer can have custom slash/jail parameters
- No rewards: Consumer chains don't distribute rewards to the provider
- No slash packets: Consumer chains log infractions but don't send slash packets to provider
- Simplified genesis: Consumer genesis doesn't include outstanding downtime or last transmission block height
The module uses the same dependencies as the original interchain-security v7:
- Cosmos SDK v0.53
- IBC-Go v10.1.1
- CometBFT
All imports were updated from github.com/cosmos/interchain-security/v7 to github.com/allinbits/vaas.