Skip to content

Commit

Permalink
impl inject oracleTx in prepareProposal and validate oracleTx in proc…
Browse files Browse the repository at this point in the history
…essProposal
  • Loading branch information
yan-soon authored and yan-soon committed Apr 18, 2024
1 parent 5d9a887 commit 66e1120
Show file tree
Hide file tree
Showing 4 changed files with 318 additions and 45 deletions.
1 change: 1 addition & 0 deletions oracle/service/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func ProcessSignVoteQueue(oracleInfo *types.OracleInfo) {

// batch sign the entire unsignedVoteBuffer and add to gossipBuffer
newGossipVote := &oracleproto.GossipVote{
Validator: oracleInfo.PubKey.Address(),
PublicKey: oracleInfo.PubKey.Bytes(),
SignType: oracleInfo.PubKey.Type(),
Votes: batchVotes,
Expand Down
257 changes: 220 additions & 37 deletions proto/tendermint/oracle/types.pb.go

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

4 changes: 4 additions & 0 deletions proto/tendermint/oracle/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ message Result {
string oracle_id = 1 [ (gogoproto.moretags) = "db:\"oracle_id\"" ];
int64 timestamp = 3 [ (gogoproto.moretags) = "db:\"timestamp\"" ];
string data = 4 [ (gogoproto.moretags) = "db:\"data\"" ];
}

message GossipVotes {
repeated GossipVote GossipVotes = 1;

Check failure on line 51 in proto/tendermint/oracle/types.proto

View workflow job for this annotation

GitHub Actions / lint

Field name "GossipVotes" should be lower_snake_case, such as "gossip_votes".
}
Loading

0 comments on commit 66e1120

Please sign in to comment.