diff --git a/ledger/babbage/babbage.go b/ledger/babbage/babbage.go index bc27e6c3..1daa256b 100644 --- a/ledger/babbage/babbage.go +++ b/ledger/babbage/babbage.go @@ -173,7 +173,7 @@ type BabbageBlockHeader struct { Minor uint64 } } - Signature interface{} + Signature []byte } func (h *BabbageBlockHeader) UnmarshalCBOR(cborData []byte) error { diff --git a/ledger/shelley/shelley.go b/ledger/shelley/shelley.go index ca978f2c..d0cab22b 100644 --- a/ledger/shelley/shelley.go +++ b/ledger/shelley/shelley.go @@ -151,7 +151,7 @@ type ShelleyBlockHeader struct { ProtoMajorVersion uint64 ProtoMinorVersion uint64 } - Signature interface{} + Signature []byte } func (h *ShelleyBlockHeader) UnmarshalCBOR(cborData []byte) error { diff --git a/ledger/verify_kes.go b/ledger/verify_kes.go index 50592c64..f285d97f 100644 --- a/ledger/verify_kes.go +++ b/ledger/verify_kes.go @@ -129,7 +129,6 @@ func VerifyKes( slotsPerKesPeriod uint64, ) (bool, error) { // Ref: https://github.com/IntersectMBO/ouroboros-consensus/blob/de74882102236fdc4dd25aaa2552e8b3e208448c/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Protocol/Praos.hs#L125 - sigBytes := header.Signature.([]byte) // Ref: https://github.com/IntersectMBO/cardano-ledger/blob/master/libs/cardano-protocol-tpraos/src/Cardano/Protocol/TPraos/BHeader.hs#L189 msgBytes, err := cbor.Encode(header.Body) if err != nil { @@ -144,7 +143,7 @@ func VerifyKes( if currentKesPeriod >= startOfKesPeriod { t = currentKesPeriod - startOfKesPeriod } - return verifySignedKES(opCertVkHotBytes, t, msgBytes, sigBytes), nil + return verifySignedKES(opCertVkHotBytes, t, msgBytes, header.Signature), nil } func verifySignedKES(vkey []byte, period uint64, msg []byte, sig []byte) bool {