Ouroboros.Consensus.Shelley.Node.Serialisation
Contents
Methods
reconstructPrefixLen :: proxy ( Header ( ShelleyBlock proto era)) -> PrefixLen Source #
reconstructNestedCtxt :: proxy ( Header ( ShelleyBlock proto era)) -> ShortByteString -> SizeInBytes -> SomeSecond ( NestedCtxt Header ) ( ShelleyBlock proto era) Source #
encodeDiskDepIx :: CodecConfig ( ShelleyBlock proto era) -> SomeSecond ( NestedCtxt Header ) ( ShelleyBlock proto era) -> Encoding Source #
encodeDiskDep :: CodecConfig ( ShelleyBlock proto era) -> NestedCtxt Header ( ShelleyBlock proto era) a -> a -> Encoding Source #
decodeDiskDepIx :: CodecConfig ( ShelleyBlock proto era) -> Decoder s ( SomeSecond ( NestedCtxt Header ) ( ShelleyBlock proto era)) Source #
decodeDiskDep :: CodecConfig ( ShelleyBlock proto era) -> NestedCtxt Header ( ShelleyBlock proto era) a -> forall s. Decoder s ( ByteString -> a) Source #
estimateBlockSize :: Header ( ShelleyBlock proto era) -> SizeInBytes Source #
getBinaryBlockInfo :: ShelleyBlock proto era -> BinaryBlockInfo Source #
encodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> SlotNo -> Encoding Source #
decodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> forall s. Decoder s SlotNo Source #
encodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> GenTxId ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( GenTxId ( ShelleyBlock proto era)) Source #
The To/FromCBOR instances defined in cardano-ledger-specs use CBOR-in-CBOR to get the annotation.
To/FromCBOR
cardano-ledger-specs
encodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> GenTx ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( GenTx ( ShelleyBlock proto era)) Source #
We use CBOR-in-CBOR
encodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> SerialisedHeader ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( SerialisedHeader ( ShelleyBlock proto era)) Source #
CBOR-in-CBOR to be compatible with the wrapped ( Serialised ) variant.
Serialised
encodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> Header ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( Header ( ShelleyBlock proto era)) Source #
Serialised uses CBOR-in-CBOR by default.
encodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> Serialised ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( Serialised ( ShelleyBlock proto era)) Source #
ApplyTxErr '(ShelleyBlock era)'
ApplyTxErr
encodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> ApplyTxError era -> Encoding Source #
decodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( ApplyTxError era) Source #
encodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> GenTxId ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( GenTxId ( ShelleyBlock proto era)) Source #
Uses CBOR-in-CBOR in the To/FromCBOR instances to get the annotation.
encodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> GenTx ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( GenTx ( ShelleyBlock proto era)) Source #
encodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> Serialised ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( Serialised ( ShelleyBlock proto era)) Source #
encodeResult :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> BlockQuery ( ShelleyBlock proto era) result -> result -> Encoding Source #
decodeResult :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> BlockQuery ( ShelleyBlock proto era) result -> forall s. Decoder s result Source #
encodeDisk :: CodecConfig ( ShelleyBlock proto era) -> AnnTip ( ShelleyBlock proto era) -> Encoding Source #
encodeDisk :: CodecConfig ( ShelleyBlock proto era) -> PraosState c -> Encoding Source #
ChainDepState (BlockProtocol (ShelleyBlock era))
ChainDepState
BlockProtocol
ShelleyBlock
encodeDisk :: CodecConfig ( ShelleyBlock proto era) -> TPraosState c -> Encoding Source #
encodeDisk :: CodecConfig ( ShelleyBlock proto era) -> LedgerState ( ShelleyBlock proto era) -> Encoding Source #
encodeDisk :: CodecConfig ( ShelleyBlock proto era) -> Header ( ShelleyBlock proto era) -> Encoding Source #
decodeDisk :: CodecConfig ( ShelleyBlock proto era) -> forall s. Decoder s ( AnnTip ( ShelleyBlock proto era)) Source #
decodeDisk :: CodecConfig ( ShelleyBlock proto era) -> forall s. Decoder s ( PraosState c) Source #
decodeDisk :: CodecConfig ( ShelleyBlock proto era) -> forall s. Decoder s ( TPraosState c) Source #
decodeDisk :: CodecConfig ( ShelleyBlock proto era) -> forall s. Decoder s ( LedgerState ( ShelleyBlock proto era)) Source #
CBOR-in-CBOR for the annotation. This also makes it compatible with the wrapped ( Serialised ) variant.
encodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> ShelleyBlock proto era -> Encoding Source #
decodeNodeToNode :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToNodeVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( ShelleyBlock proto era) Source #
encodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> SomeSecond BlockQuery ( ShelleyBlock proto era) -> Encoding Source #
decodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( SomeSecond BlockQuery ( ShelleyBlock proto era)) Source #
encodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> ShelleyBlock proto era -> Encoding Source #
decodeNodeToClient :: CodecConfig ( ShelleyBlock proto era) -> BlockNodeToClientVersion ( ShelleyBlock proto era) -> forall s. Decoder s ( ShelleyBlock proto era) Source #
encodeDisk :: CodecConfig ( ShelleyBlock proto era) -> ShelleyBlock proto era -> Encoding Source #
decodeDisk :: CodecConfig ( ShelleyBlock proto era) -> forall s. Decoder s ( ByteString -> Header ( ShelleyBlock proto era)) Source #
decodeDisk :: CodecConfig ( ShelleyBlock proto era) -> forall s. Decoder s ( ByteString -> ShelleyBlock proto era) Source #