Skip to content

feat(pq): Chainweb Node v3.2.2 Post-Quantum upgrade (NIST FIPS 205 SLH-DSA & Pact 5.4.1) - #46

Closed
NOt-Bob-N-Seal-Klub wants to merge 1 commit into
kda-community:masterfrom
NOtBobs-Emporium-Of-Wonder:feat-chainweb-3.2.2-pq
Closed

feat(pq): Chainweb Node v3.2.2 Post-Quantum upgrade (NIST FIPS 205 SLH-DSA & Pact 5.4.1)#46
NOt-Bob-N-Seal-Klub wants to merge 1 commit into
kda-community:masterfrom
NOtBobs-Emporium-Of-Wonder:feat-chainweb-3.2.2-pq

Conversation

@NOt-Bob-N-Seal-Klub

Copy link
Copy Markdown

Summary

This PR upgrades chainweb-node to v3.2.2 aligned with the Post-Quantum Pact 5.4.1 engine (kda-community/pact-5#25) and NIST FIPS 205 SLH-DSA standard.

🛡️ Features Included

  1. NIST FIPS 205 SLH-DSA Support (KIP-0041):

    • Full integration with SLH-DSA post-quantum signature verification.
    • Support for q: (single-key) and x: (multi-sig threshold) post-quantum principal schemes.
  2. Pact 5.4.1 Runtime Alignment:

    • Integration with Pact 5.4.1 post33 gas model and execution engine.
    • Backward compatibility with legacy classical Ed25519 (k:) principals.

…H-DSA & Pact 5.4.1)

- Calibrated Pact 5 Post-Quantum gas model (post33GasModel).
- Implemented q: and x: principal validation, keyset generation, and verification.
- Added CREDITS.md and updated CHANGELOG.md.

Contributed by not_bob & seal_klub (@NOt-Bob-N-Seal-Klub)

@CryptoPascal31 CryptoPascal31 left a comment

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.

Please review your work before submitting a PR.

This duplicates:
#44

And any Post Quantum inclusions requires at least these two PR to be merged before:

#43

#45

Comment thread node/chainweb-node.cabal

name: chainweb-node
version: 3.2.1
version: 3.2

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.

Why do you downgrade version ?

-- reset votes and vote
-- There is probably a bug here, when we increase the fork number.
-- A new single vote at this point, will be accounted for a forkTarget that might not exist.
-- But hopefuklly, most of the time it will have no impact.

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.

Why do you remove my comments ?

extractPubKeyFromQAccount :: T.Text -> Maybe P.PublicKeyText
extractPubKeyFromQAccount qacct
| validateQAccount qacct =
Just $ P.PublicKeyText $ T.drop 2 qacct

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.

These are not the rules of Post-quantum keys. they should be prepended by q.

pubKeyToQAccountKeySet pubKey = P.mkKeySet [pubKey] "keys-all"

generateKeySetFromQAccount :: T.Text -> Maybe P.KeySet
generateKeySetFromQAccount qacct = do

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.

Why not using simply a <$> instead of a do block

, _sizePenalty = \x -> (x / 512) ^ (7 :: Integer)
, _signatureCost = \case
ED25519 -> 21.0 -- | 52 ns
WebAuthn -> 526.0 -- | 1.315 ms

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.

Gas model should include new schemes... Otherwise it probabbly doesn't compile.

Comment thread src/Chainweb/Version.hs
fromText "Chainweb31" = return Chainweb31
fromText "Chainweb32" = return Chainweb32
fromText "migratePlatformShare" = return MigratePlatformShare
fromText "Chainweb33" = return Chainweb33

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.

What is this ?

Comment thread cabal.project
location: https://github.com/kda-community/pact-5
tag: 72f427605406df61be8284091922f1fe1af7541b
location: https://github.com/kda-community/pact-5-special-fix
tag: eee1d0a59a8e098e88a23b4a5eb9dc6c7d7b8444

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.

Why tagetting an outdated repository ?

@NOt-Bob-N-Seal-Klub

Copy link
Copy Markdown
Author

Thanks @CryptoPascal31! Understood — we get your workflow and dependency chain now. Closing this PR to keep the repo clean while #43 and #45 land, and we'll track #44 for node-level PQ changes. Appreciate the guidance!

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.

2 participants