Witness → Validator migration (Phase A, dual-support)#36
Merged
Conversation
Phase A dual-support strategy mirroring the JS/PHP libs: send new validator names on the wire, accept both old and new from callers with DeprecationWarning, tolerate responses from older nodes. Central compat module (vizbase/validator_compat.py) holds all old->new mappings so Phase C cleanup is a one-file deletion.
… is rebuilt with validator-renamed schema
Run on push only for master (post-merge validation) and on pull_request for all PRs. Add concurrency group so new pushes to a PR branch cancel any in-flight run, eliminating the testnet-Docker port collisions caused by the previous push+pull_request double-fire.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors the JS/PHP libs' Phase A migration: send validator names on the wire, accept both old and new from callers (with
DeprecationWarning), tolerate old nodes via runtimewitness_apifallback. No breaking changes for existing callers._DeprecatedAlias.make()op-class subclasses, kwarg translation, and dispatcher inbound translationNoSuchMethodfor avalidator_apicall, the dispatcher falls back towitness_api; result is cached perRpcinstance via_uses_legacy_witness_apiSingle source of truth:
vizbase/validator_compat.py(OP_NAME_ALIASES,API_METHOD_ALIASES,CHAIN_PROPS_FIELD_ALIASES,OP_FIELD_ALIASES,translate_kwargs,pick).Spec:
docs/superpowers/specs/2026-05-19-witness-to-validator-migration-design.mdPlan:
docs/superpowers/plans/2026-05-19-witness-to-validator-migration.mdTest plan
tests/test_validator_compat.py(alias dicts, op classes, dispatcher fallback, shim re-exports, parametrized coverage-drift tests across all alias dicts)/Users/babin/.venv/bin/poetry run pytest)vizblockchain/vizd:latestrebuild with validator-renamed genesis (gatestest_serialization::test_versioned_chain_properties_update,test_blockchain::test_stream_virtual_ops*)from viz.witness import Witnessstill works downstream (emits one-timeDeprecationWarning)Notes
61ccf15is a defect fix caught during review (plan's_canonical_filterwould have raisedTypeErroronfilter_by=[...]— extended to handle lists).