Skip to content

Commit 7bd4853

Browse files
committed
Cleanup and documentation
1 parent 12bc7d9 commit 7bd4853

File tree

12 files changed

+46
-70
lines changed

12 files changed

+46
-70
lines changed

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{-# LANGUAGE FlexibleContexts #-}
2-
{-# LANGUAGE GADTs #-}
3-
{-# LANGUAGE KindSignatures #-}
42
{-# LANGUAGE NamedFieldPuns #-}
5-
{-# LANGUAGE RankNTypes #-}
63
{-# LANGUAGE ScopedTypeVariables #-}
74
{-# LANGUAGE TypeApplications #-}
85

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/API.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
{-# LANGUAGE DerivingVia #-}
77
{-# LANGUAGE FlexibleContexts #-}
88
{-# LANGUAGE FlexibleInstances #-}
9-
{-# LANGUAGE GADTs #-}
10-
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
119
{-# LANGUAGE MultiParamTypeClasses #-}
1210
{-# LANGUAGE NamedFieldPuns #-}
13-
{-# LANGUAGE PolyKinds #-}
14-
{-# LANGUAGE QuantifiedConstraints #-}
1511
{-# LANGUAGE RankNTypes #-}
1612
{-# LANGUAGE ScopedTypeVariables #-}
1713
{-# LANGUAGE StandaloneDeriving #-}
@@ -814,6 +810,7 @@ data LedgerDbPrune
814810
Streaming
815811
-------------------------------------------------------------------------------}
816812

813+
-- | A backend that supports streaming the ledger tables
817814
class StreamingBackend m backend l where
818815
data YieldArgs m backend l
819816

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/Args.hs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
{-# LANGUAGE ConstraintKinds #-}
2-
{-# LANGUAGE DataKinds #-}
31
{-# LANGUAGE DeriveAnyClass #-}
42
{-# LANGUAGE DeriveGeneric #-}
53
{-# LANGUAGE DerivingStrategies #-}
64
{-# LANGUAGE FlexibleContexts #-}
7-
{-# LANGUAGE FlexibleInstances #-}
8-
{-# LANGUAGE GADTs #-}
95
{-# LANGUAGE NumericUnderscores #-}
10-
{-# LANGUAGE PolyKinds #-}
11-
{-# LANGUAGE QuantifiedConstraints #-}
12-
{-# LANGUAGE RankNTypes #-}
13-
{-# LANGUAGE ScopedTypeVariables #-}
146
{-# LANGUAGE StandaloneKindSignatures #-}
15-
{-# LANGUAGE TypeFamilies #-}
16-
{-# LANGUAGE UndecidableInstances #-}
177

188
-- | Arguments for LedgerDB initialization.
199
module Ouroboros.Consensus.Storage.LedgerDB.Args
@@ -99,11 +89,11 @@ data LedgerDbBackendArgs m blk
9989
QueryBatchSize
10090
-------------------------------------------------------------------------------}
10191

102-
-- | The /maximum/ number of keys to read in a backing store range query.
92+
-- | The /maximum/ number of keys to read in a forker range query.
10393
--
10494
-- When performing a ledger state query that involves on-disk parts of the
10595
-- ledger state, we might have to read ranges of key-value pair data (e.g.,
106-
-- UTxO) from disk using backing store range queries. Instead of reading all
96+
-- UTxO) from disk using forker range queries. Instead of reading all
10797
-- data in one go, we read it in batches. 'QueryBatchSize' determines the size
10898
-- of these batches.
10999
--

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/TraceEvent.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
{-# LANGUAGE ConstraintKinds #-}
21
{-# LANGUAGE DeriveGeneric #-}
32
{-# LANGUAGE FlexibleContexts #-}
4-
{-# LANGUAGE PolyKinds #-}
53
{-# LANGUAGE StandaloneDeriving #-}
6-
{-# LANGUAGE TypeFamilies #-}
74
{-# LANGUAGE UndecidableInstances #-}
85

96
module Ouroboros.Consensus.Storage.LedgerDB.TraceEvent

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{-# LANGUAGE BangPatterns #-}
2-
{-# LANGUAGE DataKinds #-}
32
{-# LANGUAGE DeriveAnyClass #-}
43
{-# LANGUAGE DeriveGeneric #-}
54
{-# LANGUAGE FlexibleContexts #-}
65
{-# LANGUAGE LambdaCase #-}
76
{-# LANGUAGE NamedFieldPuns #-}
8-
{-# LANGUAGE RankNTypes #-}
97
{-# LANGUAGE ScopedTypeVariables #-}
108
{-# LANGUAGE StandaloneDeriving #-}
119
{-# LANGUAGE StandaloneKindSignatures #-}
1210
{-# LANGUAGE TypeApplications #-}
13-
{-# LANGUAGE TypeFamilies #-}
1411
{-# LANGUAGE TypeOperators #-}
1512
{-# LANGUAGE UndecidableInstances #-}
1613

@@ -375,7 +372,6 @@ mkInternals ::
375372
( IOLike m
376373
, LedgerDbSerialiseConstraints blk
377374
, LedgerSupportsProtocol blk
378-
, ApplyBlock (ExtLedgerState blk) blk
379375
) =>
380376
LedgerDBHandle m (ExtLedgerState blk) blk ->
381377
SnapshotManagerV1 m blk ->

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/Args.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
21
{-# LANGUAGE DeriveGeneric #-}
3-
{-# LANGUAGE DerivingStrategies #-}
4-
{-# LANGUAGE FlexibleInstances #-}
5-
{-# LANGUAGE GADTs #-}
6-
{-# LANGUAGE MultiParamTypeClasses #-}
7-
{-# LANGUAGE PolyKinds #-}
8-
{-# LANGUAGE TypeFamilies #-}
9-
{-# LANGUAGE TypeOperators #-}
10-
{-# LANGUAGE UndecidableInstances #-}
112

123
module Ouroboros.Consensus.Storage.LedgerDB.V1.Args
134
( FlushFrequency (..)

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/BackingStore.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE FlexibleInstances #-}
41
{-# LANGUAGE GADTs #-}
52
{-# LANGUAGE MultiParamTypeClasses #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
7-
{-# LANGUAGE StandaloneDeriving #-}
83
{-# LANGUAGE TypeFamilies #-}
9-
{-# LANGUAGE UndecidableInstances #-}
104

115
-- | See "Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API" for the
126
-- documentation. This module just puts together the implementations for the

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/BackingStore/API.hs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
{-# LANGUAGE DeriveAnyClass #-}
33
{-# LANGUAGE DeriveGeneric #-}
44
{-# LANGUAGE DerivingVia #-}
5-
{-# LANGUAGE FlexibleContexts #-}
65
{-# LANGUAGE NamedFieldPuns #-}
7-
{-# LANGUAGE RankNTypes #-}
86
{-# LANGUAGE StandaloneDeriving #-}
97
{-# LANGUAGE TypeFamilies #-}
108
{-# LANGUAGE TypeOperators #-}
11-
{-# LANGUAGE UndecidableInstances #-}
129

1310
-- | The 'BackingStore' is the component of the LedgerDB V1 implementation that
1411
-- stores a key-value map with the 'LedgerTable's at a specific slot on the
@@ -263,7 +260,7 @@ data RangeQuery keys = RangeQuery
263260
-- the changelog, which is extremely unlikely due to the random access
264261
-- pattern of the UTxO set.
265262
}
266-
deriving stock (Show, Eq)
263+
deriving (Show, Eq)
267264

268265
{-------------------------------------------------------------------------------
269266
Statistics
@@ -284,7 +281,7 @@ data Statistics = Statistics
284281
, numEntries :: !Int
285282
-- ^ The total number of key-value pair entries that are stored.
286283
}
287-
deriving stock (Show, Eq)
284+
deriving (Show, Eq)
288285

289286
{-------------------------------------------------------------------------------
290287
Tracing

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/BackingStore/Impl/InMemory.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
{-# LANGUAGE FlexibleInstances #-}
66
{-# LANGUAGE LambdaCase #-}
77
{-# LANGUAGE MultiParamTypeClasses #-}
8-
{-# LANGUAGE OverloadedStrings #-}
9-
{-# LANGUAGE RankNTypes #-}
108
{-# LANGUAGE ScopedTypeVariables #-}
119
{-# LANGUAGE StandaloneDeriving #-}
1210
{-# LANGUAGE TypeFamilies #-}

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V2.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DataKinds #-}
31
{-# LANGUAGE DeriveAnyClass #-}
42
{-# LANGUAGE DeriveGeneric #-}
53
{-# LANGUAGE FlexibleContexts #-}
64
{-# LANGUAGE LambdaCase #-}
75
{-# LANGUAGE NamedFieldPuns #-}
8-
{-# LANGUAGE Rank2Types #-}
96
{-# LANGUAGE ScopedTypeVariables #-}
107
{-# LANGUAGE StandaloneDeriving #-}
118
{-# LANGUAGE StandaloneKindSignatures #-}

0 commit comments

Comments
 (0)