Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion qbft/messages_encoding.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion qbft/spectest/all_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var AllTests = []tests.TestF{
proposal.NotPreparedPreviouslyJustification,
proposal.PreparedPreviouslyJustification,
proposal.DifferentJustifications,
proposal.JustificationsNotHeighest,
proposal.JustificationsNotHighest,
proposal.DuplicateMsg,
proposal.DuplicateMsgDifferentRoot,
proposal.FirstRoundJustification,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "create commit",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a commit message for QBFT consensus.",
"Value": [
1,
2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "create prepare",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a prepare message for QBFT consensus.",
"Value": [
1,
2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "create proposal not previously prepared",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a proposal message for non-first round when not previously prepared, with round change justifications.",
"Value": [
1,
2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "create proposal previously prepared",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a proposal message when previously prepared with round change and prepare justifications.",
"Value": [
1,
2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "create proposal",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a proposal message when not previously prepared.",
"Value": [
1,
2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"Name": "create round change no justification quorum",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a round change message that was previously prepared but failed to extract a justification quorum, resulting in an unjustified round change.",
"Value": [
0,
0,
0,
0,
1,
2,
3,
4,
0,
0,
0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "create round change previously prepared",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a round change message when previously prepared with justifications.",
"Value": [
1,
2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "create round change",
"Type": "Message creation: validation of consensus message construction and encoding",
"Documentation": "Test creating a round change message when not previously prepared.",
"Value": [
1,
2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "SSZ marshalling of signed messaged",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test valid SSZ marshaling of a signed QBFT message with justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "commit data nil or len 0",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test encoding of commit data for QBFT message validation.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "duplicate signers",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test signed message with duplicate signers, expecting validation error.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "get root",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test GetRoot method on signed QBFT message with justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "invalid hash data root",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test an invalid hash data root for QBFT message validation.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "invalid prepare justification unmarshalling",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test unmarshalling invalid prepare justifications, expecting validation error during message validation.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "invalid round change justification unmarshalling",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test unmarshalling invalid round change justifications, expecting validation error during message validation.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "marshal RC and Prepare justifications",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test marshalling round change and prepare justifications for QBFT proposal message.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "marshal justifications with full data",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test marshalling justifications with full data, which should be omitted during marshalling.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "marshal justifications",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test marshalling justifications without full data for QBFT proposal message.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "msg identifier len == 0",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test message with empty identifier, expecting validation error.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "msg identifier nil",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test message with nil identifier, expecting validation error.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "msg type unknown",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test message with unknown/invalid message type, expecting validation error.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "multi signers",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test signed message with multiple signers for QBFT message validation.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "no signers",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test signed message with no signers, expecting validation error.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "prepare data encoding",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test encoding of prepare data for QBFT message validation.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "prepare justification unmarshalling",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test unmarshalling prepare justifications from QBFT proposal message.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "propose data encoding",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test encoding of proposal data with justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "rc not prev prepared justifications",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test valid justified round change message without previously prepared justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "rc prev prepared justifications",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test valid justified round change message with previously prepared justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "round change data encoding",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test encoding of round change data with justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "round change justification unmarshalling",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test unmarshalling round change justifications from QBFT proposal message.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "round change prepared",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test round change message with prepared value and justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "signed message encoding",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test encoding of signed QBFT message with justifications.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "signer 0",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test signed message with signer ID 0, which is not allowed.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "unmarshal justifications",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test unmarshalling justifications from QBFT proposal message.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "valid hash data root",
"Type": "QBFT message validation: testing message encoding, decoding, and structural integrity",
"Documentation": "Test a valid hash data root for QBFT message validation.",
"Messages": [
{
"Signatures": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "broadcast decided",
"Type": "QBFT controller: validation of consensus state management and instance lifecycle",
"Documentation": "Test broadcasting decided message, expecting successful broadcast.",
"RunInstanceData": [
{
"InputValue": "AQIDBA==",
Expand Down Expand Up @@ -582,11 +584,9 @@
},
"FullData": "AQIDBAUGBwgJAQIDBAUGBwgJAQIDBAUGBwgJ"
}
},
"omitempty": null
}
}
],
"OutputMessages": null,
"ExpectedError": "",
"omitempty": null
"ExpectedError": ""
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "decide current instance",
"Type": "QBFT controller: validation of consensus state management and instance lifecycle",
"Documentation": "Test a decided message received for current running instance, expecting the instance to be decided.",
"RunInstanceData": [
{
"InputValue": "AQIDBA==",
Expand Down Expand Up @@ -512,11 +514,9 @@
"DecidedVal": "AQIDBAUGBwgJAQIDBAUGBwgJAQIDBAUGBwgJ",
"DecidedCnt": 1,
"BroadcastedDecided": null
},
"omitempty": null
}
}
],
"OutputMessages": null,
"ExpectedError": "",
"omitempty": null
"ExpectedError": ""
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "decide current instance future round",
"Type": "QBFT controller: validation of consensus state management and instance lifecycle",
"Documentation": "Test that a decided msg received for current running instance for a future round should be accepted",
"RunInstanceData": [
{
"InputValue": "AQIDBA==",
Expand Down Expand Up @@ -512,11 +514,9 @@
"DecidedVal": "AQIDBAUGBwgJAQIDBAUGBwgJAQIDBAUGBwgJ",
"DecidedCnt": 1,
"BroadcastedDecided": null
},
"omitempty": null
}
}
],
"OutputMessages": null,
"ExpectedError": "",
"omitempty": null
"ExpectedError": ""
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"Name": "decide current instance past round",
"Type": "QBFT controller: validation of consensus state management and instance lifecycle",
"Documentation": "Test a decided message received for current running instance for a past round, expecting the instance to be decided.",
"RunInstanceData": [
{
"InputValue": "AQIDBA==",
Expand Down Expand Up @@ -938,11 +940,9 @@
"DecidedVal": "AQIDBAUGBwgJAQIDBAUGBwgJAQIDBAUGBwgJ",
"DecidedCnt": 1,
"BroadcastedDecided": null
},
"omitempty": null
}
}
],
"OutputMessages": null,
"ExpectedError": "",
"omitempty": null
"ExpectedError": ""
}
Loading
Loading