Repository navigation
Leios: new proto and header validation #2354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
966640e
protocol: parameterise Praos's header view by the signed body
ch1bo d97cff3
protocol: add Leios, an overlay on Praos
ch1bo a11cff5
protocol: track the announcement Leios certificates are checked against
ch1bo 60dc5c2
cardano: run Dijkstra on Leios
ch1bo ed7b335
shelley: check a header's Leios certificate claim against the body
ch1bo b25cc11
shelley: make the Leios instances say they are Praos's
ch1bo bac0162
Make haddocks more succinct
ch1bo cd2ea85
Update ledger for mkHeader{Body} with era-based memoization
ch1bo ba66f7c
Drop seedInitialStakeSnapshots
ch1bo 7400fb5
Pass era into mkHeader
ch1bo 2b6e60d
Changelog: cover the whole Leios protocol PR
jasagredo 433cd75
Formatting and linting
ch1bo fbf3fcb
Minor refactor and an explanation for toEraCBOR @ShelleyEra
ch1bo 57556fd
Update header.cddl and accept changes to golden ledger state
ch1bo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
changelog.d/20261002_120000_sebastian.nagel_leios_protocol.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| ### Breaking | ||
|
|
||
| - The Dijkstra era now runs the new `Leios` protocol: it is | ||
| `ShelleyBlock (Leios c) DijkstraEra` instead of | ||
| `ShelleyBlock (Praos c) DijkstraEra`. This changes `CardanoShelleyEras`, | ||
| every `*Dijkstra` pattern synonym of `CardanoBlock`, `StandardDijkstraBlock`, | ||
| `DijkstraTxOut` and `DijkstraEbMeasure`. Dijkstra headers are now | ||
| `Cardano.Protocol.Leios.BlockHeader.Header`, and its chain-dependent state is | ||
| `LeiosState`, so the Dijkstra header and chain-dependent state encodings | ||
| change. | ||
| - `CardanoHardForkConstraints` now requires `LeiosCrypto c`. | ||
| - Removed the `ShelleyCompatible (Praos c) DijkstraEra` instance and the | ||
| `LeiosEraBlockHeader (Praos.Header c) DijkstraEra` instance that adapted the | ||
| Praos header to the Leios interface. | ||
| - `HeaderView` in `Ouroboros.Consensus.Protocol.Praos.Views` is now | ||
| `HeaderView' body crypto`, parameterised by the header body the KES | ||
| signature covers. `HeaderView crypto` remains as a type synonym for the | ||
| Praos body, but its data constructor is now `HeaderView'`. | ||
| - `validateKESSignature`, `doValidateKESSignature`, `validateVRFSignature` and | ||
| `doValidateVRFSignature` take a `HeaderView' body c`; the KES ones require | ||
| `KES.Signable (KES c) body`. | ||
| - Added `blockBodyContainsLeiosCert` to `ShelleyBasedEra` and | ||
| `pHeaderContainsLeiosCert` to `ProtocolHeaderSupportsEnvelope`. Neither has | ||
| a default, so instances must define them; eras and protocols without Leios | ||
| return `False` (`defaultHeaderContainsLeiosCert` does so for protocols). | ||
| - `fromShelleyLedgerExamplesPraos` (shelley testlib) is now polymorphic in the | ||
| protocol and takes a function rebuilding the example TPraos header as that | ||
| protocol's header. | ||
|
|
||
| ### Non-Breaking | ||
|
|
||
| - Added `Ouroboros.Consensus.Protocol.Leios`, Praos with the Leios header: | ||
| - `Leios`, its `ConsensusProtocol` instance and `LeiosCrypto`, which is | ||
| `PraosCrypto` plus signing the Leios header body. | ||
| - `LeiosConfig`, which wraps the Praos `ConsensusConfig`. | ||
| - `LeiosState`, which is `PraosState` plus the endorser-block announcement | ||
| (`AnnouncedBy`) of the last applied header, with its CBOR encoding. | ||
| - `LeiosHeaderView`, and `TranslateProto` instances from `Praos` and `TPraos`. | ||
| - Exported `praosVerifyHeaderIntegrity`, `reupdatePraosState`, | ||
| `validateKESSignature` and `validateVRFSignature` from | ||
| `Ouroboros.Consensus.Protocol.Praos`, for protocols built on Praos. | ||
| - Added `Ouroboros.Consensus.Shelley.Protocol.Leios` (the Shelley protocol | ||
| instances for `Leios`) and `Ouroboros.Consensus.Shelley.Node.Leios` | ||
| (`leiosSharedBlockForging`). Forged Leios headers do not yet announce an | ||
| endorser block or claim a certificate. | ||
| - Added `praosEnvelopeCheck` to `Ouroboros.Consensus.Shelley.Protocol.EnvelopeChecks`. | ||
| - Added the `Leios` instances for `ShelleyCompatible`, `LedgerSupportsProtocol`, | ||
| `HasPartialConsensusConfig` and `EncodeDisk`/`DecodeDisk LeiosState`. | ||
| - `blockMatchesHeader` for Shelley-based blocks now also rejects a block when: | ||
| - its header misreports whether the body carries a Leios certificate, or | ||
| - its body carries both a Leios certificate and transactions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+2 Bytes
(100%)
ouroboros-consensus-cardano/golden/cardano/CardanoNodeToNodeVersion2/Header_Dijkstra
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
...rdano/golden/cardano/QueryVersion3/CardanoNodeToClientVersion19/Result_Dijkstra_LedgerTip
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file modified
BIN
+4 Bytes
(100%)
ouroboros-consensus-cardano/golden/cardano/disk/ChainDepState_Dijkstra
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(91%)
ouroboros-consensus-cardano/golden/cardano/disk/ExtLedgerState_Allegra
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(93%)
ouroboros-consensus-cardano/golden/cardano/disk/ExtLedgerState_Alonzo
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(94%)
ouroboros-consensus-cardano/golden/cardano/disk/ExtLedgerState_Babbage
Binary file not shown.
Binary file modified
BIN
-73 Bytes
(96%)
ouroboros-consensus-cardano/golden/cardano/disk/ExtLedgerState_Conway
Binary file not shown.
Binary file modified
BIN
-69 Bytes
(97%)
ouroboros-consensus-cardano/golden/cardano/disk/ExtLedgerState_Dijkstra
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(92%)
ouroboros-consensus-cardano/golden/cardano/disk/ExtLedgerState_Mary
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(91%)
ouroboros-consensus-cardano/golden/cardano/disk/ExtLedgerState_Shelley
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(86%)
ouroboros-consensus-cardano/golden/cardano/disk/LedgerState_Allegra
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(90%)
ouroboros-consensus-cardano/golden/cardano/disk/LedgerState_Alonzo
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(90%)
ouroboros-consensus-cardano/golden/cardano/disk/LedgerState_Babbage
Binary file not shown.
Binary file modified
BIN
-73 Bytes
(94%)
ouroboros-consensus-cardano/golden/cardano/disk/LedgerState_Conway
Binary file not shown.
Binary file modified
BIN
-73 Bytes
(95%)
ouroboros-consensus-cardano/golden/cardano/disk/LedgerState_Dijkstra
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(88%)
ouroboros-consensus-cardano/golden/cardano/disk/LedgerState_Mary
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(85%)
ouroboros-consensus-cardano/golden/cardano/disk/LedgerState_Shelley
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(89%)
ouroboros-consensus-cardano/golden/shelley/disk/ExtLedgerState
Binary file not shown.
Binary file modified
BIN
-71 Bytes
(84%)
ouroboros-consensus-cardano/golden/shelley/disk/LedgerState
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do
dijkstra.headerhere?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what Javier did on the PR that just got merged into
main, FYI.