Skip to content

SigSubmission v2#16

Open
the-headless-ghost wants to merge 14 commits intomainfrom
edgr/sig-submission-v2
Open

SigSubmission v2#16
the-headless-ghost wants to merge 14 commits intomainfrom
edgr/sig-submission-v2

Conversation

@the-headless-ghost
Copy link
Member

@the-headless-ghost the-headless-ghost commented Jan 15, 2026

List of changes

Closes #13

Checklist

  • related issue
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

coot and others added 4 commits January 28, 2026 10:07
Verify that `Sig` encoding produces a valid CBOR.
`SigSubmissionV2` protocol based on `ObjectDiffusion` from Peras.  The
client requests signatures while the server provides them (dual to
`TxSubmission`).  The patch provides:

* protocol definition and GADT wrappers
* CBOR codec
* cddl specification checked against the codec
* codec provides valid CBOR encoding (checked as a regular QC test
  rather than with the `cddl` tool)
@the-headless-ghost the-headless-ghost marked this pull request as ready for review January 28, 2026 02:19
@coot coot changed the title Edgr/sig submission v2 SigSubmission v2 Feb 11, 2026
Comment on lines +284 to +322
let servers = (\(addr, (mempool, _, _, inDelay, _, inChannel)) -> do
let server = sigSubmissionOutbound
(Tracer $ say . show)
(NumIdsAck $ getNumTxIdsToReq $ maxUnacknowledgedTxIds sigDecisionPolicy)
(getMempoolReader mempool)
(maxBound :: TestVersion)
runPeerWithLimits
(("OUTBOUND " ++ show addr,) `contramap` tracer)
sigSubmissionCodec2
(byteLimitsSigSubmissionV2 (fromIntegral . BSL.length))
timeLimitsSigSubmissionV2
(maybe id delayChannel inDelay inChannel)
(sigSubmissionV2OutboundPeer server)
)
<$> Map.assocs st

let clients = (\(addr, (_, ctrlMsgSTM, outDelay, _, outChannel, _)) -> do
withPeer tracerSigLogic
sigChannelsVar
sigMempoolSem
sigDecisionPolicy
sharedSigStateVar
(getMempoolReader inboundMempool)
(getMempoolWriter inboundMempool)
getTxSize
addr $ \(api :: PeerTxAPI m TxId (Tx TxId))-> do
let client = sigSubmissionInbound
verboseTracer
(getMempoolWriter inboundMempool)
api
ctrlMsgSTM
runPipelinedPeerWithLimits
(("INBOUND " ++ show addr,) `contramap` verboseTracer)
sigSubmissionCodec2
(byteLimitsSigSubmissionV2 (fromIntegral . BSL.length))
timeLimitsSigSubmissionV2
(maybe id delayChannel outDelay outChannel)
(sigSubmissionV2InboundPeerPipelined client)
) <$> Map.assocs st
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should have multiple servers (outbound sides), and a single client (inbound side) - which is different from tx-submission where we need a single server (inbound side), but multiple clients (outbound sides).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

SigSubmission node-to-node mini-protocol

3 participants