Skip to content

Commit

Permalink
Merge branch 'chain/sentinel' into chain/sentinel
Browse files Browse the repository at this point in the history
  • Loading branch information
MathNodes authored Aug 18, 2023
2 parents 2751cc9 + cd06647 commit 3aacf50
Show file tree
Hide file tree
Showing 44 changed files with 1,069 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/tg-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: tg-notify
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Update status
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: | #https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context
${{ github.actor }} created commit:
Commit message: ${{ github.event.head_commit.message }}
Repository: ${{ github.repository }}
Branch: ${{ github.ref_name }}
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
3 changes: 3 additions & 0 deletions configs/sentinel.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"include": true,
"branch": "v1.0.0",
"paths": ["proto/interchain_security/ccv"]
=======
"branch": "master",
"paths": ["proto/sentinel"]
}

}
43 changes: 43 additions & 0 deletions configs/sentinel2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"https://github.com/sentinel-official/hub.git": {
"include": true,
"branch": "master",
"paths": ["proto/sentinel"]
},
"https://github.com/cosmos/cosmos-sdk.git": {
"include": true,
"branch": "v0.45.4",
"paths": ["proto/cosmos"]
},
"https://github.com/tendermint/tendermint.git": {
"include": true,
"branch": "v0.34.19",
"paths": ["proto/tendermint"]
},
"https://github.com/cosmos/ibc-go": {
"include": true,
"branch": "v3.0.0",
"paths": ["proto/ibc", "third_party/proto/google"]
},
"https://github.com/cosmos/cosmos-proto.git": {
"include": true,
"branch": "main",
"paths": ["proto/cosmos_proto"]
},
"https://github.com/cosmos/gogoproto.git": {
"include": true,
"branch": "main",
"paths": ["gogoproto"]
},
"https://github.com/confio/ics23.git": {
"include": true,
"branch": "master",
"paths": ["proto/cosmos/ics23/v1/proofs.proto"]
},
"https://github.com/cosmos/interchain-security.git": {
"include": true,
"branch": "v1.0.0",
"paths": ["proto/interchain_security/ccv"]
}

}
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ build-backend = "hatchling.build"

[project]
name = "sentinel_protobuf"

version = "0.3.1"

description = "This package contains a compiled python version of all sentinel protobuf files with their dependencies"
authors = [
{ name = "freQniK", email = "freQniK@mathnodes.com" },
Expand Down
4 changes: 4 additions & 0 deletions src/sentinel_protobuf/sentinel/deposit/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
syntax = "proto3";
package sentinel.deposit.v1;

option go_package = "github.com/sentinel-official/hub/x/deposit/types";
4 changes: 4 additions & 0 deletions src/sentinel_protobuf/sentinel/deposit/v1/msg.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
syntax = "proto3";
package sentinel.deposit.v1;

option go_package = "github.com/sentinel-official/hub/x/deposit/types";
4 changes: 4 additions & 0 deletions src/sentinel_protobuf/sentinel/deposit/v1/params.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
syntax = "proto3";
package sentinel.deposit.v1;

option go_package = "github.com/sentinel-official/hub/x/deposit/types";
25 changes: 25 additions & 0 deletions src/sentinel_protobuf/sentinel/node/v1/events.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";
package sentinel.node.v1;

import "gogoproto/gogo.proto";
import "sentinel/types/v1/status.proto";

option go_package = "github.com/sentinel-official/hub/x/node/types";
option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

message EventRegister {
string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
string provider = 2 [ (gogoproto.moretags) = "yaml:\"provider\"" ];
}

message EventUpdate {
string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
string provider = 2 [ (gogoproto.moretags) = "yaml:\"provider\"" ];
}

message EventSetStatus {
string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
sentinel.types.v1.Status status = 2
[ (gogoproto.moretags) = "yaml:\"status\"" ];
}
17 changes: 17 additions & 0 deletions src/sentinel_protobuf/sentinel/node/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";
package sentinel.node.v1;

option go_package = "github.com/sentinel-official/hub/x/node/types";

import "gogoproto/gogo.proto";
import "sentinel/node/v1/node.proto";
import "sentinel/node/v1/params.proto";

option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

message GenesisState {
repeated Node nodes = 1
[ (gogoproto.jsontag) = "_,omitempty", (gogoproto.nullable) = false ];
Params params = 2 [ (gogoproto.nullable) = false ];
}
55 changes: 55 additions & 0 deletions src/sentinel_protobuf/sentinel/node/v1/msg.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
syntax = "proto3";
package sentinel.node.v1;

option go_package = "github.com/sentinel-official/hub/x/node/types";

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "sentinel/types/v1/status.proto";

option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

// MsgRegisterRequest defines the SDK message for registering a node
message MsgRegisterRequest {
string from = 1;
string provider = 2;
repeated cosmos.base.v1beta1.Coin price = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
string remote_url = 4 [ (gogoproto.customname) = "RemoteURL" ];
}

// MsgUpdateRequest defines the SDK message for updating a node
message MsgUpdateRequest {
string from = 1;
string provider = 2;
repeated cosmos.base.v1beta1.Coin price = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
string remote_url = 4 [ (gogoproto.customname) = "RemoteURL" ];
}

// MsgSetStatusRequest defines the SDK message for modifying the status of a
// node
message MsgSetStatusRequest {
string from = 1;
sentinel.types.v1.Status status = 2;
}

// MsgRegisterResponse defines the response of message MsgRegisterRequest
message MsgRegisterResponse {}

// MsgUpdateResponse defines the response of message MsgUpdateRequest
message MsgUpdateResponse {}

// MsgSetStatusResponse defines the response of message MsgSetStatusRequest
message MsgSetStatusResponse {}

service MsgService {
rpc MsgRegister(MsgRegisterRequest) returns (MsgRegisterResponse);
rpc MsgUpdate(MsgUpdateRequest) returns (MsgUpdateResponse);
rpc MsgSetStatus(MsgSetStatusRequest) returns (MsgSetStatusResponse);
}
3 changes: 3 additions & 0 deletions src/sentinel_protobuf/sentinel/node/v1/node.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
syntax = "proto3";
package sentinel.node.v1;


import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "sentinel/types/v1/status.proto";


option go_package = "github.com/sentinel-official/hub/x/node/legacy/v1/types";

option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

Expand Down
29 changes: 29 additions & 0 deletions src/sentinel_protobuf/sentinel/node/v1/params.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
syntax = "proto3";
package sentinel.node.v1;

option go_package = "github.com/sentinel-official/hub/x/node/types";

import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";

option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

message Params {
cosmos.base.v1beta1.Coin deposit = 1 [ (gogoproto.nullable) = false ];
google.protobuf.Duration inactive_duration = 2
[ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ];
repeated cosmos.base.v1beta1.Coin max_price = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin min_price = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
string staking_share = 5 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}
64 changes: 64 additions & 0 deletions src/sentinel_protobuf/sentinel/node/v1/querier.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
syntax = "proto3";
package sentinel.node.v1;

option go_package = "github.com/sentinel-official/hub/x/node/types";

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "sentinel/types/v1/status.proto";
import "sentinel/node/v1/node.proto";
import "sentinel/node/v1/params.proto";

option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

message QueryNodesRequest {
sentinel.types.v1.Status status = 1;
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

message QueryNodesForProviderRequest {
string address = 1;
sentinel.types.v1.Status status = 2;
cosmos.base.query.v1beta1.PageRequest pagination = 3;
}

message QueryNodeRequest { string address = 1; }

message QueryParamsRequest {}

message QueryNodesResponse {
repeated Node nodes = 1 [ (gogoproto.nullable) = false ];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

message QueryNodesForProviderResponse {
repeated Node nodes = 1 [ (gogoproto.nullable) = false ];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

message QueryNodeResponse { Node node = 1 [ (gogoproto.nullable) = false ]; }

message QueryParamsResponse {
Params params = 1 [ (gogoproto.nullable) = false ];
}

service QueryService {
rpc QueryNodes(QueryNodesRequest) returns (QueryNodesResponse) {
option (google.api.http).get = "/sentinel/nodes";
}

rpc QueryNodesForProvider(QueryNodesForProviderRequest)
returns (QueryNodesForProviderResponse) {
option (google.api.http).get = "/sentinel/providers/{address}/nodes";
}

rpc QueryNode(QueryNodeRequest) returns (QueryNodeResponse) {
option (google.api.http).get = "/sentinel/nodes/{address}";
}

rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/sentinel/modules/node/params";
}
}
33 changes: 33 additions & 0 deletions src/sentinel_protobuf/sentinel/plan/v1/events.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
syntax = "proto3";
package sentinel.plan.v1;

import "gogoproto/gogo.proto";
import "sentinel/types/v1/status.proto";

option go_package = "github.com/sentinel-official/hub/x/plan/types";
option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

message EventAdd {
uint64 id = 1 [ (gogoproto.moretags) = "yaml:\"id\"" ];
string provider = 2 [ (gogoproto.moretags) = "yaml:\"provider\"" ];
}

message EventSetStatus {
uint64 id = 1 [ (gogoproto.moretags) = "yaml:\"id\"" ];
string provider = 2 [ (gogoproto.moretags) = "yaml:\"provider\"" ];
sentinel.types.v1.Status status = 3
[ (gogoproto.moretags) = "yaml:\"status\"" ];
}

message EventAddNode {
uint64 id = 1 [ (gogoproto.moretags) = "yaml:\"id\"" ];
string node = 2 [ (gogoproto.moretags) = "yaml:\"node\"" ];
string provider = 3 [ (gogoproto.moretags) = "yaml:\"provider\"" ];
}

message EventRemoveNode {
uint64 id = 1 [ (gogoproto.moretags) = "yaml:\"id\"" ];
string node = 2 [ (gogoproto.moretags) = "yaml:\"node\"" ];
string provider = 3 [ (gogoproto.moretags) = "yaml:\"provider\"" ];
}
16 changes: 16 additions & 0 deletions src/sentinel_protobuf/sentinel/plan/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";
package sentinel.plan.v1;

option go_package = "github.com/sentinel-official/hub/x/plan/types";

import "gogoproto/gogo.proto";
import "sentinel/plan/v1/plan.proto";

option (gogoproto.equal_all) = false;
option (gogoproto.goproto_getters_all) = false;

message GenesisPlan {
Plan plan = 1
[ (gogoproto.jsontag) = "_,omitempty", (gogoproto.nullable) = false ];
repeated string nodes = 2;
}
Loading

0 comments on commit 3aacf50

Please sign in to comment.