feat(midnight): Implement Midnight indexer block scanning for cNIGHT and registration events
Signed-off-by: cryptodj413 <[email protected]>
Signed-off-by: cryptodj413 <[email protected]>
- Fix issue that stake delegations to retired pools were not being removed. - Stylize the rule to follow that of the Conway and previous specs.
Test with 9.14.2
When a CertRB header arrives via ChainSync, recognise it (headerContainsLeiosCert) and offer the EB it certifies (chainDepStateLeiosAnnouncement) to that peer's LeiosFetch state, as if its LeiosNotify client had offered it (leiosCertRbCallback / leiosCertRbOffer). The per-peer LeiosPeerVars are now a shared, get-or-create resource: every peer-vars mini-protocol (ChainSync, LeiosNotify, LeiosFetch) wraps itself in bracketLeiosPeer, which allocates the entry if absent and cleans it up on exit. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Treat a missing EB closure like a missing predecessor. ChainSel's candidate construction skips a CertRB whose announced EB closure is not yet in the ChainDB-owned acquired set (cdbAcquiredLeiosEbs, seeded at open and grown by leiosAcquiredEbsRunner from LeiosDb closure-completion notifications). When a closure arrives, a FIFO ChainSelReprocessLeiosEb message reprocesses the announcer RBs' cert-carrying successors (found via getLeiosAnnouncers). Also drives LeiosDb GC/promotion and prunes the acquired set at GC-schedule time. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add three methods to LeiosDbHandle (implemented for the in-memory and SQLite backends): leiosDbScanCompleteEbClosuresNotOlderThanSlot (used at ChainDB open to seed the acquired-EB-closures set, incl. restart recovery), and the still no-op leiosDbGarbageCollect and leiosDbPromoteToImmutable lifecycle hooks. Inert until ChainDB calls them. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add biHasLeiosCert and biLeiosAnnouncedEb to BlockInfo, derived in extractBlockInfo via blockHasLeiosCert / headerLeiosAnnouncement (hence a ResolveLeiosBlock constraint on the VolatileDB and its openDB callers, e.g. DBImmutaliser). Add an incremental EB-announcer reverse index (LeiosAnnouncerIndex) maintained alongside currentSuccMap, exposed as getLeiosAnnouncers. Inert until ChainSel consumes it. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add two methods to ResolveLeiosBlock (both with no-Leios defaults): headerContainsLeiosCert, which reads the header's hbLeiosContainsCert bit so a CertRB is recognisable from its header alone, and chainDepStateLeiosAnnouncement, which reads the EB a CertRB certifies from the predecessor's chain-dep state. Implement them for the Shelley Dijkstra and CardanoBlock instances (the latter projecting its chain-dep state), factoring out praosLeiosAnnouncement. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add hbLeiosContainsCert to the Praos HeaderBody (Dijkstra-only; 10-vs-12-field CBOR encoding so pre-Leios blocks stay byte-identical), thread it through mkHeader and Shelley forging, and expose it via pHeaderLeiosContainsCert on the protocol-header abstraction (TPraos uses default_pHeaderLeiosContainsCert = const False). Enforce the header/body envelope in blockMatchesHeader: the cert bit is set iff the body carries exactly one Leios certificate and no txs. No ChainSync callback yet; that arrives with the peer-vars lifecycle. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Vote on the hash of the ranking block that announced the EB instead of the LeiosPoint, which comprises the slot number and EB hash. This forbids reusing Leios certificates across Praos forks.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
ZK on Cardano has live on-chain primitives (BLS12-381 builtins) and shipped proofs of concept but no home in the curriculum. Add a concept-first earmark under advanced smart contracts, flagged as in active development.
Module 3 already names the gap (native tokens have no built-in transfer logic) but dead-ends there. Add a concept-first earmark for CIP-113: what transfer-time validation buys you, the shared-script and stake-credential model, and an honest in-development status that links out to the reference implementation.
The page gave Mesh's AI context a co-equal section, pushing one SDK ahead of the aggregation layer we want people to start with. Lead with Cardano Dev Skills as the tool-agnostic default and demote Mesh to an optional, SDK-specific deepening.
Fixes #2296 - [x] Allow specifying _everyone_ in the same config and declaring "me myself" somewhere. - [x] Handle mirror nodes a bit more nicely - [x] Document the feature - [x] Changelog --------- Signed-off-by: Sasha Bogicevic <[email protected]> Co-authored-by: Sasha Bogicevic <[email protected]>