[DO-NOT-MERGE] Leios prototype#5626
Conversation
Why do we need a separate PR, instead of merging individual features needed for Leios one at a time? |
This PR is for Leios prototype transparency and as such it's not intended to be merged and end up in production code. Similar to IntersectMBO/cardano-node#6386 and IntersectMBO/ouroboros-consensus#1793. Does that make sense? |
No, not really. What is the end goal of all the changes in a PR like this: IntersectMBO/ouroboros-consensus#1793 Is it going to be used only for prototyping and doing demos and later scrapped and reimplemented from scratch as a sequence of many more smaller PRs? If that is the case, then it is totally fine. However, if the goal is to prototype for a year and then create from that prototyping work one massive PR that is impossible to review, then it definitely does not make sense. Feel free to keep it opened, it does not get in a way of anything. I just want to make sure we do not get in a situation where Leios is implemented in one spaghetti PR, cause that is not how we develop features in Ledger! |
Exactly this! |
input-output-hk/ouroboros-leios#774 DONE - [x] **Ledger**: IntersectMBO/cardano-ledger#5626 - [x] New `Block` fields `blockMayAnnouncedEb :: Maybe EbHash` and `blockCertifiesEb :: Bool`(NOTE: Currently we keep this in the **body** and not the header) - [x] `ShelleyLedgerState` in OuroborosConsensus is tracking the **last announced EB** - [x] [applyBlock](https://github.com/IntersectMBO/cardano-ledger/blob/b1a015328e5f33c0ae6f9a4ef181b77234251bb2/eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Validation.hs#L59) for ConwayEra handles a Certificate Body. - [x] **Forge**: Issues a Block with EB announcement and Certificates - [x] When the EB was produced it's marked in the forged LedgerBlock (`blockMayAnnouncedEb`) - [x] When the previously announced EB is fully downloaded (entire tx closure is available) and (mock) certified, the use of that EB is marked in the new LedgerBlock (`blockCertifiesEb`) - [ ] **!!! Mempool Partitioning !!!** - We currently split the transactions in the Mempool in 2 parts, first part is for a Block with **inlined transactions** and second for an EB. However, that's a problem! When a Leader tries to forge a Block with a Certificate **AND** additionally wants to announce a new EB, the transaction in that EB are likely to be invalid wrt to the Ledger state induced by the application of the Certificate. Instead, when a Certified EB is available during Forge, Mempool needs to be "rebased" to a Ledger state after the Certified EB application (and the surviving transactions can go to an EB and be announced) - [x] Skip announcement when certifying as an interim solution (see 02ef504) - [x] **ChainDB**: When the `blk` contains a Leios Certificate we must resolve its transaction closure in order to `applyBlock` - [x] `resolveLeiosBlock` call (`ResolveLeiosBlock blk` class method) was introduced in a call chain to `applyBlock` to resolve the transactions if the `blk` contains a Leios Certificate - [x] Shelley `resolveLeiosBlock` resolves the transaction closure and provides it to the Ledger - [ ] **Test** - [x] Test new LeiosDB queries - [ ] Test that a Certificate has been forged - [ ] Test that a Certificate has been adopted/applied - [x] Old ouroboros-consensus tests are passing? - [x] **Sqlite implementation** - [x] Get tx closure by EB Point - [x] Get certificate by EB Point
In order to avoid pinned memory fragmentation it is beneficial to use `ByteArray` instead of `ByteString`
Switch `ChainData` and `Attributes` to use `ByteArray`
…ate-translate Fix `TranslateEra`instance for `DijkstraEra` `CertState`
…rf-key-hashes Add entities/stake_pools/vrf_key_hashes/v0 namespace
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.6.3...2.7.0) --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.7.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…-2.7.0 Bump urllib3 from 2.6.3 to 2.7.0 in /doc
* Move Conway specific instances from Core to Conway/Base * Remove ctx from SpecTranslate * Rename withCtx for consistency * Remove unused Inject instances
This commit introduces a general hierarchy for common era testing
…rarchy Start to re-organize test hierarchy: ImpSpec
Add `NoThunks` instances for `ChainTransitionError` and `ChainPredicateFailure`
This follows the pattern of other cardano-base types.
Not sure if this is better, but the upstream module has a smaller API surface now.
Also fix hlint issues in the module
Add LeiosCert to DijkstraBlockBody
This is to bring in input-output-hk/haskell.nix#2525 that fixes the aarch64-darwin code-signing issue from input-output-hk/haskell.nix#2018
Update haskellNix flake input
where it's used for debugging
…ance Remove unnecessary `EncCBOR` instance for `AlonzoStAnnTx`
`overrideCostModels` passed the injected `AlonzoExtraConfig` cost models as the first (overwritten) argument of `updateCostModels`, so the era-translated PParams cost models won every collision.
Fix injected extraConfig cost models being ignored for PlutusV1/V3
Starting from def dropped enacted, expired and delayed actions, losing the removal, deposit refund and event for actions enacting at the era boundary.
The certified bit is about the previous EB and the forward-looking announcement is optional.
Fix Dijkstra CDDL for Leios changes to header_body
This PR hosts changes to cardano-ledger changes related to Leios. I'm opening a PR for easier management and transparency to make changes visible at a glance.
More importantly, this branch will be tagged and sourced for Leios demos.
IT IS NOT INTENDED TO BE REVIEWED OR MERGED!