refactor: introduce c2m-bridge pallet#1386
Merged
Merged
Conversation
fbf793c to
d45f821
Compare
Contributor
Author
|
/bot rebuild-metadata |
Contributor
|
✅ Metadata rebuild complete! Changes have been committed. |
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
Klapeyron
reviewed
Apr 23, 2026
Klapeyron
reviewed
Apr 23, 2026
Klapeyron
reviewed
Apr 23, 2026
Klapeyron
reviewed
Apr 23, 2026
Klapeyron
reviewed
Apr 23, 2026
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
Klapeyron
approved these changes
Apr 23, 2026
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
cosmir17
added a commit
to midnightntwrk/midnight-indexer
that referenced
this pull request
Jun 8, 2026
….0.0-alpha.1 The c2m-bridge pallet (PR midnightntwrk/midnight-node#1386 et al.) lands in node 2.0.0-alpha.1 metadata, so the scaffold that was previously blocked on missing metadata can be activated. The pallet ships inert; events only fire after governance enables it (set MainChainScripts + data checkpoint), so this just establishes the decoding path. Changes: - `runtimes.rs::BlockDetails`: uncomment `bridge_pallet_events` field. - `runtimes/v2_0_0.rs`: declare local `bridge_pallet_events` accumulator, add full `Event::C2MBridge(_)` match arm decoding all 5 variants (UserTransfer, ReserveTransfer, InvalidTransfer, UnapprovedTransfer, SubminimalFlushTransfer), and return them via BlockDetails. - `recipient.0.0` resolves as `Vec<u8>` directly (drop the earlier `.into_inner()` — BoundedVec wrapper not present in the regenerated metadata). - `runtimes/v1_0_0.rs`, `runtimes/v0_22_0.rs`: return `bridge_pallet_events: vec![]`. The pallet does not exist in node 1.0 or 0.22 metadata; the v1_0_0 scaffold (commented out, with a TODO) is removed and replaced with a one-line pointer to v2_0_0. - `subxt_node.rs`: destructure `bridge_pallet_events` from BlockDetails and wire it through to the `Block` construction, replacing the `Default::default()` placeholder. Add a `DecodeBridgeRecipient` variant on `SubxtNodeError` so `BridgeRecipient::new(...)` failures propagate via `?` instead of being shoe-horned into the `DecodeEvent(Box<EventsError>)` variant. - Migration: rename `indexer-common/migrations/sqlite/004_bridge_events.sql` to `005_bridge_events.sql` to resolve the collision with main's `004_block_tree_end_indexes.sql` (PR #1197). Postgres bridge migration stays at `004_bridge_events.sql` (no collision there). Build clean on `cargo check --workspace --features cloud` and `--features standalone`, clippy clean with `-D warnings` on both features (env vars sourced from `.envrc`), schema regen no-op (the bridge GraphQL surface was already in place from earlier bridge commits on this branch). Remaining unfinished work (not in this commit, separate plumbing chain): - `ClaimKind::CardanoBridge` -> `BridgeClaim` storage path (`indexer-common/src/domain/ledger/ledger_state.rs` ClaimRewards arms for v8 and v9, `ApplyRegularTransactionOutcome.bridge_claim` plumbing, `chain-indexer/src/domain/transaction.rs::RegularTransaction.bridge_claim`, `chain-indexer/src/infra/storage.rs::save_regular_transaction` calling the already-present `save_bridge_claim`). All TODOs marked `TODO(bridge):` in the affected files.
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.
Overview
🗹 TODO before merging
📌 Submission Checklist
🧪 Testing Evidence
Please describe any additional testing aside from CI:
🔱 Fork Strategy
Links