feat(relayer): port PROMPT to wayfinder adapter, remove legacy pipeline

オープン
#372 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
go

調査の方向性

#356 の TokenBridge インターフェースから始め、次に pkg/relayer/engine にある既存の PROMPT ファイルと、この issue に記載されている wayfinder ファイルを比較します。現在の動作を理解するため、既存の PROMPT のユニットテストと e2e テストを実行します。devstack テストが引き続き成功し、engine にメカニズム固有の import がなく、wayfinder スタイルの 2 つ目のトークンを設定のみで追加できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

CIP-0086: Phase 2 Deliverable: D3 Status: On Ice Type: Feature

Goal

Port PROMPT bridging from the legacy relayer pipeline (processor + source/destination + reconcile loop) to a wayfinder adapter under the TokenBridge interface introduced in #356, then delete the legacy pipeline. Deferred from #356 to keep the USDCx track unblocked (see epic #361).

Work items

  • pkg/relayer/bridges/wayfinder/ — bridge.go (Key, Sources, Step), source_eth.go + source_canton.go (moved from engine/source.go), convert.go (per-token decimals replacing const decimalPlaces = 18)
  • Step, deposit: idempotency check -> CreatePendingDeposit -> ProcessDepositAndMint -> completed (single step, as today)
  • Step, withdrawal: "" -> eth_submitted -> completed; folding CompleteWithdrawal into a stage fixes the existing gap where the retry path skips the post-submit hook
  • Resolve token from the deposit event's token field via config (finally using CantonBridge.sol's existing ethereumToCantonToken mappings)
  • Delete engine/processor.go, engine/destination.go, engine/source.go and the reconcile loop; PROMPT config moves fully into the per-token Tokens map
  • Migrate/regenerate mocks; existing PROMPT unit + e2e tests pass unchanged

Acceptance

  • PROMPT deposits and withdrawals behave identically on devstack (existing e2e green)
  • pkg/relayer/engine has no imports of pkg/cantonsdk/bridge or pkg/ethereum contract bindings — all mechanism-specific code lives under bridges/
  • Adding a second wayfinder-style token is config-only
  • In-flight transfers created by the legacy pipeline complete correctly after the cutover (rows already keyed bridge_key=wayfinder by #356's migration)

Depends on

  • #356 (foundation)
主要言語
Go
スター
1
フォーク
1
平均マージ
6時間 59分
マージ済み PR(30日)
6

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ChainSafe/canton-middleware のほかの issue

ChainSafe/canton-middleware の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。