Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2f9b26d
Scaffolding for Peras certs and PerasCertDB
amesgen Jul 3, 2025
d41124b
[WIP] set structure for model-based testing for PerasCertDB
tbagrel1 Jul 7, 2025
ba2b453
Fix missing instances
tbagrel1 Jul 8, 2025
616776a
Pairing
amesgen Jul 8, 2025
0b8746e
Minor polishing
amesgen Jul 9, 2025
d7afcad
PerasCertDB: implement garbage collection
amesgen Jul 9, 2025
f32763a
Re-add how-to guide for micro-benchmarks
geo2a Jul 7, 2025
54e41bc
ouroboros-consensus: add Peras chain weight benchmark
geo2a Jul 7, 2025
5cd4c37
ChainDB: expose PerasCertDB functionality
amesgen Jul 17, 2025
1d24821
ChainDB: invoke PerasCertDB GC
amesgen Jul 17, 2025
391f420
Move `PerasWeightSnapshot` to separate module
amesgen Jul 17, 2025
2797c54
PerasCertDB.getWeightSnapshot: add `Fingerprint`
amesgen Jul 21, 2025
43d0232
PerasCertDB.addCert: return whether we added the cert
amesgen Jul 21, 2025
644cb18
Peras: minor tweaks
amesgen Jul 23, 2025
52d7741
Make `PerasWeightSnapshot` opaque
amesgen Jul 24, 2025
8886d71
Nomenclature: "weight boost" instead of "boosted weight"
amesgen Jul 28, 2025
91a5cc9
Glossary: add Peras weight-related terms
amesgen Jul 28, 2025
337558e
PerasWeightSnapshot: minimize API
amesgen Jul 28, 2025
a5456d9
PerasRoundNo/PerasWeight: terse output
amesgen Jul 28, 2025
facb6b7
O.C.Peras.Weight: add haddocks
amesgen Jul 28, 2025
bdb6189
`SecurityParam`: mention weighted nature
amesgen Jul 28, 2025
d8cbdeb
`PerasRoundNo`/`PerasWeight`: add `Condense` instances
amesgen Jul 29, 2025
2323685
O.C.Peras.Weight: add `totalWeightForFragment`/`takeVolatileSuffix`
amesgen Jul 28, 2025
cb0877b
Add test for `PerasWeightSnapshot`
amesgen Jul 29, 2025
fe3c154
ChainDB.StateMachine: check immutable tip monotonicity
amesgen Jul 30, 2025
e6aa0ae
ChainDB: define `getCurrentChain` in terms of weight
amesgen Jul 28, 2025
d9a542f
GSM: allow `candidateOverSelection` to be stateful
amesgen Jul 17, 2025
c5759cd
Add `WeightedSelectView`
amesgen Jul 28, 2025
37f9ae9
ChainSel: make `rollbackExceedsSuffix` weight-aware
amesgen Jul 23, 2025
0912d45
Introduce weighted chain comparisons
amesgen Jul 17, 2025
7cd188c
Integrate weighted BlockFetch decision logic
amesgen Jul 21, 2025
4037e12
ChainDB: implement chain selection for certificates
amesgen Jul 21, 2025
8192a51
MockChainSel: switch to weighted chain selection
amesgen Jul 24, 2025
5b61869
ChainDB q-s-m: test weighted chain selection
amesgen Jul 24, 2025
6739048
Fix cabal-docspec
amesgen Aug 13, 2025
82d9ba2
Modify PerasCertDB (and to some extent, ChainDB) to allow snapshot of…
amesgen Aug 6, 2025
acdf1e9
Replace hardcoded miniprotocol parameters by default ones in unstable…
tbagrel1 Aug 6, 2025
c6a470c
Introduce the (generic) ObjectDiffusion protocol, ObjectPool, and the…
tbagrel1 Aug 6, 2025
12b73ad
Introduce the PerasCertDiffusion protocol (instance of ObjectDiffusio…
tbagrel1 Aug 6, 2025
bf9d848
Wire-in the PerasCertDiffusion protocol in NodeToNode
tbagrel1 Aug 6, 2025
64548be
Change signature of `opwHasObject` to use `STM m` instead of `m`
tbagrel1 Sep 2, 2025
6c4d5c4
Add module docstring to ObjectPool API
tbagrel1 Sep 2, 2025
2501277
Add codec for PerasCert and PerasCertDiffusion
tbagrel1 Sep 2, 2025
1f1bdeb
Integrate `NodeToNodeV_16`
amesgen Sep 4, 2025
43bdef4
Peras: add a few `ShowProxy` instances
amesgen Sep 3, 2025
d0799c8
Adapt to removal of `initAgency`
amesgen Sep 4, 2025
5d82e49
Adapt to changed agency of `MsgDone`
amesgen Sep 4, 2025
935525d
`O.C.Network.NodeToNode`: plumbing for Peras cert diffusion
amesgen Sep 3, 2025
a930796
Adapt tests
amesgen Sep 4, 2025
233f1b2
Add basic API for certificate validation
amesgen Sep 2, 2025
36d8f01
Adapt the HFC time translation layer for Peras
geo2a Jul 22, 2025
591445e
Peras.SelectView: use fragment length instead of tip `BlockNo`
amesgen Sep 9, 2025
e99d251
Avoid exposing Peras boostPerCert in tests
agustinmista Sep 10, 2025
283fcfd
Refactor ChainDB q-s-m test to carry gap blocks between commands
agustinmista Sep 10, 2025
495247e
Tweak generation frequencies in ChainDB q-s-m tests
agustinmista Sep 12, 2025
17b9132
Generate security parameter for ChainDB q-s-m test on the fly
agustinmista Sep 15, 2025
5fad777
Propagate feature flags down to NodeKernelArgs
agustinmista Oct 9, 2025
69d709d
Bump ouroboros-network to match peras-staging/pr-5202
agustinmista Oct 13, 2025
3170661
Break Idling into its own module
agustinmista Oct 6, 2025
df386c5
Introduce O.C.MiniProtocol.ObjectDiffusion.Inbound.State
agustinmista Oct 6, 2025
46451bb
Introduce PerasCertDiffusion type synonyms
agustinmista Oct 13, 2025
587c566
Generalize chainSyncState to peerState in the GSM
agustinmista Oct 9, 2025
78f7e5c
Store NodeToNodeVersion in GSM peer state components
agustinmista Oct 9, 2025
7ca058f
Introduce O.C.Node.GSM.PeerState
agustinmista Oct 13, 2025
4e3115c
Enhance GSM view with PerasCertDiffusion information
agustinmista Oct 13, 2025
a14fed3
Define WithArrivalTime combinator
agustinmista Oct 15, 2025
e0288d4
Tweak and extend Peras cert field projection typeclasses
agustinmista Oct 15, 2025
a909419
Wrap validated Peras certificates with arrival time
agustinmista Oct 15, 2025
1a40463
Avoid using ledger Block in ShelleyBlock
agustinmista Oct 16, 2025
5dc9e03
Add Peras cert to ShelleyBlock and adapt CBOR encoder/decoder
agustinmista Oct 20, 2025
c0822d7
Adapt golden tests to include Peras certs on compatible eras
agustinmista Oct 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ index-state:
-- Bump this if you need newer packages from Hackage
, hackage.haskell.org 2025-07-22T09:13:54Z
-- Bump this if you need newer packages from CHaP
, cardano-haskell-packages 2025-08-21T09:41:03Z
, cardano-haskell-packages 2025-10-07T11:20:00Z

packages:
ouroboros-consensus
Expand Down Expand Up @@ -56,6 +56,17 @@ allow-newer:
, fin:QuickCheck
, bin:QuickCheck

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network
tag: peras-staging/pr-5202
--sha256: sha256-nTbjunQaqt6/syzSKw24Lne50083dI2SZFirG2/1T9U=
subdir:
ouroboros-network
ouroboros-network-protocols
ouroboros-network-api
ouroboros-network

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger
Expand Down
32 changes: 32 additions & 0 deletions docs/website/contents/howtos/benchmarks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Consensus benchmarks

We are in the process of adding component level microbenchmarks for Consensus.

We check for regressions in performance on CI.

## Mempool Benchmark

We started with microbenchmarks for adding transactions to the mempool. The
mempool benchmarks can be run using the following command.

```sh
cabal new-run ouroboros-consensus:mempool-bench
```

## ChainSync Client Benchmark

To aid the refactoring of the ChainSync client, we added a benchmark for it in [PR#823](https://github.com/IntersectMBO/ouroboros-consensus/pull/823). The benchmark could be invoked as follows:

```sh
cabal new-run ouroboros-consensus:ChainSync-client-bench -- 10 10
```

## PerasCertDB Benchmark

We have a microbenchmark for the boosted chain fragment weight calculation, which could be run as follows:

```sh
cabal run ouroboros-consensus:PerasCertDB-bench -- +RTS -T -A32m -RTS
```

We request GHC runtime system statistics with `-T` to get a memory usage estimate, and also request a large nursery with `-A32m` to minimise garbage collection. See `tasty-bench` [documentation](https://github.com/Bodigrim/tasty-bench?tab=readme-ov-file#troubleshooting) for more tips.
13 changes: 13 additions & 0 deletions docs/website/contents/references/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,19 @@ These kinds are maintained by the Networking layer:
- [Public root peers](#public-root-peers).
- [Shared peers](#shared-peers).

## ;Peras ;weight ;boost

Peras is an extension of Praos enabling faster settlement under optimistic conditions.
To this end, Peras can result in a block `B` receiving a *boost*, which means that any chain containing `B` gets additional weight when being compared to other chains.

Consider a chain fragment `F`:

- Its ;*weight boost* is the sum of all boosts received by points on this fragment (excluding the anchor). Note that the same point can be boosted multiple times.

- Its ;*total weight* is its tip block number plus its weight boost.

Note that these notions are always relative to a particular anchor, so different chain fragments must have the same anchor when their total weight is to be compared.

## ;Phases

Byron, Shelley, Goguen (current one as of August 2023), Basho, Voltaire.
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ byronEraParams genesis =
, eraSlotLength = fromByronSlotLength $ genesisSlotLength genesis
, eraSafeZone = HardFork.StandardSafeZone (2 * k)
, eraGenesisWin = GenesisWindow (2 * k)
, eraPerasRoundLength = HardFork.NoPerasEnabled
}
where
k = unNonZero $ maxRollbacks $ genesisSecurityParam genesis
Expand All @@ -345,6 +346,7 @@ byronEraParamsNeverHardForks genesis =
, eraSlotLength = fromByronSlotLength $ genesisSlotLength genesis
, eraSafeZone = HardFork.UnsafeIndefiniteSafeZone
, eraGenesisWin = GenesisWindow (2 * Gen.unBlockCount (Gen.configK genesis))
, eraPerasRoundLength = HardFork.NoPerasEnabled
}

instance HasHardForkHistory ByronBlock where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ instance
Map.fromList $
[ (NodeToNodeV_14, CardanoNodeToNodeVersion2)
, (NodeToNodeV_15, CardanoNodeToNodeVersion2)
, (NodeToNodeV_16, CardanoNodeToNodeVersion2)
]

supportedNodeToClientVersions _ =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module Ouroboros.Consensus.Shelley.Eras

-- * Convenience functions
, isBeforeConway
, isBeforeDijkstra

-- * Re-exports
, StandardCrypto
Expand Down Expand Up @@ -140,6 +141,10 @@ isBeforeConway :: forall era. L.Era era => Proxy era -> Bool
isBeforeConway _ =
L.eraProtVerLow @era < L.eraProtVerLow @L.ConwayEra

isBeforeDijkstra :: forall era. L.Era era => Proxy era -> Bool
isBeforeDijkstra _ =
L.eraProtVerLow @era < L.eraProtVerLow @L.DijkstraEra

-- | The default implementation of 'applyShelleyBasedTx', a thin wrapper around
-- 'SL.applyTx'
defaultApplyShelleyBasedTx ::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}
Expand All @@ -26,7 +27,10 @@ module Ouroboros.Consensus.Shelley.Ledger.Block

-- * Shelley Compatibility
, ShelleyCompatible
, fromShelleyBlock
, toShelleyBlock
, mkShelleyBlock
, mkShelleyBlockWithPerasCert
, mkShelleyHeader

-- * Serialisation
Expand All @@ -46,22 +50,31 @@ import Cardano.Ledger.Binary
( Annotator (..)
, DecCBOR (..)
, EncCBOR (..)
, EncCBORGroup (..)
, FullByteString (..)
, cborError
, decodeListLen
, encodeListLen
, fromPlainDecoder
, serialize
)
import qualified Cardano.Ledger.Binary.Plain as Plain
import Cardano.Ledger.Core as SL
( eraDecoder
( EraBlockBody (..)
, eraDecoder
, eraProtVerLow
, toEraCBOR
)
import qualified Cardano.Ledger.Core as SL (TranslationContext, hashBlockBody)
import qualified Cardano.Ledger.Core as SL (TranslationContext)
import Cardano.Ledger.Hashes (HASH)
import qualified Cardano.Ledger.Shelley.API as SL
import Cardano.Protocol.Crypto (Crypto)
import qualified Cardano.Protocol.TPraos.BHeader as SL
import Codec.Serialise (Serialise (..))
import Control.Arrow (Arrow (..))
import qualified Data.ByteString.Lazy as Lazy
import Data.Coerce (coerce)
import Data.Maybe.Strict (StrictMaybe (..))
import Data.Typeable (Typeable)
import GHC.Generics (Generic)
import NoThunks.Class (NoThunks (..))
Expand Down Expand Up @@ -145,7 +158,9 @@ instance ShelleyCompatible proto era => ConvertRawHash (ShelleyBlock proto era)
--
-- This block is parametrised over both the (ledger) era and the protocol.
data ShelleyBlock proto era = ShelleyBlock
{ shelleyBlockRaw :: !(SL.Block (ShelleyProtocolHeader proto) era)
{ shelleyBlockHeader :: !(ShelleyProtocolHeader proto)
, shelleyBlockBody :: !(SL.BlockBody era)
, shelleyBlockPerasCert :: !(StrictMaybe (PerasCert (ShelleyBlock proto era)))
, shelleyBlockHeaderHash :: !ShelleyHash
}

Expand All @@ -158,14 +173,46 @@ instance

type instance HeaderHash (ShelleyBlock proto era) = ShelleyHash

-- | Reconstruct a Shelley ledger block from a 'ShelleyBlock'.
--
-- TODO: we should be able to avoid this conversion in most cases
fromShelleyBlock :: ShelleyBlock proto era -> SL.Block (ShelleyProtocolHeader proto) era
fromShelleyBlock blk = SL.Block (shelleyBlockHeader blk) (shelleyBlockBody blk)

-- | Construct a 'ShelleyBlock' from a Shelley ledger block.
--
-- TODO: we should be able to avoid this conversion in most cases
toShelleyBlock ::
ShelleyCompatible proto era => SL.Block (ShelleyProtocolHeader proto) era -> ShelleyBlock proto era
toShelleyBlock (SL.Block hdr body) = mkShelleyBlock hdr body
Comment on lines +176 to +187
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also just store an SL.Block, but encode it differently. But either way, this conversion should be super cheap


mkShelleyBlock ::
ShelleyCompatible proto era =>
SL.Block (ShelleyProtocolHeader proto) era ->
ShelleyProtocolHeader proto ->
SL.BlockBody era ->
ShelleyBlock proto era
mkShelleyBlock raw =
mkShelleyBlock = mkShelleyBlockGeneric SNothing

mkShelleyBlockWithPerasCert ::
ShelleyCompatible proto era =>
PerasCert (ShelleyBlock proto era) ->
ShelleyProtocolHeader proto ->
SL.BlockBody era ->
ShelleyBlock proto era
mkShelleyBlockWithPerasCert = mkShelleyBlockGeneric . SJust

mkShelleyBlockGeneric ::
ShelleyCompatible proto era =>
StrictMaybe (PerasCert (ShelleyBlock proto era)) ->
ShelleyProtocolHeader proto ->
BlockBody era ->
ShelleyBlock proto era
mkShelleyBlockGeneric cert header body =
ShelleyBlock
{ shelleyBlockRaw = raw
, shelleyBlockHeaderHash = pHeaderHash $ SL.bheader raw
{ shelleyBlockHeader = header
, shelleyBlockBody = body
, shelleyBlockPerasCert = cert
, shelleyBlockHeaderHash = pHeaderHash header
}

class
Expand Down Expand Up @@ -198,10 +245,10 @@ instance
ShowProxy (Header (ShelleyBlock proto era))

instance ShelleyCompatible proto era => GetHeader (ShelleyBlock proto era) where
getHeader (ShelleyBlock rawBlk hdrHash) =
getHeader block =
ShelleyHeader
{ shelleyHeaderRaw = SL.bheader rawBlk
, shelleyHeaderHash = hdrHash
{ shelleyHeaderRaw = shelleyBlockHeader block
, shelleyHeaderHash = shelleyBlockHeaderHash block
}

blockMatchesHeader hdr blk =
Expand All @@ -210,7 +257,7 @@ instance ShelleyCompatible proto era => GetHeader (ShelleyBlock proto era) where
SL.hashBlockBody blockBody == pHeaderBodyHash shelleyHdr
where
ShelleyHeader{shelleyHeaderRaw = shelleyHdr} = hdr
ShelleyBlock{shelleyBlockRaw = SL.Block _ blockBody} = blk
ShelleyBlock{shelleyBlockBody = blockBody} = blk

headerIsEBB = const Nothing

Expand Down Expand Up @@ -288,10 +335,35 @@ instance HasNestedContent f (ShelleyBlock proto era)

instance ShelleyCompatible proto era => EncCBOR (ShelleyBlock proto era) where
-- Don't encode the header hash, we recompute it during deserialisation
encCBOR = encCBOR . shelleyBlockRaw
encCBOR block = do
let header = shelleyBlockHeader block
let body = shelleyBlockBody block
let bodyLen = listLen body
case shelleyBlockPerasCert block of
SNothing ->
encodeListLen (1 + bodyLen)
<> encCBOR header
<> encCBORGroup body
SJust cert ->
encodeListLen (1 + bodyLen + 1)
<> encCBOR header
<> encCBORGroup body
<> encCBOR (encode cert)

instance ShelleyCompatible proto era => DecCBOR (Annotator (ShelleyBlock proto era)) where
decCBOR = fmap mkShelleyBlock <$> decCBOR
decCBOR = do
len <- decodeListLen
header <- decCBOR
body <- decCBOR
cert <- decMaybeCertOrFail len
pure $ mkShelleyBlockGeneric <$> cert <*> header <*> body
where
bodyLen = fromIntegral (numSegComponents @era)

decMaybeCertOrFail len
| len == 1 + bodyLen = pure <$> pure SNothing
| len == 1 + bodyLen + 1 = pure <$> (SJust <$> fromPlainDecoder decode)
| otherwise = cborError $ Plain.DecoderErrorCustom "ShelleyBlock" "invalid number of elements"

instance ShelleyCompatible proto era => EncCBOR (Header (ShelleyBlock proto era)) where
-- Don't encode the header hash, we recompute it during deserialisation
Expand Down Expand Up @@ -342,7 +414,7 @@ decodeShelleyHeader = eraDecoder @era $ (. Full) . runAnnotator <$> decCBOR
-------------------------------------------------------------------------------}

instance ShelleyCompatible proto era => Condense (ShelleyBlock proto era) where
condense = show . shelleyBlockRaw
condense = show . ((shelleyBlockHeader &&& shelleyBlockBody) &&& shelleyBlockPerasCert)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to tweak this instance.


instance ShelleyCompatible proto era => Condense (Header (ShelleyBlock proto era)) where
condense = show . shelleyHeaderRaw
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Ouroboros.Consensus.Shelley.Ledger.Forge (forgeShelleyBlock) where

import qualified Cardano.Ledger.Core as Core (Tx)
import qualified Cardano.Ledger.Core as SL (hashBlockBody, mkBasicBlockBody, txSeqBlockBodyL)
import qualified Cardano.Ledger.Shelley.API as SL (Block (..), extractTx)
import qualified Cardano.Ledger.Shelley.API as SL (extractTx)
import qualified Cardano.Ledger.Shelley.BlockBody as SL (bBodySize)
import qualified Cardano.Protocol.TPraos.BHeader as SL
import Control.Exception
Expand Down Expand Up @@ -72,7 +72,7 @@ forgeShelleyBlock
(SL.hashBlockBody @era body)
actualBodySize
protocolVersion
let blk = mkShelleyBlock $ SL.Block hdr body
let blk = mkShelleyBlock hdr body
return $
assert (verifyBlockIntegrity (configSlotsPerKESPeriod $ configConsensus cfg) blk) $
blk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ import qualified Codec.CBOR.Decoding as CBOR
import Codec.CBOR.Encoding (Encoding)
import qualified Codec.CBOR.Encoding as CBOR
import Codec.Serialise (decode, encode)
import Control.Arrow (left, second)
import Control.Arrow (Arrow (..), left, second)
import qualified Control.Exception as Exception
import Control.Monad.Except
import qualified Control.State.Transition.Extended as STS
Expand All @@ -113,6 +113,7 @@ import Ouroboros.Consensus.Config
import Ouroboros.Consensus.HardFork.Abstract
import Ouroboros.Consensus.HardFork.Combinator.PartialConfig
import qualified Ouroboros.Consensus.HardFork.History as HardFork
import Ouroboros.Consensus.HardFork.History.EraParams (EraParams (..))
import Ouroboros.Consensus.HardFork.History.Util
import Ouroboros.Consensus.HardFork.Simple
import Ouroboros.Consensus.HeaderValidation
Expand Down Expand Up @@ -168,6 +169,8 @@ shelleyEraParams genesis =
, eraSlotLength = mkSlotLength $ SL.fromNominalDiffTimeMicro $ SL.sgSlotLength genesis
, eraSafeZone = HardFork.StandardSafeZone stabilityWindow
, eraGenesisWin = GenesisWindow stabilityWindow
, -- TODO(geo2a): enabled Peras conditionally in the Dijkstra era
eraPerasRoundLength = HardFork.NoPerasEnabled
}
where
stabilityWindow =
Expand All @@ -183,6 +186,7 @@ shelleyEraParamsNeverHardForks genesis =
, eraSlotLength = mkSlotLength $ SL.fromNominalDiffTimeMicro $ SL.sgSlotLength genesis
, eraSafeZone = HardFork.UnsafeIndefiniteSafeZone
, eraGenesisWin = GenesisWindow stabilityWindow
, eraPerasRoundLength = HardFork.NoPerasEnabled
}
where
stabilityWindow =
Expand Down Expand Up @@ -584,7 +588,7 @@ instance
LedgerTables
. KeysMK
. Core.neededTxInsForBlock
. shelleyBlockRaw
. fromShelleyBlock

data ShelleyReapplyException
= forall era.
Expand Down Expand Up @@ -628,10 +632,7 @@ applyHelper f cfg blk stBefore = do
f
globals
tickedShelleyLedgerState
( let b = shelleyBlockRaw blk
h' = mkHeaderView (SL.bheader b)
in SL.Block h' (SL.bbody b)
)
(SL.Block (mkHeaderView (shelleyBlockHeader blk)) (shelleyBlockBody blk))

let track ::
LedgerState (ShelleyBlock proto era) ValuesMK ->
Expand Down
Loading