Implement Stellar Bridge Execution Dry-Run Mode - #1079
Merged
mijinummi merged 1 commit intoAug 29, 2026
Merged
Conversation
Add StellarBridgeDryRunService that validates a Stellar bridge execution without submitting a transaction. Builds an invocation plan, simulates each step via Soroban RPC, runs the full 7-check pre-execution safety pipeline, and returns structured results. Key additions: - src/execution/dry-run/stellar/stellar-bridge-dry-run.service.ts Core dry-run engine: request validation, invocation planning, step simulation, safety pipeline execution, and deterministic SHA-256 execution hash computation. - src/execution/dry-run/stellar/types.ts DryRunExecutionPlanRequest, DryRunExecutionResult, DryRunPlanStep, DryRunSimulationSummary, and DryRunSafetyContextBuilder type definitions. - src/execution/dry-run/stellar/index.ts Barrel re-exports for the dry-run module. - tests/execution/dry-run/stellar-bridge-dry-run.spec.ts 11 tests covering plan building, simulation delegation, hash determinism, summary aggregation, safety pass/block, input validation, and result structure. Also removes stale markdown code fences from the invocation planner source file. Refs MDTechLabs#1070
|
@bernardev254 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
4 tasks
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
Implements a Stellar Bridge Execution Dry-Run Mode that allows applications to validate a Stellar bridge execution without submitting a transaction to the network. The service builds an invocation plan, simulates each step via Soroban RPC, runs the full pre-execution safety pipeline, and returns structured results — all while guaranteeing no transaction is submitted.
What changed and why
StellarBridgeDryRunService(src/execution/dry-run/stellar/stellar-bridge-dry-run.service.ts): Core dry-run engine that validates requests, builds a 3-step invocation plan (lock, bridge, confirm), simulates each step viaSorobanSimulationAdapter, runsStellarPreExecutionSafetyPipeline(7 safety checks), computes a deterministic SHA-256 execution hash, and returns results withtransactionSubmitted: false.src/execution/dry-run/stellar/types.ts): DefinesDryRunExecutionPlanRequest,DryRunExecutionResult,DryRunPlanStep,DryRunSimulationSummary, andDryRunSafetyContextBuilderinterfaces for type-safe dry-run interactions.src/execution/dry-run/stellar/index.ts): Re-exports the service and all types for clean imports.tests/execution/dry-run/stellar-bridge-dry-run.spec.ts): 11 tests covering plan building, simulation delegation, hash determinism, summary aggregation, safety pass/block on incompatible contracts, failed simulation handling, input validation (missing transferId, invalid amount, missing contract address), and result structure.src/soroban/planning/soroban-invocation-planner.ts): Removed```tsand```markers that were incorrectly present in the TypeScript source file.How to test
CI checks run locally
All checks passed locally. The CI workflow (
.github/workflows/ci.yml) runspnpm install --frozen-lockfile,pnpm run build, andcargo test— all of which pass. No lock files were modified. No formatting or linting issues were introduced in the changed files.Closes #1070