Skip to content

Node 11.1 integration#2043

Draft
f-f wants to merge 1 commit into
mainfrom
f-f/prepare-11.1
Draft

Node 11.1 integration#2043
f-f wants to merge 1 commit into
mainfrom
f-f/prepare-11.1

Conversation

@f-f
Copy link
Copy Markdown

@f-f f-f commented May 18, 2026

Description

Integration for release 11.1 - here we update to the latest base/network/ledger

The patch should build but it's very much a starting point for discussion – I am not sure at all of all the changes and in fact I am sure that some of them are just not right.
So please help me out with filling the blanks and feel free to take over and push here directly to fix things up.

Comment thread ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/HFEras.hs Outdated
@f-f f-f force-pushed the f-f/prepare-11.1 branch from 582477b to a8fc1d6 Compare May 18, 2026 14:21
@geo2a geo2a self-assigned this May 18, 2026
Comment thread ouroboros-consensus.cabal Outdated
Comment thread cabal.project Outdated
Comment thread cabal.project
Comment thread cabal.project
Comment thread cabal.project
Comment on lines +69 to +77
let ProtVer m _ = SL.bprotver bhb
unless (m <= maxPV) $
throwError (ObsoleteNodeCHAIN m maxPV)
unless (bhHSize <= fromIntegral @Word16 @Int (ccMaxBHSize ccd)) $
throwError $
HeaderSizeTooLargeCHAIN bhHSize (ccMaxBHSize ccd)
unless (bhBSize <= ccMaxBBSize ccd) $
throwError $
BlockSizeTooLargeCHAIN bhBSize (ccMaxBBSize ccd)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this what was there in SL.chainChecks before?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

right, I wanted to bring this up but got distracted - I have inlined chainChecks here because the upstream one in ledger doesn't work due to constraints.

there is a duplicate implementation also in Praos, and after chatting with @lehins we agree that it might be best to just downstream chainChecks here entirely.
Then PraosEnvelopeError could become EnvelopeError and replace the ChainPredicateFailure from upstream, since it's the same type duplicated. Would that make sense to you @jasagredo?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this what was there in SL.chainChecks before?

In short chainChecks is not needed in ledger, it was always there only for Consensus consumption, which makes it more reasonable to move into Connsensus.

As @f-f pointed out, this implementation is exactly the same for Praos as it is for TPraos. I can give you a suggestion on how you could reduce this duplication, but I am sure you can figure out on your own. Now that both of those implementations are in Consensus it is obvious that they are the same and it should be trivial to deduplicate.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have unified the two checks and merged the two calls. The shared material is now in the new EnvelopeChecks module, have a look and let me know if you'd like a different approach!

Comment thread ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/HFEras.hs Outdated
Copy link
Copy Markdown
Contributor

@geo2a geo2a left a comment

Choose a reason for hiding this comment

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

Comment thread cabal.project
Comment thread ouroboros-consensus.cabal Outdated
Comment thread ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/HFEras.hs Outdated
Comment on lines +69 to +77
let ProtVer m _ = SL.bprotver bhb
unless (m <= maxPV) $
throwError (ObsoleteNodeCHAIN m maxPV)
unless (bhHSize <= fromIntegral @Word16 @Int (ccMaxBHSize ccd)) $
throwError $
HeaderSizeTooLargeCHAIN bhHSize (ccMaxBHSize ccd)
unless (bhBSize <= ccMaxBBSize ccd) $
throwError $
BlockSizeTooLargeCHAIN bhBSize (ccMaxBBSize ccd)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this what was there in SL.chainChecks before?

In short chainChecks is not needed in ledger, it was always there only for Consensus consumption, which makes it more reasonable to move into Connsensus.

As @f-f pointed out, this implementation is exactly the same for Praos as it is for TPraos. I can give you a suggestion on how you could reduce this duplication, but I am sure you can figure out on your own. Now that both of those implementations are in Consensus it is obvious that they are the same and it should be trivial to deduplicate.

@f-f f-f force-pushed the f-f/prepare-11.1 branch 2 times, most recently from 2ead6f4 to 52baebd Compare May 20, 2026 09:41
Comment on lines +177 to +178
-- TODO: cardano-base PR #635 exposed 'minSigPoPDST' and 'minVerKeyPoPDST' but not the
-- corresponding plain-signature ciphersuites. Should these be upstreamed as well?
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@perturbing should minSigSignatureDST be upstreamed or how can we replace it here? I'd like to do something with it because right now we have to import Cardano.Crypto.DSIGN.BLS12381.Internal to make it work and I'd rather not

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should switch to

import Cardano.Crypto.DSIGN.BLS12381
  ( BLS12381MinSigDSIGN
  , minSigPoPDST
  )

But that is probably not yet on CHaP.

Also note that in this PR you switch from

    { blsSignContextDst = Just "BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_POP_"

to

    { blsSignContextDst = Just "BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_NUL_"

But this is wrong. You should use exactly

https://github.com/IntersectMBO/cardano-base/blob/d6e5c68bbb87f528fc1926a32c462c5bf06f1782/cardano-crypto-class/src/Cardano/Crypto/DSIGN/BLS12381/Internal.hs#L137

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for having a look!

Note that I did not switch to the plain one, I just removed the PoP variant from here because we are using the one in base.
I have now removed both and moved to using PoP everywhere. Could you have another look?

@f-f f-f force-pushed the f-f/prepare-11.1 branch from 115019e to 1d927dd Compare May 22, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants