Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(x/data): update query service and commands #1156

Merged
merged 24 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
daf7e73
refactor(x/data): descriptive api naming and endpoints
ryanchristo Jun 6, 2022
8a7c0a0
refactor(x/data): descriptive api naming and endpoints
ryanchristo Jun 7, 2022
e2fc9c8
refactor(x/data): descriptive api naming and endpoints
ryanchristo Jun 7, 2022
c36e0d0
refactor(x/data): descriptive api naming and endpoints
ryanchristo Jun 10, 2022
9aebb80
Merge branch 'master' into ryan/714-data-api-audit
ryanchristo Jun 10, 2022
a4e0c8b
refactor(x/data): descriptive api naming and endpoints
ryanchristo Jun 10, 2022
8a49849
refactor(x/data): descriptive api naming and endpoints
ryanchristo Jun 10, 2022
3803d0f
revise anchor entry and attestor entry
ryanchristo Jun 10, 2022
7dbb780
fix proto lint and add timestamp check
ryanchristo Jun 10, 2022
7703f42
Merge branch 'master' into ryan/714-data-api-audit
ryanchristo Jun 10, 2022
01031be
clean up proto comment and imports
ryanchristo Jun 10, 2022
234b138
revise naming and integration tests
ryanchristo Jun 12, 2022
8747bf6
revise comments and server tests
ryanchristo Jun 12, 2022
1027e66
revise comments and server tests
ryanchristo Jun 12, 2022
ff0a39c
revise comments and server tests
ryanchristo Jun 12, 2022
5a06f8f
add missing query commands and revise comments
ryanchristo Jun 12, 2022
b229784
separate files for each query method
ryanchristo Jun 12, 2022
9ffd291
add unit tests and clean up integration tests
ryanchristo Jun 13, 2022
52b9264
consistent naming and clean up
ryanchristo Jun 13, 2022
0be9f50
update specification and clean up
ryanchristo Jun 13, 2022
64dbf09
Apply suggestions from code review
ryanchristo Jun 14, 2022
be6dc3e
close iterators and add pagination flags
ryanchristo Jun 14, 2022
65af1d0
Merge branch 'master' into ryan/714-data-api-audit
ryanchristo Jun 14, 2022
eaa2fcd
Merge branch 'master' into ryan/714-data-api-audit
ryanchristo Jun 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,398 changes: 3,774 additions & 4,624 deletions api/regen/data/v1/query.pulsar.go

Large diffs are not rendered by default.

410 changes: 170 additions & 240 deletions api/regen/data/v1/query_grpc.pb.go

Large diffs are not rendered by default.

316 changes: 195 additions & 121 deletions api/regen/data/v1/tx.pulsar.go

Large diffs are not rendered by default.

1,863 changes: 280 additions & 1,583 deletions api/regen/data/v1/types.pulsar.go

Large diffs are not rendered by default.

386 changes: 217 additions & 169 deletions proto/regen/data/v1/query.proto

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions proto/regen/data/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ message MsgAnchorResponse {
// iri is the IRI of the data that was anchored.
string iri = 1;

// timestamp is the timestamp at which the data was anchored.
// timestamp is the time at which the data was anchored.
google.protobuf.Timestamp timestamp = 2;
}

Expand All @@ -87,10 +87,13 @@ message MsgAttest {

// MsgAttestResponse is the Msg/Attest response type.
message MsgAttestResponse {
// new_entries are the new attestor entries including the attestor, the IRI,
// and the timestamp. If the attestor attests to the same piece of data, the
// entry will not be updated and not included in the response.
repeated AttestorEntry new_entries = 1;
// iris are the IRIs of the data that was attested to. If the attestor attests
// to the same piece of data, the previous attestation will not be updated and
// the IRI will not be included in this list.
repeated string iris = 1;

// timestamp is the time at which any new attestations were made.
google.protobuf.Timestamp timestamp = 2;
}

// MsgDefineResolver is the Msg/DefineResolver request type.
Expand Down
36 changes: 1 addition & 35 deletions proto/regen/data/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ syntax = "proto3";

package regen.data.v1;

import "google/protobuf/timestamp.proto";

option go_package = "github.com/regen-network/regen-ledger/x/data";

// ContentHash specifies a hash-based content identifier for a piece of data.
Expand Down Expand Up @@ -123,12 +121,6 @@ enum RawMediaType {

// OGG
RAW_MEDIA_TYPE_OGG = 35;

// geospatial raster formats
// TODO

// geospatial vector formats
// TODO
}

// GraphCanonicalizationAlgorithm is the graph canonicalization algorithm
Expand All @@ -142,36 +134,10 @@ enum GraphCanonicalizationAlgorithm {

// GraphMerkleTree is the graph merkle tree type used for hashing, if any
enum GraphMerkleTree {
// no merkle tree
// unspecified and valid
GRAPH_MERKLE_TREE_NONE_UNSPECIFIED = 0;
}

// ContentEntry describes data referenced and possibly stored on chain
message ContentEntry {
// content_hash is the content hash of the anchored data.
ContentHash content_hash = 1;

// iri is the IRI of the anchored data.
string iri = 2;

// timestamp is the timestamp of the anchored data.
google.protobuf.Timestamp timestamp = 3;
}

// AttestorEntry is an attestor entry including the attestor, the IRI, and the
// timestamp.
message AttestorEntry {
// iri is the IRI of the data attested to.
string iri = 1;

// attestor is the address of the account that has attested to the veracity of
// the data.
string attestor = 2;

// timestamp is the timestamp at which the data was attested to.
google.protobuf.Timestamp timestamp = 3;
}

// ContentHashes contains list of content ContentHash.
message ContentHashes {
// data is a list of content hashes which the resolver claims to serve.
Expand Down
Loading