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

Aperta
#372 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
go

Direzione di ricerca

Inizia con l’interfaccia TokenBridge di #356, poi confronta i file PROMPT esistenti in pkg/relayer/engine con i file wayfinder elencati in questa issue. Esegui i test unitari e e2e PROMPT esistenti per comprendere il comportamento attuale. Il lavoro è completato quando i test devstack continuano a passare, engine non contiene import specifici del meccanismo e un secondo token in stile wayfinder richiede solo configurazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
Lingua principale
Go
Stelle
1
Fork
1
Merge medio
6h 59m
PR unite (30g)
6

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ChainSafe/canton-middleware

Tutte le issue di ChainSafe/canton-middleware

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.