Home / Blink Labs / gouroboros
Nov 02, 12-1 AM (0)
Nov 02, 1-2 AM (1)
Nov 02, 2-3 AM (0)
Nov 02, 3-4 AM (0)
Nov 02, 4-5 AM (0)
Nov 02, 5-6 AM (0)
Nov 02, 6-7 AM (0)
Nov 02, 7-8 AM (0)
Nov 02, 8-9 AM (0)
Nov 02, 9-10 AM (0)
Nov 02, 10-11 AM (0)
Nov 02, 11-12 PM (0)
Nov 02, 12-1 PM (1)
Nov 02, 1-2 PM (2)
Nov 02, 2-3 PM (3)
Nov 02, 3-4 PM (2)
Nov 02, 4-5 PM (1)
Nov 02, 5-6 PM (1)
Nov 02, 6-7 PM (1)
Nov 02, 7-8 PM (0)
Nov 02, 8-9 PM (0)
Nov 02, 9-10 PM (0)
Nov 02, 10-11 PM (0)
Nov 02, 11-12 AM (0)
Nov 03, 12-1 AM (0)
Nov 03, 1-2 AM (0)
Nov 03, 2-3 AM (0)
Nov 03, 3-4 AM (0)
Nov 03, 4-5 AM (0)
Nov 03, 5-6 AM (0)
Nov 03, 6-7 AM (0)
Nov 03, 7-8 AM (0)
Nov 03, 8-9 AM (1)
Nov 03, 9-10 AM (0)
Nov 03, 10-11 AM (0)
Nov 03, 11-12 PM (0)
Nov 03, 12-1 PM (0)
Nov 03, 1-2 PM (0)
Nov 03, 2-3 PM (0)
Nov 03, 3-4 PM (0)
Nov 03, 4-5 PM (0)
Nov 03, 5-6 PM (1)
Nov 03, 6-7 PM (3)
Nov 03, 7-8 PM (0)
Nov 03, 8-9 PM (1)
Nov 03, 9-10 PM (1)
Nov 03, 10-11 PM (0)
Nov 03, 11-12 AM (3)
Nov 04, 12-1 AM (0)
Nov 04, 1-2 AM (0)
Nov 04, 2-3 AM (0)
Nov 04, 3-4 AM (0)
Nov 04, 4-5 AM (0)
Nov 04, 5-6 AM (0)
Nov 04, 6-7 AM (0)
Nov 04, 7-8 AM (0)
Nov 04, 8-9 AM (0)
Nov 04, 9-10 AM (0)
Nov 04, 10-11 AM (0)
Nov 04, 11-12 PM (0)
Nov 04, 12-1 PM (1)
Nov 04, 1-2 PM (0)
Nov 04, 2-3 PM (3)
Nov 04, 3-4 PM (0)
Nov 04, 4-5 PM (0)
Nov 04, 5-6 PM (2)
Nov 04, 6-7 PM (1)
Nov 04, 7-8 PM (3)
Nov 04, 8-9 PM (1)
Nov 04, 9-10 PM (0)
Nov 04, 10-11 PM (1)
Nov 04, 11-12 AM (0)
Nov 05, 12-1 AM (0)
Nov 05, 1-2 AM (0)
Nov 05, 2-3 AM (0)
Nov 05, 3-4 AM (0)
Nov 05, 4-5 AM (0)
Nov 05, 5-6 AM (0)
Nov 05, 6-7 AM (0)
Nov 05, 7-8 AM (0)
Nov 05, 8-9 AM (0)
Nov 05, 9-10 AM (0)
Nov 05, 10-11 AM (0)
Nov 05, 11-12 PM (0)
Nov 05, 12-1 PM (0)
Nov 05, 1-2 PM (1)
Nov 05, 2-3 PM (0)
Nov 05, 3-4 PM (0)
Nov 05, 4-5 PM (0)
Nov 05, 5-6 PM (0)
Nov 05, 6-7 PM (0)
Nov 05, 7-8 PM (0)
Nov 05, 8-9 PM (0)
Nov 05, 9-10 PM (0)
Nov 05, 10-11 PM (0)
Nov 05, 11-12 AM (0)
Nov 06, 12-1 AM (0)
Nov 06, 1-2 AM (0)
Nov 06, 2-3 AM (0)
Nov 06, 3-4 AM (0)
Nov 06, 4-5 AM (0)
Nov 06, 5-6 AM (0)
Nov 06, 6-7 AM (0)
Nov 06, 7-8 AM (0)
Nov 06, 8-9 AM (0)
Nov 06, 9-10 AM (0)
Nov 06, 10-11 AM (0)
Nov 06, 11-12 PM (0)
Nov 06, 12-1 PM (0)
Nov 06, 1-2 PM (0)
Nov 06, 2-3 PM (0)
Nov 06, 3-4 PM (0)
Nov 06, 4-5 PM (0)
Nov 06, 5-6 PM (1)
Nov 06, 6-7 PM (0)
Nov 06, 7-8 PM (0)
Nov 06, 8-9 PM (0)
Nov 06, 9-10 PM (1)
Nov 06, 10-11 PM (3)
Nov 06, 11-12 AM (1)
Nov 07, 12-1 AM (0)
Nov 07, 1-2 AM (0)
Nov 07, 2-3 AM (1)
Nov 07, 3-4 AM (1)
Nov 07, 4-5 AM (1)
Nov 07, 5-6 AM (1)
Nov 07, 6-7 AM (0)
Nov 07, 7-8 AM (0)
Nov 07, 8-9 AM (0)
Nov 07, 9-10 AM (0)
Nov 07, 10-11 AM (0)
Nov 07, 11-12 PM (0)
Nov 07, 12-1 PM (0)
Nov 07, 1-2 PM (1)
Nov 07, 2-3 PM (1)
Nov 07, 3-4 PM (0)
Nov 07, 4-5 PM (3)
Nov 07, 5-6 PM (2)
Nov 07, 6-7 PM (0)
Nov 07, 7-8 PM (0)
Nov 07, 8-9 PM (2)
Nov 07, 9-10 PM (2)
Nov 07, 10-11 PM (0)
Nov 07, 11-12 AM (1)
Nov 08, 12-1 AM (0)
Nov 08, 1-2 AM (0)
Nov 08, 2-3 AM (0)
Nov 08, 3-4 AM (0)
Nov 08, 4-5 AM (0)
Nov 08, 5-6 AM (0)
Nov 08, 6-7 AM (0)
Nov 08, 7-8 AM (0)
Nov 08, 8-9 AM (0)
Nov 08, 9-10 AM (0)
Nov 08, 10-11 AM (0)
Nov 08, 11-12 PM (0)
Nov 08, 12-1 PM (0)
Nov 08, 1-2 PM (1)
Nov 08, 2-3 PM (1)
Nov 08, 3-4 PM (1)
Nov 08, 4-5 PM (0)
Nov 08, 5-6 PM (0)
Nov 08, 6-7 PM (0)
Nov 08, 7-8 PM (0)
Nov 08, 8-9 PM (0)
Nov 08, 9-10 PM (0)
Nov 08, 10-11 PM (0)
Nov 08, 11-12 AM (0)
Nov 09, 12-1 AM (0)
60 commits this week Nov 02, 2025 - Nov 09, 2025
test: add comprehensive handshake client refusal tests
Add test coverage for all handshake refusal modes:
- RefuseReasonVersionMismatch for both NtC and NtN
- RefuseReasonDecodeError for both NtC and NtN
- RefuseReasonRefused for both NtC and NtN

Include edge cases for empty messages, multiple versions,
and single version scenarios.

Signed-off-by: Chris Gianelloni <[email protected]>
fix(ledger): ensure empty Blake2b hashes encode as zero-filled bytestrings in CBOR (#1227)
Previously, when Blake2b256, Blake2b224, or Blake2b160 hash fields had zero values
(all bytes are 0), the CBOR encoding would output `null` instead of a proper
zero-filled bytestring of the correct size.

This commit adds MarshalCBOR() methods to all Blake2b hash types to ensure they
always encode as proper bytestrings, even when zero-valued:

- Blake2b256: encodes as 32-byte bytestring (0x5820 + 32 zero bytes)
- Blake2b224: encodes as 28-byte bytestring (0x581C + 28 zero bytes)
- Blake2b160: encodes as 20-byte bytestring (0x54 + 20 zero bytes)

Also adds MarshalJSON() methods for consistency across all Blake2b types.

The fix ensures genesis blocks and other scenarios with empty prev hashes
properly encode as `h'0000...0000'` instead of `null` in CBOR output.

Includes comprehensive unit tests to verify the fix and prevent regressions.

Signed-off-by: GitHub Copilot <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
feat: implement CBOR marshal/unmarshal for ScriptsNotPaidUtxo error (#1228)
Add custom CBOR encoding/decoding for ScriptsNotPaidUtxo that matches
the Haskell cardano-ledger specification. The implementation uses
`[constructor_index, utxo_map]` format with multi-strategy decoding
to handle complex CBOR map structures.

- Add `MarshalCBOR` converting slice to map format
- Add `UnmarshalCBOR` with fallback decoding strategies
- Add comprehensive test with mock interfaces
- Maintain compatibility with existing error handling

Signed-off-by: Chris Gianelloni <[email protected]>
Co-authored-by: GitHub Copilot <[email protected]>
fix(ledger): ensure empty Blake2b hashes encode as zero-filled bytestrings in CBOR
Previously, when Blake2b256, Blake2b224, or Blake2b160 hash fields had zero values
(all bytes are 0), the CBOR encoding would output `null` instead of a proper
zero-filled bytestring of the correct size.

This commit adds MarshalCBOR() methods to all Blake2b hash types to ensure they
always encode as proper bytestrings, even when zero-valued:

- Blake2b256: encodes as 32-byte bytestring (0x5820 + 32 zero bytes)
- Blake2b224: encodes as 28-byte bytestring (0x581C + 28 zero bytes)
- Blake2b160: encodes as 20-byte bytestring (0x54 + 20 zero bytes)

Also adds MarshalJSON() methods for consistency across all Blake2b types.

The fix ensures genesis blocks and other scenarios with empty prev hashes
properly encode as `h'0000...0000'` instead of `null` in CBOR output.

Includes comprehensive unit tests to verify the fix and prevent regressions.

Signed-off-by: GitHub Copilot <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
feat: implement CBOR marshal/unmarshal for ScriptsNotPaidUtxo error
Add custom CBOR encoding/decoding for ScriptsNotPaidUtxo that matches
the Haskell cardano-ledger specification. The implementation uses
`[constructor_index, utxo_map]` format with multi-strategy decoding
to handle complex CBOR map structures.

- Add `MarshalCBOR` converting slice to map format
- Add `UnmarshalCBOR` with fallback decoding strategies
- Add comprehensive test with mock interfaces
- Maintain compatibility with existing error handling

Signed-off-by: Chris Gianelloni <[email protected]>
Co-authored-by: GitHub Copilot <[email protected]>
fix(ledger): ensure empty Blake2b hashes encode as zero-filled bytestrings in CBOR
Previously, when Blake2b256, Blake2b224, or Blake2b160 hash fields had zero values
(all bytes are 0), the CBOR encoding would output `null` instead of a proper
zero-filled bytestring of the correct size.

This commit adds MarshalCBOR() methods to all Blake2b hash types to ensure they
always encode as proper bytestrings, even when zero-valued:

- Blake2b256: encodes as 32-byte bytestring (0x5820 + 32 zero bytes)
- Blake2b224: encodes as 28-byte bytestring (0x581C + 28 zero bytes)
- Blake2b160: encodes as 20-byte bytestring (0x54 + 20 zero bytes)

Also adds MarshalJSON() methods for consistency across all Blake2b types.

The fix ensures genesis blocks and other scenarios with empty prev hashes
properly encode as `h'0000...0000'` instead of `null` in CBOR output.

Includes comprehensive unit tests to verify the fix and prevent regressions.

Signed-off-by: GitHub Copilot <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
feat: implement CBOR marshal/unmarshal for ScriptsNotPaidUtxo error
Add custom CBOR encoding/decoding for ScriptsNotPaidUtxo that matches
the Haskell cardano-ledger specification. The implementation uses
`[constructor_index, utxo_map]` format with multi-strategy decoding
to handle complex CBOR map structures.

- Add `MarshalCBOR` converting slice to map format
- Add `UnmarshalCBOR` with fallback decoding strategies
- Add comprehensive test with mock interfaces
- Maintain compatibility with existing error handling

Signed-off-by: Chris Gianelloni <[email protected]>
Co-authored-by: GitHub Copilot <[email protected]>
feat: implement CBOR marshal/unmarshal for ScriptsNotPaidUtxo error
Add custom CBOR encoding/decoding for ScriptsNotPaidUtxo that matches
the Haskell cardano-ledger specification. The implementation uses
`[constructor_index, utxo_map]` format with multi-strategy decoding
to handle complex CBOR map structures.

- Add `MarshalCBOR` converting slice to map format
- Add `UnmarshalCBOR` with fallback decoding strategies
- Add comprehensive test with mock interfaces
- Maintain compatibility with existing error handling

Signed-off-by: Chris Gianelloni <[email protected]>
Co-authored-by: GitHub Copilot <[email protected]>
feat: implement CBOR marshal/unmarshal for ScriptsNotPaidUtxo error
Add custom CBOR encoding/decoding for ScriptsNotPaidUtxo that matches
the Haskell cardano-ledger specification. The implementation uses
`[constructor_index, utxo_map]` format with multi-strategy decoding
to handle complex CBOR map structures.

- Add `MarshalCBOR` converting slice to map format
- Add `UnmarshalCBOR` with fallback decoding strategies
- Add comprehensive test with mock interfaces
- Maintain compatibility with existing error handling

Signed-off-by: Chris Gianelloni <[email protected]>
Co-authored-by: GitHub Copilot <[email protected]>
feat: implement CBOR marshal/unmarshal for ScriptsNotPaidUtxo error
Add custom CBOR encoding/decoding for ScriptsNotPaidUtxo that matches
the Haskell cardano-ledger specification. The implementation uses
`[constructor_index, utxo_map]` format with multi-strategy decoding
to handle complex CBOR map structures.

- Add `MarshalCBOR` converting slice to map format
- Add `UnmarshalCBOR` with fallback decoding strategies
- Add comprehensive test with mock interfaces
- Maintain compatibility with existing error handling

Signed-off-by: Chris Gianelloni <[email protected]>
Co-authored-by: GitHub Copilot <[email protected]>
feat: implement CBOR marshal/unmarshal for ScriptsNotPaidUtxo error
Add custom CBOR encoding/decoding for ScriptsNotPaidUtxo that matches
the Haskell cardano-ledger specification. The implementation uses
`[constructor_index, utxo_map]` format with multi-strategy decoding
to handle complex CBOR map structures.

- Add `MarshalCBOR` converting slice to map format
- Add `UnmarshalCBOR` with fallback decoding strategies
- Add comprehensive test with mock interfaces
- Maintain compatibility with existing error handling

Signed-off-by: Chris Gianelloni <[email protected]>
Co-authored-by: GitHub Copilot <[email protected]>
fix(ledger): ensure empty Blake2b hashes encode as zero-filled bytestrings in CBOR
Previously, when Blake2b256, Blake2b224, or Blake2b160 hash fields had zero values
(all bytes are 0), the CBOR encoding would output `null` instead of a proper
zero-filled bytestring of the correct size.

This commit adds MarshalCBOR() methods to all Blake2b hash types to ensure they
always encode as proper bytestrings, even when zero-valued:

- Blake2b256: encodes as 32-byte bytestring (0x5820 + 32 zero bytes)
- Blake2b224: encodes as 28-byte bytestring (0x581C + 28 zero bytes)
- Blake2b160: encodes as 20-byte bytestring (0x54 + 20 zero bytes)

Also adds MarshalJSON() methods for consistency across all Blake2b types.

The fix ensures genesis blocks and other scenarios with empty prev hashes
properly encode as `h'0000...0000'` instead of `null` in CBOR output.

Includes comprehensive unit tests to verify the fix and prevent regressions.

Signed-off-by: GitHub Copilot <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>