ci(antithesis): fix moog tag variable
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
New explanation page documenting how data flows through the consensus layer, based on code investigation of the actual component interactions. The page covers: - Overview: NTN (untrusted) vs NTC (trusted) connections, header-body split motivation, mini-protocols (ChainSync, BlockFetch, TxSubmission, LocalTxSubmission, LocalStateQuery, LocalTxMonitor), and internal components (ChainDB, Mempool, Block Forging) - Block flow (NTN upstream): ChainSync validates headers using chain state and ledger views from ChainDB, BlockFetch downloads blocks for validated chains, ChainDB performs chain selection - Block diffusion (NTN downstream): ChainSync server announces headers, BlockFetch server serves blocks, diffusion pipelining optimization - Transaction flow: NTN TxSubmission (bidirectional) and NTC LocalTxSubmission, both go directly to Mempool - Client queries (NTC): LocalStateQuery reads from ChainDB, LocalTxMonitor reads from Mempool - Internal flows: chain selection queue, Mempool revalidation on ledger state change, block forging cycle - Passive node: simplified diagram Each section has a focused Mermaid diagram showing the relevant components and data flows. The original reference data flow diagram is preserved in references/ for comparison. Also updates System Overview links to point to the new location.
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: William Hankins <[email protected]>
Signed-off-by: Hyperledger Bot <[email protected]>
The ChainIterator created in ledgerReadChain was never cancelled. Each pipeline restart leaked an iterator entry in chain.iterators, and the iterator's context (derived from context.Background) prevented prompt unblocking when the pipeline context was cancelled. Add defer iter.Cancel() to remove the iterator from the chain's tracking list and cancel its context when the reader goroutine exits. Signed-off-by: wcatz <[email protected]>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Signed-off-by: Chris Gianelloni <[email protected]>
Fix issue with haddock generation in CI
Signed-off-by: Chris Gianelloni <[email protected]>
This fixes builds for the dependencies haskell-language-server and
proto-lens.
proto-lens fails with:
Error: [Cabal-6661]
filepath wildcard 'proto-lens-imports/google/protobuf/descriptor.proto'
refers to the directory 'proto-lens-imports/google/protobuf', which does not exist or is not a directory.
filepath wildcard 'proto-lens-imports/google/protobuf/descriptor.proto'
does not match any files.
However, SRP is currently required because the released version does not
support ghc-9.12.
The previous haskell-language-server did not support ghc-9.12, so we are
upgrading it to the latest version
This fixes the following static build errors resulting from updating
nixpkgs:
(.text.use_builtin_flow+0x10): undefined reference to `pg_fe_cleanup_oauth_flow'
collect2: error: ld returned 1 exit status
This works by removing curl support for postgresql and enabling static libraries
for liburing and snappy
Fixes https://github.com/IntersectMBO/cardano-db-sync/issues/2083 The `queryMinRefId` query uses ```sql SELECT id FROM <table> WHERE <field> >= $1 ORDER BY id ASC LIMIT 1. ``` The planner sometimes picks a bad plan: ```sql Index Scan using tx_pkey on tx Filter: (block_id >= $1) ``` the filter is not Index Cond, so this ends up in a sequential scan. The index refers to the primary key and is only used for sorting. Instead we use a simpler query without ORDER BY: SELECT id FROM <table> WHERE <field> >= $1 LIMIT 10000 This forces the planner to use the field's index. The results are fetched and the minimum is found in Haskell. Near the tip this returns only a handful of rows. If there are more than 10000 matching rows (large rollback), we fall back to the original ORDER BY id ASC LIMIT 1 query.