Skip to content

Commit

Permalink
changes: side-tx-results updates
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilpune committed Jan 11, 2024
1 parent 89b4d33 commit 4d5d344
Show file tree
Hide file tree
Showing 10 changed files with 1,389 additions and 1,004 deletions.
930 changes: 734 additions & 196 deletions abci/types/types.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ func (cs *State) defaultDecideProposal(height int64, round int32) {
// Make proposal
propBlockID := types.BlockID{Hash: block.Hash(), PartSetHeader: blockParts.Header()}
proposal := types.NewProposal(height, round, cs.ValidRound, propBlockID)
proposal.Data = block.DataHash // [peppermint] add data hash to proposal
proposal.Data = block.DataHash // [dojimamint] add data hash to proposal
d := proposal.SignBytes(cs.state.ChainID)
cs.Logger.Info("[dojimamint] New proposal", "signBytes", d)
p := proposal.ToProto()
Expand Down
28 changes: 26 additions & 2 deletions proto/tendermint/abci/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ message RequestApplySnapshotChunk {
message RequestBeginSideBlock {
bytes hash = 1;
tendermint.types.Header header = 2 [(gogoproto.nullable)=false];
repeated tendermint.types.SideTxResult side_tx_results = 3 [(gogoproto.nullable)=false];
repeated SideTxResult side_tx_results = 3 [(gogoproto.nullable)=false];
}

message RequestDeliverSideTx {
Expand Down Expand Up @@ -308,7 +308,7 @@ message ResponseBeginSideBlock {
message ResponseDeliverSideTx {
uint32 code = 1;
string codespace = 2;
tendermint.types.SideTxResultType result = 4;
SideTxResultType result = 4;
bytes data = 3;
}

Expand Down Expand Up @@ -400,6 +400,30 @@ message Evidence {
int64 total_voting_power = 5;
}

//---------------Side-Tx-Types-----------

// Side-tx result type
enum SideTxResultType {
Skip = 0;
Yes = 1;
No = 2;
}

// Side-tx sig
message SideTxSig {
SideTxResultType result = 1;
bytes sig = 2;
bytes address = 3;
}

// Side tx results
message SideTxResult {
bytes tx_hash = 1;
repeated SideTxSig sigs = 2 [(gogoproto.nullable)=false];
}



//----------------------------------------
// State Sync Types

Expand Down
181 changes: 144 additions & 37 deletions proto/tendermint/types/canonical.pb.go

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

4 changes: 3 additions & 1 deletion proto/tendermint/types/canonical.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ message CanonicalProposal {
CanonicalBlockID block_id = 5 [(gogoproto.customname) = "BlockID"];
google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 7 [(gogoproto.customname) = "ChainID"];
bytes data = 8;
}

message CanonicalVote {
Expand All @@ -34,5 +35,6 @@ message CanonicalVote {
CanonicalBlockID block_id = 4 [(gogoproto.customname) = "BlockID"];
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 6 [(gogoproto.customname) = "ChainID"];
repeated tendermint.types.SideTxResult side_tx_results = 7;
bytes data = 7;
repeated tendermint.types.SideTxResult side_tx_results = 8;
}
Loading

0 comments on commit 4d5d344

Please sign in to comment.