Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
@@ -0,0 +1,22 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Patch

- A bullet item for the Patch category.

-->
<!--
### Non-Breaking

- A bullet item for the Non-Breaking category.

-->

### Breaking

- Encode the slot number in the TPraos state as `[] / [slot]` instead of `[0] / [1, slot]`.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import qualified Ouroboros.Consensus.Protocol.Ledger.HotKey as HotKey
import Ouroboros.Consensus.Protocol.Ledger.Util
import Ouroboros.Consensus.Protocol.Praos.Common
import Ouroboros.Consensus.Ticked
import Ouroboros.Consensus.Util.CBOR
import Ouroboros.Consensus.Util.Condense
import Ouroboros.Consensus.Util.Versioned

Expand Down Expand Up @@ -283,7 +284,7 @@ instance Serialise TPraosState where
encodeVersion serialisationFormatVersion1 $
mconcat
[ CBOR.encodeListLen 2
, toCBOR slot
, encodeWithOrigin toCBOR slot
, toCBOR chainDepState
]

Expand All @@ -293,7 +294,7 @@ instance Serialise TPraosState where
where
decodeTPraosState1 = do
enforceSize "TPraosState" 2
TPraosState <$> fromCBOR <*> fromCBOR
TPraosState <$> decodeWithOrigin fromCBOR <*> fromCBOR

data instance Ticked TPraosState = TickedChainDepState
{ tickedTPraosStateChainDepState :: SL.ChainDepState
Expand Down