feat: bankd proto definitions + AnyClientState enum dispatch (#39, #42) - #5286
Open
jackzampolin wants to merge 5 commits into
Open
feat: bankd proto definitions + AnyClientState enum dispatch (#39, #42)#5286jackzampolin wants to merge 5 commits into
jackzampolin wants to merge 5 commits into
Conversation
* rm old testnet files * rm old testnets * 000-localnet * optional multiple validators * fix: simplify to single-validator local network Removed multi-validator support to simplify the deployment. Single validator doesn't need peer discovery, so we just clear seeds to avoid PEX errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…yer (#39, #42) Introduce multi-client-aware IBC handling by adding bankd light client proto definitions and an enum-based dispatch layer that replaces hardcoded Tendermint-only type checks. - Add `ibc.lightclients.bankd.v1` proto (ClientState, ConsensusState, Header, Misbehaviour) and generate Rust types via prost - Split `.ibc` extern_path in proto-compiler into granular paths so bankd types are generated locally while other IBC types still resolve to ibc_proto - Create `AnyClientState`, `AnyConsensusState`, `AnyHeader` enums with `TryFrom<Any>` / `Into<Any>` conversions and accessor methods - Create `ClientProvider` trait for pluggable header verification - Remove 8 Tendermint-specific validation functions from ics02_validation (~65 lines), replacing them with enum-based dispatch in handlers - Refactor create_client, update_client, and misbehavior handlers to use the new enum types - Existing tests (test_create_and_update_light_client, test_disabled_ibc_component) exercise the Tendermint path end-to-end and continue to pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
ibc.lightclients.bankd.v1proto definitions (ClientState, ConsensusState, Header, Misbehaviour) — the wire format for futureMsgCreateClient/MsgUpdateClientpayloads for the bankd light clientAnyClientState,AnyConsensusState,AnyHeaderenum dispatch layer that makes the IBC codebase multi-client-aware, replacing 8 hardcoded Tendermint-only validation functionsClientProvidertrait for pluggable header verificationcreate_client,update_client, andmisbehaviorhandlers to use enum-based dispatchTest plan
cargo check— full workspace compiles cleancargo test -p penumbra-sdk-ibc— all 3 runtime tests pass:test_create_and_update_light_client— exercises the full Tendermint create+update path end-to-end through the refactored handlerstest_disabled_ibc_component— validates handler dispatch with IBC disabledtest_derive_ibc_denom— IBC token derivation (unrelated but confirms no regressions)AnyClientState::try_from(Any)round-trips for Tendermint types (covered implicitly by existing integration test)type_urlrejected with clear error messageclient_recovery.rsis unrelated (pseudo-code example missing imports, fails onmaintoo)🤖 Generated with Claude Code