fix: make should_read_epoch_messages include first epoch
Signed-off-by: William Hankins <[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.