-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data Module Proof of Concept Init (#124)
* Add basic proto files * Protogen * Revert go.mod * Fix go.mod * Fix lint * Add version * Update Makefile * Switch to third_party proto folder * Ignore .idea * update docs
- Loading branch information
Showing
25 changed files
with
3,986 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Protobuf | ||
# Protobuf runs buf (https://buf.build/) lint and check-breakage | ||
# This workflow is only run when a .proto file has been changed | ||
on: | ||
pull_request: | ||
paths: | ||
- "**.proto" | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: lint | ||
run: make proto-lint-docker | ||
breakage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: check-breakage | ||
run: make proto-check-breaking-docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,4 +177,7 @@ tags | |
# vscode | ||
.vscode | ||
|
||
# goland | ||
.idea | ||
|
||
build/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: v1beta1 | ||
build: | ||
roots: | ||
- proto | ||
- third_party/proto | ||
lint: | ||
use: | ||
- DEFAULT | ||
- COMMENTS | ||
except: | ||
- SERVICE_SUFFIX | ||
ignore: | ||
- cosmos | ||
- gogoproto | ||
breaking: | ||
use: | ||
- FILE | ||
ignore: | ||
- cosmos | ||
- gogoproto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
syntax = "proto3"; | ||
|
||
package regen.data.v1alpha1; | ||
|
||
option go_package = "github.com/regen-network/regen-ledger/x/data"; | ||
|
||
// EventAnchorData is an event emitted when data is anchored on-chain. | ||
message EventAnchorData { | ||
|
||
// cid is a Content Identifier for the data corresponding to the IPFS CID | ||
// specification: https://github.com/multiformats/cid. | ||
bytes cid = 1; | ||
} | ||
|
||
// EventAnchorData is an event emitted when data is signed on-chain. | ||
message EventSignData { | ||
|
||
// cid is a Content Identifier for the data corresponding to the IPFS CID | ||
// specification: https://github.com/multiformats/cid. | ||
bytes cid = 1; | ||
|
||
// signers are the addresses of the accounts which have signed the data. | ||
repeated string signers = 2; | ||
} | ||
|
||
// EventAnchorData is an event emitted when data is stored on-chain. | ||
message EventStoreData { | ||
|
||
// cid is a Content Identifier for the data corresponding to the IPFS CID | ||
// specification: https://github.com/multiformats/cid. | ||
bytes cid = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
|
||
package regen.data.v1alpha1; | ||
|
||
option go_package = "github.com/regen-network/regen-ledger/x/data"; | ||
|
||
// TODO | ||
message GenesisState { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
syntax = "proto3"; | ||
|
||
package regen.data.v1alpha1; | ||
|
||
option go_package = "github.com/regen-network/regen-ledger/x/data"; | ||
|
||
// Signers is an internal type for storing a list of signers in state. | ||
message Signers { | ||
|
||
// signers are the addresses of the accounts which have signed the data. | ||
repeated string signers = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
syntax = "proto3"; | ||
|
||
package regen.data.v1alpha1; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
option go_package = "github.com/regen-network/regen-ledger/x/data"; | ||
|
||
// Query is the regen.data.v1alpha1 Query service | ||
service Query { | ||
|
||
// Data queries data based on its CID. | ||
rpc Data(QueryDataRequest) returns (QueryDataResponse); | ||
} | ||
|
||
// QueryDataRequest is the Query/Data request type. | ||
message QueryDataRequest { | ||
|
||
// cid is a Content Identifier for the data corresponding to the IPFS CID | ||
// specification: https://github.com/multiformats/cid. | ||
bytes cid = 1; | ||
} | ||
|
||
// QueryDataRequest is the Query/Data response type. | ||
message QueryDataResponse { | ||
|
||
// timestamp is the timestamp of the block at which the data was anchored. | ||
google.protobuf.Timestamp timestamp = 1; | ||
|
||
// signers are the addresses of the accounts which have signed the data. | ||
repeated string signers = 2; | ||
|
||
// content is the content of the data, if it was stored on-chain. | ||
bytes content = 3; | ||
} |
Oops, something went wrong.