Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.6", "9.12"]
ghc: ["9.6", "9.12", "9.14"]
os: [ubuntu-latest]

env:
Expand Down
111 changes: 42 additions & 69 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ repository cardano-haskell-packages
-- repeat the index-state for hackage to work around haskell.nix parsing limitation
index-state:
-- Bump this if you need newer packages from Hackage
, hackage.haskell.org 2026-06-29T22:49:53Z
, hackage.haskell.org 2026-07-30T07:30:12Z

-- Bump this if you need newer packages from CHaP
, cardano-haskell-packages 2026-07-02T10:10:00Z
, cardano-haskell-packages 2026-07-30T16:22:40Z

packages:
./dmq-node
Expand All @@ -33,70 +33,43 @@ if(os(windows))
constraints:
bitvec -simd

if impl(ghc >= 9.12.0)
allow-newer: *:time,
*:nothunks,

-- rejecting: cardano-crypto-class-2.3.1.0 (conflict: cardano-crypto-tests => cardano-crypto-class>=2.2.2 && <2.2.4)
-- allow-newer: cardano-crypto-tests:cardano-crypto-class

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network.git
tag: 9e45c79049bd5f20e3de308ee8203c201aa61f9e
--sha256: sha256-dK8taHnenl4D18bOxepXstO0hq7RWj2jnaxECPOT+ew=
subdir:
cardano-diffusion
network-mux
ouroboros-network
acts-generic

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus.git
tag: e37ba209ffdbdcb3cc8e7a9cb0fb6d6fa7cce8a3
--sha256: sha256-srdli4YUIo3HtdWwpk2Tq5okk4GQ5Fpn/ipFO8eykVU=
subdir:
.

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger.git
tag: 245e63dcd335e3ca29823609e4aaa8f5f096a425
--sha256: sha256-chsapfNnY/V7y1snBzjP0LSVnYl/Axt6GjahTPNOKj0=
subdir:
eras/allegra/impl
eras/alonzo/impl
eras/babbage/impl
eras/byron/chain/executable-spec
eras/byron/crypto
eras/byron/ledger/executable-spec
eras/byron/ledger/impl
eras/conway/impl
eras/dijkstra/impl
eras/mary/impl
eras/shelley-ma/test-suite
eras/shelley/impl
eras/shelley/test-suite
libs/cardano-data
libs/cardano-ledger-api
libs/cardano-ledger-binary
libs/cardano-ledger-core
libs/cardano-protocol-tpraos
libs/non-integral
libs/small-steps
libs/vector-map

source-repository-package
type: git
location: https://github.com/f-f/kes-agent.git
tag: 32c1ed675d22a30735d9f22f7afa436a3ef3e64a
--sha256: sha256-o7hFX1JnraS6Xq0WoXQwd9Z8GsPPv0Ls2DWvZ08o0ZU=
subdir:
kes-agent
kes-agent-crypto

constraints: semialign >= 1.4,
validation >= 1.2 && < 2.0
allow-newer: hedgehog-quickcheck:QuickCheck,
monoidal-containers:semialign
if impl(ghc >= 9.14.0)
Comment thread
coot marked this conversation as resolved.
allow-newer:
-- https://github.com/well-typed/canonical-json/issues/12
, canonical-json:containers

-- https://github.com/well-typed/cborg/issues/373
, cborg:base
, cborg:containers
, cborg-json:base

-- https://github.com/well-typed/cborg/issues/373
, serialise:base
, serialise:containers

-- https://github.com/IntersectMBO/ouroboros-network/issues/5407
, serialise:time
, directory:time

-- https://github.com/phadej/tdigest/issues/50
, tdigest:base

-- https://github.com/serokell/haskell-with-utf8/issues/41
, with-utf8:base

-- https://github.com/ezyang/compact/issues/24
, compact:base

-- https://github.com/amesgen/safe-wild-cards/issues/5
, safe-wild-cards:template-haskell

, serdoc-core:template-haskell

-- https://github.com/JonasDuregard/dictionary-sharing/issues/4
, dictionary-sharing:containers

-- https://github.com/obsidiansystems/dependent-map/issues/59
, dependent-map:containers

-- https://github.com/dmwit/ordered-containers/issues/33
, ordered-containers:containers
21 changes: 20 additions & 1 deletion dmq-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@
<!-- scriv-insert-here -->

<a id='changelog-0.7.0.0'></a>
## 0.7.0.0 -- 2026-07-03
## 0.7.0.0 -- 2026-07-31

### Breaking

- Added PeerSelectionPolicy's rng to `NodeKernel`. This allowed to create the
policy in `diffusionApplications` rather than in the `main` module.
Comment thread
coot marked this conversation as resolved.

- Using `tx-submission` undecision logic:
- `NodeKernel` data type changed to adapt to the new tx-submission logic
- `SigMempoolResult` is provided by `DMQ.Diffusion.PeerSelection.PeerMetric` module.
- `sigSubmissionLogicPeerTracer` was removed from `DMQTracers`
- `sigDecisionPolicy :: TxDecisionPolicy` was adapted to the new tx-submission logic

- Using `KeepAliveRegistry` instead of `FetchClientRegistry` introduced in
a recent `ouroboros-network` PR. The `fetchClientRegistry` field of
`NodeKernel` was replaced with `keepAliveRegistry` field.
Expand All @@ -15,6 +24,16 @@

### Non-Breaking

- Peer sharing delays and timeouts in `PeerSelectionPolicy`
- Explicit cborg error in local-msg-notification protocol
- Added tracers for NtC connection with `cardano-node`:
- hanshake mini-protocol tracer
- mux tracer
- mux channel tracer
- mux bearer tracer

- Integrated with `trace-dispatcher ^>= 2.13.0` and `contra-tracer >= 0.2.1.0`

- Added `PrettyShow` instances for
- `NodeToNodeVersion`
- `NodeToNodeVersionData`
Expand Down
28 changes: 0 additions & 28 deletions dmq-node/changelog.d/20260707_092212_coot_dmq_changes.md

This file was deleted.

25 changes: 0 additions & 25 deletions dmq-node/changelog.d/20260710_092801_coot_prepare_11_1.md

This file was deleted.

11 changes: 6 additions & 5 deletions dmq-node/dmq-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ library
cardano-slotting,
cardano-strict-containers,
cborg >=0.2.1 && <0.3,
containers >=0.5 && <0.8,
containers >=0.5 && <0.9,
contra-tracer >=0.1 && <0.3,
deepseq >=1.0 && <1.6,
directory,
Expand All @@ -131,17 +131,17 @@ library
mmap,
mtl,
network ^>=3.2.7,
network-mux ^>=0.10,
network-mux ^>=0.11,
nothunks,
optparse-applicative >=0.18 && <0.20,
ouroboros-consensus:{ouroboros-consensus, cardano, diffusion},
ouroboros-network:{ouroboros-network, api, framework, orphan-instances, protocols, tracing} ^>=1.1.0.0,
ouroboros-consensus:{ouroboros-consensus, cardano, diffusion} ^>=4.0,
ouroboros-network:{ouroboros-network, api, framework, orphan-instances, protocols, tracing} ^>=1.2,
psqueues,
quiet,
random ^>=1.3,
singletons,
text >=1.2.4 && <2.2,
time >=1.12 && <1.15,
time >=1.12 && <1.17,
trace-dispatcher ^>=2.13.0,
transformers,
transformers-except,
Expand Down Expand Up @@ -211,6 +211,7 @@ test-suite dmq-tests
QuickCheck,
base >=4.14 && <4.23,
bytestring,
cardano-binary,
cardano-crypto-class:{cardano-crypto-class, testlib},
cardano-ledger-api,
cardano-ledger-core,
Expand Down
16 changes: 7 additions & 9 deletions dmq-node/src/DMQ/Protocol/SigSubmission/Codec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ import Cardano.Crypto.Hash.Class (hashFromBytes, hashToBytesShort)
import Network.TypedProtocol.Codec.CBOR

import Cardano.Binary (FromCBOR (..), ToCBOR (..))
import Cardano.Crypto.DSIGN.Class (decodeSignedDSIGN, decodeVerKeyDSIGN,
encodeSignedDSIGN)
import Cardano.Crypto.KES.Class (decodeSigKES, decodeVerKeyKES, encodeVerKeyKES)
import Cardano.Binary.FixedSizeCodec (decodeFixedSized, encodeFixedSized)
import Cardano.KESAgent.KES.Crypto (Crypto (..))
import Cardano.KESAgent.KES.OCert (OCert (..))

Expand Down Expand Up @@ -119,21 +117,21 @@ encodeSigOpCertificate :: Crypto crypto
=> SigOpCertificate crypto -> CBOR.Encoding
encodeSigOpCertificate (SigOpCertificate ocert) =
CBOR.encodeListLen 4
<> encodeVerKeyKES (ocertVkHot ocert)
<> encodeFixedSized (ocertVkHot ocert)
<> toCBOR (ocertN ocert)
<> toCBOR (ocertKESPeriod ocert)
<> encodeSignedDSIGN (ocertSigma ocert)
<> encodeFixedSized (ocertSigma ocert)


decodeSigOpCertificate :: forall s crypto. Crypto crypto
=> CBOR.Decoder s (SigOpCertificate crypto)
decodeSigOpCertificate = do
len <- CBOR.decodeListLen
when (len /= 4) $ fail (printf "decodeSigOpCertificate: unexpected number of parameters %d" len)
ocertVkHot <- decodeVerKeyKES
ocertVkHot <- decodeFixedSized
ocertN <- fromCBOR
ocertKESPeriod <- fromCBOR
ocertSigma <- decodeSignedDSIGN
ocertSigma <- decodeFixedSized
return $ SigOpCertificate $ OCert {
ocertVkHot,
ocertN,
Expand Down Expand Up @@ -175,9 +173,9 @@ decodeSig = do
endOffset <- CBOR.peekByteOffset
-- end of signed data

sigRawKESSignature <- SigKESSignature <$> decodeSigKES
sigRawKESSignature <- SigKESSignature <$> decodeFixedSized
sigRawOpCertificate <- decodeSigOpCertificate
sigRawColdKey <- SigColdKey <$> decodeVerKeyDSIGN
sigRawColdKey <- SigColdKey <$> decodeFixedSized
return $ \bytes -- ^ full bytes of the message, not just the sig part
-> SigRawWithSignedBytes {
sigRawSignedBytes = Utils.bytesBetweenOffsets startOffset endOffset bytes,
Expand Down
9 changes: 3 additions & 6 deletions dmq-node/src/DMQ/Protocol/SigSubmission/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ deriving instance ( DSIGNAlgorithm (KES.DSIGN crypto)
)
=> Eq (SigRaw crypto)

instance Crypto crypto
=> ToJSON (SigRaw crypto) where
instance ToJSON (SigRaw crypto) where
toJSON SigRaw { sigRawId
, sigRawKESPeriod
, sigRawExpiresAt
Expand Down Expand Up @@ -207,8 +206,7 @@ deriving instance ( DSIGNAlgorithm (KES.DSIGN crypto)
)
=> Eq (SigRawWithSignedBytes crypto)

instance Crypto crypto
=> ToJSON (SigRawWithSignedBytes crypto) where
instance ToJSON (SigRawWithSignedBytes crypto) where
toJSON SigRawWithSignedBytes {sigRaw} = toJSON sigRaw

instance Crypto crypto
Expand Down Expand Up @@ -247,8 +245,7 @@ deriving instance ( DSIGNAlgorithm (KES.DSIGN crypto)
)
=> Eq (Sig crypto)

instance Crypto crypto
=> ToJSON (Sig crypto) where
instance ToJSON (Sig crypto) where
toJSON SigWithBytes {sigRawWithSignedBytes} = toJSON sigRawWithSignedBytes

instance Crypto crypto
Expand Down
9 changes: 5 additions & 4 deletions dmq-node/test/DMQ/Protocol/SigSubmission/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ import System.IO.Unsafe (unsafePerformIO)
import Network.TypedProtocol.Codec
import Network.TypedProtocol.Codec.Properties hiding (prop_codec)

import Cardano.Binary.FixedSizeCodec (encodeFixedSized)
import Cardano.Crypto.DSIGN.Class (DSIGNAlgorithm, SignKeyDSIGN,
deriveVerKeyDSIGN, encodeVerKeyDSIGN)
deriveVerKeyDSIGN)
import Cardano.Crypto.DSIGN.Class qualified as DSIGN
import Cardano.Crypto.Hash.Blake2b (Blake2b_256)
import Cardano.Crypto.Hash.Class (Hash, castHash, hashFromBytes, hashSize,
hashWith)
import Cardano.Crypto.KES.Class (KESAlgorithm (..), VerKeyKES, encodeSigKES)
import Cardano.Crypto.KES.Class (KESAlgorithm (..), VerKeyKES)
import Cardano.Crypto.KES.Class qualified as KES
import Cardano.Crypto.PinnedSizedBytes (PinnedSizedBytes, psbToByteString)
import Cardano.Crypto.Seed (mkSeedFromBytes)
Expand Down Expand Up @@ -540,9 +541,9 @@ encodeSigRaw sigRaw@SigRaw { sigRawId, sigRawKESSignature, sigRawOpCertificate,
CBOR.encodeListLen 5
<> encodeSigId sigRawId
<> encodeSigPayload sigRaw
<> encodeSigKES (getSigKESSignature sigRawKESSignature)
<> encodeFixedSized (getSigKESSignature sigRawKESSignature)
<> encodeSigOpCertificate sigRawOpCertificate
<> encodeVerKeyDSIGN (getSigColdKey sigRawColdKey)
<> encodeFixedSized (getSigColdKey sigRawColdKey)

-- note: KES signature is updated by updateSigFn
shrinkSigFn :: forall crypto.
Expand Down
3 changes: 0 additions & 3 deletions dmq-node/test/Test/DMQ/SigSubmission/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import Ouroboros.Network.ControlMessage (ControlMessage (..), ControlMessageSTM)
import Ouroboros.Network.Driver
import Ouroboros.Network.Protocol.TxSubmission2.Type (NumTxIdsToReq (..))
import Ouroboros.Network.TxSubmission.Inbound.V2
import Ouroboros.Network.Util.ShowProxy

import DMQ.Diffusion.PeerSelection.PeerMetric (PeerMetricState (..),
TraceLabelPeer (..), announcinessImpl, peerMetricVar)
Expand Down Expand Up @@ -253,8 +252,6 @@ runSigSubmissionV2
, MonadTime m
, MonadTimer m
, MonadTraceSTM m
, ShowProxy sigid
, Typeable sigid
, Show peeraddr
, Ord peeraddr
, Typeable peeraddr
Expand Down
Loading
Loading