Skip to content

Commit 2e90a83

Browse files
Add executed_transaction_count to consensus spec
1 parent bcfa353 commit 2e90a83

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

p2p/proto/consensus/consensus.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The standard order for a Proposals (following the init):
4646
1. [ProposalInit][ProposalInitLink] - once
4747
1. [BlockInfo][BlockInfoLink] - once, required to execute the transactions.
4848
1. [TransactionBatch][TransactionBatchLink] - multiple
49+
1. [TransactionsFin][TransactionsFinLink] - once
4950
1. [ProposalCommitment][ProposalCommitmentLink] - once
5051
1. [ProposalFin][ProposalFinLink] - once
5152

@@ -146,6 +147,7 @@ Field which identifies a stream of messages.
146147
[ProposalInitLink]: consensus.proto#L58
147148
[ProposalFinLink]: consensus.proto#L66
148149
[TransactionBatchLink]: consensus.proto#L70
149-
[StreamMessageLink]: consensus.proto#L76
150-
[ProposalCommitmentLink]: consensus.proto#L85
151-
[BlockInfoLink]: consensus.proto#L111
150+
[TransactionsFinLink]: consensus.proto#L82
151+
[StreamMessageLink]: consensus.proto#L94
152+
[ProposalCommitmentLink]: consensus.proto#L103
153+
[BlockInfoLink]: consensus.proto#L129

p2p/proto/consensus/consensus.proto

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ message ConsensusStreamId {
4747
// Messages which make up a Proposal stream.
4848
message ProposalPart {
4949
oneof messages {
50-
ProposalInit init = 1;
51-
ProposalFin fin = 2;
52-
BlockInfo block_info = 3;
53-
TransactionBatch transactions = 4;
54-
ProposalCommitment commitment = 5;
50+
ProposalInit init = 1;
51+
ProposalFin fin = 2;
52+
BlockInfo block_info = 3;
53+
TransactionBatch transactions = 4;
54+
TransactionsFin transaction_fin = 5;
55+
ProposalCommitment commitment = 6;
5556
}
5657
}
5758

@@ -71,6 +72,12 @@ message TransactionBatch {
7172
repeated ConsensusTransaction transactions = 1;
7273
}
7374

75+
// Marks the completion of the transaction streaming.
76+
message TransactionsFin {
77+
// Total number of transactions executed in the proposal.
78+
uint64 executed_transaction_count = 1;
79+
}
80+
7481
// The content and stream_id are generic fields. The user of the stream can choose to pass whatever
7582
// message that they want. The messages are then encoded in bytes.
7683
message StreamMessage {

0 commit comments

Comments
 (0)