IntersectMBO / ouroboros-consensus

Implementation of a Consensus Layer for the Ouroboros family of protocols
https://ouroboros-consensus.cardano.intersectmbo.org
Apache License 2.0
36 stars 23 forks source link

Move the QueryBatchSize field into the BackingStore #1321

Open jasagredo opened 1 week ago

jasagredo commented 1 week ago
          Seems like this would be more appropriate as a field in the `BackingStore` data type instead.

_Originally posted by @nfrisby in https://github.com/IntersectMBO/ouroboros-consensus/pull/1267#discussion_r1830217210_

Perhaps we can remove this field from the LedgerDB top level API and put it into the BackingStore and capture it in the LedgerBackingStoreValueHandle.

Care has to be taken because we adapt the actual number of requested values based on the current diffs in the V1 changelog, so we might not be able to directly remove it from the RangeQuery datatype.

jasagredo commented 1 week ago

Also the V2 forker uses Maybe Int while it could also use QueryBatchSize. See https://github.com/IntersectMBO/ouroboros-consensus/pull/1267#discussion_r1831373011