Because the transaction generator runs a TxSubmission protocol peer, it has to use its type language, which includes GenTxId blk. Internally the generator uses cardano-api's TxId type.
So we need a conversion function like fromGenTxId :: Mode mode era -> GenTxId (BlockOf mode) -> TxId,
paired with a BlockOf mode function, similarly to #1853 & #1861. Note that the mode-indexed GADT Mode doesn't exist in cardano-api (but does in the generator) -- some tagged GADT is needed to both bind the mode (so the block type can be computed by BlockOf) and to dispatch in the implementation.
This is currently implemented in the generator as follows:
Internal
Describe the feature you'd like
Because the transaction generator runs a
TxSubmission
protocol peer, it has to use its type language, which includesGenTxId blk
. Internally the generator usescardano-api
'sTxId
type.So we need a conversion function like
fromGenTxId :: Mode mode era -> GenTxId (BlockOf mode) -> TxId
, paired with aBlockOf mode
function, similarly to #1853 & #1861. Note that the mode-indexed GADTMode
doesn't exist incardano-api
(but does in the generator) -- some tagged GADT is needed to both bind the mode (so the block type can be computed byBlockOf
) and to dispatch in the implementation.This is currently implemented in the generator as follows: