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
2 changes: 1 addition & 1 deletion ledger/babbage/babbage.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ type BabbageBlockHeader struct {
Minor uint64
}
}
Signature interface{}
Signature []byte
}

func (h *BabbageBlockHeader) UnmarshalCBOR(cborData []byte) error {
Expand Down
2 changes: 1 addition & 1 deletion ledger/shelley/shelley.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ type ShelleyBlockHeader struct {
ProtoMajorVersion uint64
ProtoMinorVersion uint64
}
Signature interface{}
Signature []byte
}

func (h *ShelleyBlockHeader) UnmarshalCBOR(cborData []byte) error {
Expand Down
3 changes: 1 addition & 2 deletions ledger/verify_kes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
Loading