feat(relayer): implement P2P gossip mesh and threshold BLS consensus engine - #425
Open
mijinummi wants to merge 1 commit into
Open
feat(relayer): implement P2P gossip mesh and threshold BLS consensus engine#425mijinummi wants to merge 1 commit into
mijinummi wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
jotel-dev
reviewed
Aug 24, 2026
jotel-dev
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this @mijinummi looks like groundwork (schema + telemetry) rather than the full BLS consensus logic itself. A couple of questions:
- Is the actual signature aggregation/threshold verification logic coming in a follow-up PR, or is this migration meant to support something already elsewhere in the codebase?
- For
telemetry.ts— is any sensitive data (keys, raw signatures) ever included in the telemetry payload?
Checks are passing and the diff itself looks clean, just want to understand scope before approving.
jotel-dev
reviewed
Aug 24, 2026
jotel-dev
left a comment
Contributor
There was a problem hiding this comment.
One more thing — node-ci / build is failing after ~25s. Could you check the logs and fix that up too? Once that's green and my scope/telemetry questions above are answered, happy to approve.
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
This PR transitions Velo’s cross-chain HTLC release flow from an isolated, single-relayer execution model to a fault-tolerant, decentralized, threshold-authorized settlement network.
closes #400
Previously, relayer nodes operated independently across Stellar/Soroban and EVM networks, introducing single points of failure, censorship risks, and reliance on single relayer keys. This PR introduces a Libp2p GossipSub mesh for relayer-to-relayer communication and a Threshold BLS Consensus Engine to coordinate and authorize HTLC releases off-chain before on-chain submission.
🛠️ Key Architectural Additions
1. Libp2p GossipSub P2P Mesh
velo:crosschain:gossip:v12. Threshold BLS Consensus Engine
3. State Persistence & Concurrency Control
018_add_relayer_bls_consensus.sqlintroducesrelayer_nodes,consensus_round_logs, and theconsensus_statusENUM.SELECT FOR UPDATEon consensus round records to prevent race conditions during concurrent P2P signature submissions.4. BLS Share Ingestion API & Asynchronous Worker
POST /api/v1/relayer/bls-share(Zod-validated, returns202 Accepted).velo:bls-dlq.5. On-Chain Verification Contracts
Extends both target settlement environments to verify aggregated BLS signatures prior to releasing locked funds:
contracts/atomic-swap/src/bls_verifier.rscontracts-evm/BLSVerifier.sol6. Relayer Consensus Dashboard
Telemetry dashboard (
apps/relayer/src/routes/telemetry.ts) providing real-time visibility into peer connectivity, node health, signature collection progress, and consensus lifecycle state.🛡️ Security & Risk Mitigation Matrix
SELECT FOR UPDATE) on consensus state.velo:bls-dlq).📁 Key File Modifications