refactor: remove dead fork-era code and make VAAS naming consistent - #76
refactor: remove dead fork-era code and make VAAS naming consistent#76giunatale wants to merge 6 commits into
Conversation
|
Branched from Merge this one last from the series #63 to #75: it renames identifiers that other PRs' new code uses, |
07a2e57 to
90d9305
Compare
…k at the first wall-clock block Review round for PR #66. Photon-only fees deadlocked the chain the moment the policy activated: every transaction needed a photon-voucher fee, including the relayer's packet deliveries, which are the only way vouchers can ever arrive. The ante now exempts transactions made up exclusively of infrastructure messages (/ibc.core.* and /cosmos.gov.*, with the user-originating MsgSendPacket carved out); what they pay is left to node-local min-gas-prices, so a tokenless core shard launches with zero prices and genesis-declared relayer and owner accounts. The VSC staleness clock armed at NewChain InitGenesis with the genesis block time, which is the genesis file's creation time and may predate launch, burning safe-mode budget before the first block. It now arms in BeginBlock at the first block after genesis, the first one carrying wall-clock time; a restart genesis without the field arms the same way instead of staying unarmed forever. Docs are aligned with two facts the review surfaced: only vouchers from the pinned client are accepted (deliberate: any other path is either unverifiable or needs denom whitelisting), and the reference consumer app wires no governance module, so consumer params are genesis-frozen there and the photon flag cannot be flipped after launch. The liveness query doc now shows the REST path that exists on this branch instead of CLI syntax that lands with #74/#76. The main e2e suite now runs its consumer with photon fees enabled from genesis, and a new test proves the policy end to end: a native-fee tx is rejected, an ICS-20 v2 transfer bridges uphoton in while enforcement is on (the exemption at work), and a voucher-fee tx commits.
90d9305 to
dba870b
Compare
|
Note for the final rebase (this PR merges last): two reconciliations cannot land earlier because their sites are not on this branch.
The sibling branches' new event/attribute constants are already pre-defined here (d0d458f) so the constant-block conflicts resolve mechanically. |
|
The retire event constant pre-defined earlier is dropped again: #78 folded MsgRetireConsumer into MsgRemoveConsumer per review there, so vaas_retire_consumer no longer has a user on any branch. The other pre-defined constants stand. |
4cf33c4 to
ed8a203
Compare
…k at the first wall-clock block Review round for PR #66. Photon-only fees deadlocked the chain the moment the policy activated: every transaction needed a photon-voucher fee, including the relayer's packet deliveries, which are the only way vouchers can ever arrive. The ante now exempts transactions made up exclusively of infrastructure messages (/ibc.core.* and /cosmos.gov.*, with the user-originating MsgSendPacket carved out); what they pay is left to node-local min-gas-prices, so a tokenless core shard launches with zero prices and genesis-declared relayer and owner accounts. The VSC staleness clock armed at NewChain InitGenesis with the genesis block time, which is the genesis file's creation time and may predate launch, burning safe-mode budget before the first block. It now arms in BeginBlock at the first block after genesis, the first one carrying wall-clock time; a restart genesis without the field arms the same way instead of staying unarmed forever. Docs are aligned with two facts the review surfaced: only vouchers from the pinned client are accepted (deliberate: any other path is either unverifiable or needs denom whitelisting), and the reference consumer app wires no governance module, so consumer params are genesis-frozen there and the photon flag cannot be flipped after launch. The liveness query doc now shows the REST path that exists on this branch instead of CLI syntax that lands with #74/#76. The main e2e suite now runs its consumer with photon fees enabled from genesis, and a new test proves the policy end to end: a native-fee tx is rejected, an ICS-20 v2 transfer bridges uphoton in while enforcement is on (the exemption at work), and a voucher-fee tx commits.
…rved Delete the dead standalone-to-consumer changeover Go (the PreVAAS/PrevStandaloneChain state, standaloneStakingKeeper, the InitGenesis PreVAAS branch and its methods) and rewrite docs/consumer-transition.md as a forward-looking reserved spec. The preVAAS proto fields are kept, documented-reserved, for a future re-add.
Delete unused channel/handshake-era sentinels, the IBC-v1 port cluster, the Status type and unused key prefixes, the KeyAssignmentReplacement proto message, dead testutil crypto helpers, and the symbols orphaned by the PreVAAS removal (InitialValSet collection + prefix, the PreVAAS/PrevStandaloneChain prefixes, an orphaned testutil helper); reword stale CCV/channel/ICS-heritage comments; rename channel_established to client_established; add a tidy make target.
Rename the provider module to vaasprovider (matches vaasconsumer), CrossChainValidator to VaasValidator (proto + regen + accessors), and unify event-type strings under a vaas_ prefix; add package docs to the no_valupdates wrapper modules. Flatten the consumer genesis Validate to drop the now-dead preVAAS branch (keeping the load-bearing provider-client checks) and remove the preVAAS constructor param / provider passing.
The module rename changes every provider cli route from 'provider' to 'vaasprovider'; the operator guides' command examples now say so too.
Same reasoning as AttributeKeyAckError: the naming commit rewrites the event/attribute constant blocks wholesale, so a constant a sibling PR adds there would be dropped out from under its user at the final rebase. The rejected-evidence event lands with its vaas_ prefix this way, and the retire event and declared-client attribute survive.
…umer PR #78 now removes pre-launch consumers through MsgRemoveConsumer and emits the remove event on both arms, so vaas_retire_consumer has no user anywhere.
ed8a203 to
45e4836
Compare
|
Another dead constant to drop at the final rebase, same class as the retire one: #69's review removed the only user of AttributeKeyAckError (the evidence-rejection event no longer carries the ack bytes, since an IBC v2 error ack is a sentinel constant with no application error). Once #69 lands, AttributeKeyAckError has no user on any branch and its declaration in the shared events block should go. |
Pre-release cleanup in three logical commits: dead code out, names made
consistent. No behavior changes.
1. Remove the standalone-changeover path, keep the wire format reserved
The standalone-to-consumer changeover ("preVAAS") was never completed here and
its remnants were dead: the collections, the InitGenesis branch, the keeper
methods, and the standalone staking-keeper plumbing are removed. The two proto
fields stay reserved with comments documenting their intended future use,
so a later implementation can return without a wire-format conflict, and the
transition document is reframed as a forward-looking spec.
2. Remove fork-era dead code and stale comments
The dead IBC v1 port/channel cluster, unused channel-era sentinel errors and
key prefixes, an unused proto message, dead test utilities, hardcoded reserved
chain ids from the upstream project, stale upstream issue references, and the
accumulated stale comments describing code that no longer exists. Also adds a
tidymake target for the multi-module workspace.3. Naming consistency
provider->vaasprovider, matchingvaasconsumer(pre-release: no migration concerns).CrossChainValidatorfamily ->VaasValidator(
ApplyCCValidatorChanges->ApplyVaasValidatorChanges, accessors, protomessage + regeneration) — the old name described the upstream project's
architecture, not this one.
that adds a constant there takes this branch's version wholesale and drops
theirs, so the sibling PRs' additions are defined here too, prefixed where the convention applies (
AttributeKeyAckError,EventTypeConsumerEvidenceRejected,EventTypeRetireConsumer,AttributeConsumerClientID); each is harmless ahead of its user.app/files carried trailing whitespace inside comments, unformatted onmainand invisible tomake lint(golangci-lint's gofumpt does not flag it,gofmt -ldoes). Normalized.vaas_prefix.(
query provider ...->query vaasprovider ..., same fortx).no_valupdates_*modules, and removal of inertplumbing that validated and passed a permanently-false flag.
Also in this PR
(
github.com/atomone-hub/atomone) that matches nothing in this repo, so theproject's own imports fell into the catch-all group and their placement was
never enforced. Corrected to
github.com/allinbits/vaas, which is whatAGENTS.mddocuments, and the resulting import re-sort is applied tree-wide.Four inert fork-era exclusion rules are dropped at the same time (two for an
x/govdirectory that does not exist, two targeting a linter that is notenabled, one for a
migrationspath that does not exist).*KeyNameconstants are gone: 24 were unreferenced and theother 13 became inline names, matching the 25 collections that already used
that form — the split was what let the dead two-thirds accumulate unnoticed.
IBCTransferKeeperexpected keeper (with regenerated mocks), three appaccessors that no interface requires, several dead e2e helpers, and the last
CCV-era vocabulary — including three runtime strings an operator couldactually see.
handshake" that IBC v2 has no concept of, a test name that was deleted long
ago, three fictitious interfaces, and prefix names that had been renamed.
Testing
Build, lint, and the full unit suite green; the final tree was verified
byte-identical across the consolidation, and a trial-merge across all open
branches confirmed the rename reconciliation against their new code is a
handful of identifier fixups.