Skip to content

Commit

Permalink
Merge pull request #21 from ledgerwatch/stat_changes23
Browse files Browse the repository at this point in the history
Generate State changes from .proto
  • Loading branch information
AskAlexSharov committed Aug 7, 2021
2 parents 8a77760 + 2175a70 commit 565a19f
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 70 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ jobs:
run: choco upgrade mingw cmake -y --no-progress
- run: go test ./...


1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.16
require (
github.com/VictoriaMetrics/metrics v1.17.3
github.com/c2h5oh/datasize v0.0.0-20200825124411-48ed595a09d2
github.com/go-stack/stack v1.8.0
github.com/golang/protobuf v1.5.2
github.com/google/btree v1.0.1
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
Expand Down
181 changes: 132 additions & 49 deletions gointerfaces/remote/kv.pb.go

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

36 changes: 18 additions & 18 deletions gointerfaces/remote/kv_grpc.pb.go

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

10 changes: 8 additions & 2 deletions interfaces/remote/kv.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ service KV {
// Tx exposes read-only transactions for the key-value store
rpc Tx(stream Cursor) returns (stream Pair);

rpc ReceiveStateChanges(google.protobuf.Empty) returns (stream StateChange);
rpc StateChanges(StateChangeRequest) returns (stream StateChange);
}

enum Op {
Expand Down Expand Up @@ -85,4 +85,10 @@ message StateChange {
uint64 blockHeight = 2;
types.H256 blockHash = 3;
repeated AccountChange changes = 4;
}
repeated bytes txs = 5;
}

message StateChangeRequest {
bool withStorage = 1;
bool withTransactions = 2;
}

0 comments on commit 565a19f

Please sign in to comment.