ChainDB: implement chain selection for certificates
Home /
Input Output /
ouroboros-consensus
Jul 26, 9-10 AM (0)
Jul 26, 10-11 AM (0)
Jul 26, 11-12 PM (0)
Jul 26, 12-1 PM (0)
Jul 26, 1-2 PM (0)
Jul 26, 2-3 PM (0)
Jul 26, 3-4 PM (0)
Jul 26, 4-5 PM (0)
Jul 26, 5-6 PM (0)
Jul 26, 6-7 PM (0)
Jul 26, 7-8 PM (0)
Jul 26, 8-9 PM (0)
Jul 26, 9-10 PM (0)
Jul 26, 10-11 PM (0)
Jul 26, 11-12 AM (0)
Jul 27, 12-1 AM (0)
Jul 27, 1-2 AM (0)
Jul 27, 2-3 AM (0)
Jul 27, 3-4 AM (0)
Jul 27, 4-5 AM (0)
Jul 27, 5-6 AM (0)
Jul 27, 6-7 AM (0)
Jul 27, 7-8 AM (0)
Jul 27, 8-9 AM (0)
Jul 27, 9-10 AM (0)
Jul 27, 10-11 AM (0)
Jul 27, 11-12 PM (0)
Jul 27, 12-1 PM (0)
Jul 27, 1-2 PM (0)
Jul 27, 2-3 PM (0)
Jul 27, 3-4 PM (0)
Jul 27, 4-5 PM (0)
Jul 27, 5-6 PM (0)
Jul 27, 6-7 PM (0)
Jul 27, 7-8 PM (0)
Jul 27, 8-9 PM (0)
Jul 27, 9-10 PM (0)
Jul 27, 10-11 PM (0)
Jul 27, 11-12 AM (0)
Jul 28, 12-1 AM (0)
Jul 28, 1-2 AM (0)
Jul 28, 2-3 AM (0)
Jul 28, 3-4 AM (0)
Jul 28, 4-5 AM (0)
Jul 28, 5-6 AM (0)
Jul 28, 6-7 AM (0)
Jul 28, 7-8 AM (0)
Jul 28, 8-9 AM (9)
Jul 28, 9-10 AM (7)
Jul 28, 10-11 AM (6)
Jul 28, 11-12 PM (1)
Jul 28, 12-1 PM (0)
Jul 28, 1-2 PM (0)
Jul 28, 2-3 PM (14)
Jul 28, 3-4 PM (2)
Jul 28, 4-5 PM (1)
Jul 28, 5-6 PM (0)
Jul 28, 6-7 PM (6)
Jul 28, 7-8 PM (0)
Jul 28, 8-9 PM (0)
Jul 28, 9-10 PM (0)
Jul 28, 10-11 PM (0)
Jul 28, 11-12 AM (0)
Jul 29, 12-1 AM (0)
Jul 29, 1-2 AM (0)
Jul 29, 2-3 AM (0)
Jul 29, 3-4 AM (0)
Jul 29, 4-5 AM (0)
Jul 29, 5-6 AM (0)
Jul 29, 6-7 AM (3)
Jul 29, 7-8 AM (3)
Jul 29, 8-9 AM (3)
Jul 29, 9-10 AM (13)
Jul 29, 10-11 AM (0)
Jul 29, 11-12 PM (0)
Jul 29, 12-1 PM (1)
Jul 29, 1-2 PM (0)
Jul 29, 2-3 PM (6)
Jul 29, 3-4 PM (8)
Jul 29, 4-5 PM (3)
Jul 29, 5-6 PM (0)
Jul 29, 6-7 PM (0)
Jul 29, 7-8 PM (0)
Jul 29, 8-9 PM (0)
Jul 29, 9-10 PM (0)
Jul 29, 10-11 PM (0)
Jul 29, 11-12 AM (0)
Jul 30, 12-1 AM (0)
Jul 30, 1-2 AM (0)
Jul 30, 2-3 AM (0)
Jul 30, 3-4 AM (0)
Jul 30, 4-5 AM (0)
Jul 30, 5-6 AM (0)
Jul 30, 6-7 AM (0)
Jul 30, 7-8 AM (6)
Jul 30, 8-9 AM (1)
Jul 30, 9-10 AM (1)
Jul 30, 10-11 AM (1)
Jul 30, 11-12 PM (0)
Jul 30, 12-1 PM (0)
Jul 30, 1-2 PM (0)
Jul 30, 2-3 PM (0)
Jul 30, 3-4 PM (5)
Jul 30, 4-5 PM (7)
Jul 30, 5-6 PM (0)
Jul 30, 6-7 PM (0)
Jul 30, 7-8 PM (0)
Jul 30, 8-9 PM (0)
Jul 30, 9-10 PM (0)
Jul 30, 10-11 PM (0)
Jul 30, 11-12 AM (0)
Jul 31, 12-1 AM (0)
Jul 31, 1-2 AM (0)
Jul 31, 2-3 AM (0)
Jul 31, 3-4 AM (0)
Jul 31, 4-5 AM (0)
Jul 31, 5-6 AM (0)
Jul 31, 6-7 AM (0)
Jul 31, 7-8 AM (0)
Jul 31, 8-9 AM (4)
Jul 31, 9-10 AM (0)
Jul 31, 10-11 AM (0)
Jul 31, 11-12 PM (0)
Jul 31, 12-1 PM (0)
Jul 31, 1-2 PM (1)
Jul 31, 2-3 PM (0)
Jul 31, 3-4 PM (0)
Jul 31, 4-5 PM (0)
Jul 31, 5-6 PM (0)
Jul 31, 6-7 PM (1)
Jul 31, 7-8 PM (0)
Jul 31, 8-9 PM (0)
Jul 31, 9-10 PM (0)
Jul 31, 10-11 PM (0)
Jul 31, 11-12 AM (0)
Aug 01, 12-1 AM (0)
Aug 01, 1-2 AM (0)
Aug 01, 2-3 AM (0)
Aug 01, 3-4 AM (0)
Aug 01, 4-5 AM (0)
Aug 01, 5-6 AM (0)
Aug 01, 6-7 AM (0)
Aug 01, 7-8 AM (0)
Aug 01, 8-9 AM (0)
Aug 01, 9-10 AM (0)
Aug 01, 10-11 AM (0)
Aug 01, 11-12 PM (0)
Aug 01, 12-1 PM (0)
Aug 01, 1-2 PM (0)
Aug 01, 2-3 PM (15)
Aug 01, 3-4 PM (2)
Aug 01, 4-5 PM (5)
Aug 01, 5-6 PM (0)
Aug 01, 6-7 PM (0)
Aug 01, 7-8 PM (0)
Aug 01, 8-9 PM (0)
Aug 01, 9-10 PM (0)
Aug 01, 10-11 PM (0)
Aug 01, 11-12 AM (0)
Aug 02, 12-1 AM (0)
Aug 02, 1-2 AM (0)
Aug 02, 2-3 AM (0)
Aug 02, 3-4 AM (0)
Aug 02, 4-5 AM (0)
Aug 02, 5-6 AM (0)
Aug 02, 6-7 AM (0)
Aug 02, 7-8 AM (0)
Aug 02, 8-9 AM (0)
Aug 02, 9-10 AM (0)
135 commits this week
Jul 26, 2025
-
Aug 02, 2025
ChainDB q-s-m: test weighted chain selection
MockChainSel: switch to weighted chain selection
Integrated weighted BlockFetch decision logic
Introduce weighted chain comparisons
ChainSel.ReprocessLoEBlocks: avoid transient chain switches
This runs a *single* chain selection to select the best chain involving potentially LoE-postponed blocks. This way, transient chain switches (ie adopting one chain in one `chainSelectionForBlock` call, only to select an even better one just after in the same invocation of `chainSelSync`) are avoided.
ChainSel: make lack of trigger block in the LoE explicit
Currently, the LoE reports the block that we triggered chain selection for here, but this is somewhat misleading.
ChainSel: remove `ChainSwitchType`
No need to pass it to `switchTo`; it provides no information that is not already derivable from `ChainDiff`.
ChainSel: factor out `constructPreferableCandidates`
This is just factoring out shared code between `addToCurrentChain` and `switchToAFork` into a new top-level definition. This way, `chainSelectionForBlock` is now rather streamlined: 1. Some easy checks on the new block (ignore if too old or invalid). 2. `constructPreferableCandidates` to get all candidates involving the new block which are preferable to the current selection. 3. `chainSelection` to get the based valid one of these candidates. 4. `switchTo` to adopt the candidate as our new selection.
ChainSel: simplify `curChainAndLedger` in `ChainSelEnv`
The `AndLedger` part isn't actually needed, so we can simply remove it, and eg no longer need to invoke `LedgerDB.withTipForker` in `chainSelectionForBlock`, simplifying the code.
ChainSel: factor out `switchTo`
This is purely moving `switchTo` to the top level, no logic changes.
ChainSel: factor out `mkChainSelEnv`
Again, just factoring out some existing code to reuse it in a follow-up commit.
ChainSel.ReprocessLoEBlocks: avoid transient chain switches
This runs a *single* chain selection to select the best chain involving potentially LoE-postponed blocks. This way, transient chain switches (ie adopting one chain in one `chainSelectionForBlock` call, only to select an even better one just after in the same invocation of `chainSelSync`) are avoided.
ChainSel: make lack of trigger block in the LoE explicit
Currently, the LoE reports the block that we triggered chain selection for here, but this is somewhat misleading.
ChainSel: factor out `mkChainSelEnv`
Again, just factoring out some existing code to reuse it in a follow-up commit.
ChainSel: factor out `constructPreferableCandidates`
This is just factoring out shared code between `addToCurrentChain` and `switchToAFork` into a new top-level definition. This way, `chainSelectionForBlock` is now rather streamlined: 1. Some easy checks on the new block (ignore if too old or invalid). 2. `constructPreferableCandidates` to get all candidates involving the new block which are preferable to the current selection. 3. `chainSelection` to get the based valid one of these candidates. 4. `switchTo` to adopt the candidate as our new selection.
ChainSel: remove `ChainSwitchType`
No need to pass it to `switchTo`; it provides no information that is not already derivable from `ChainDiff`.
ChainSel: factor out `switchTo`
This is purely moving `switchTo` to the top level, no logic changes.
ChainSel: simplify `curChainAndLedger` in `ChainSelEnv`
The `AndLedger` part isn't actually needed, so we can simply remove it, and eg no longer need to invoke `LedgerDB.withTipForker` in `chainSelectionForBlock`, simplifying the code.
ChainDB.StateMachine: do not trigger ChainSel when adding a block
This is a remnant of an early version of the LoE that wasn't "idempotent", ie it was sometimes necessary to trigger chain selection after having added a block. This has not been the case for a long time, so this is semantically dead code. Removing it reduces the amount the trace output in counterexamples.
PerasCertDB: add simple interface for cert diffusion
[WIP] Implement Reader/Writer interface for PerasCertDB for Cert diffusion
[FAILING] Adapt ObjectDiffusion tests to use the new Inbound/Outbound distinction for the ObjectDiffusion peers
So far, the smoke test fails because of "undefined" placeholders in Agency proofs. It will be automatically resolved when ObjectDiffusion implementation in ouroboros-network is improved