Skip to content

Conversation

@agustinmista
Copy link
Contributor

amesgen and others added 30 commits September 9, 2025 10:56
 - Avoid orphans

 - We actually can't check that the open states are consistent directly as we
   would need to statefully get that info from the SUT.
It makes sense to use this without using an entire PerasCertDB, so decouple
these.

It might be nice to rename PerasCertDB-bench, but doesn't seem like a priority.
using cabal-docspec (not yet nixified)
This is purely for concise QuickCheck counterexample output.
This is in preparation for weighted chain comparisons.
Also remove the version for `ValidatedChainDiff` as it is unused.
Brings in cardano-base and propagates a set of `CardanoFeatureFlag`s
from the top-level `RunNodeArgs` down to the `NodeKernelArgs`.

This is currently needed by an upcoming PR to the GSM to distinguish
whether having an established PerasCertDiffusion connection with a given
peer is necessary or not when trying to decide if such peer is idling.
Bumps the external ouroboros-network source-repository-package to the
updated peras-staging/pr-5202, which incorporates the changes from:

IntersectMBO/ouroboros-network#5202

In addition, it tweak call sites of `nodeToNodeProtocols` to match its
updated signature, passing down the enabled feature flags.
@agustinmista agustinmista self-assigned this Oct 17, 2025
@agustinmista agustinmista force-pushed the peras/enrich-shelley-blocks-with-certs branch from 24dba5c to 13e6fa7 Compare October 17, 2025 12:58

instance ShelleyCompatible proto era => Condense (ShelleyBlock proto era) where
condense = show . shelleyBlockRaw
condense = show . ((shelleyBlockHeader &&& shelleyBlockBody) &&& shelleyBlockPerasCert)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might want to tweak this instance.

@agustinmista agustinmista force-pushed the peras/enrich-shelley-blocks-with-certs branch 2 times, most recently from 65b3897 to a93ba8f Compare October 20, 2025 13:36
@agustinmista agustinmista force-pushed the peras/enrich-shelley-blocks-with-certs branch from a93ba8f to c0822d7 Compare October 20, 2025 13:46
@agustinmista agustinmista requested a review from amesgen October 20, 2025 14:00
Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

This looks good to me for now, let's wait until we get feedback from Ledger

Comment on lines +176 to +187
-- | Reconstruct a Shelley ledger block from a 'ShelleyBlock'.
--
-- TODO: we should be able to avoid this conversion in most cases
fromShelleyBlock :: ShelleyBlock proto era -> SL.Block (ShelleyProtocolHeader proto) era
fromShelleyBlock blk = SL.Block (shelleyBlockHeader blk) (shelleyBlockBody blk)

-- | Construct a 'ShelleyBlock' from a Shelley ledger block.
--
-- TODO: we should be able to avoid this conversion in most cases
toShelleyBlock ::
ShelleyCompatible proto era => SL.Block (ShelleyProtocolHeader proto) era -> ShelleyBlock proto era
toShelleyBlock (SL.Block hdr body) = mkShelleyBlock hdr body
Copy link
Member

Choose a reason for hiding this comment

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

We could also just store an SL.Block, but encode it differently. But either way, this conversion should be super cheap

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants