Skip to content

Commit 3ba369e

Browse files
authored
@peter/add grpc (#377)
* add grpc for uploading segments * add reflection * add upload segments grpc function * format code * fix lint * fix test
1 parent 28654ef commit 3ba369e

File tree

19 files changed

+730
-188
lines changed

19 files changed

+730
-188
lines changed

.github/actions/setup-rust/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Setup Rust (cache & toolchain)
22
runs:
33
using: composite
44
steps:
5+
- name: Install protoc compiler
6+
shell: bash
7+
run: |
8+
sudo apt-get update
9+
sudo apt-get install -y protobuf-compiler
10+
511
- name: Install toolchain 1.78.0
612
uses: actions-rs/toolchain@v1
713
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ tests/tmp/**
77
.vscode/*.json
88
/0g-storage-contracts-dev
99
/run/.env
10+
11+
**.bin

Cargo.lock

Lines changed: 192 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/rpc/Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[package]
22
name = "rpc"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
5+
build = "build.rs"
56

67
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
78

@@ -28,3 +29,12 @@ merkle_tree = { path = "../../common/merkle_tree"}
2829
futures-channel = "^0.3"
2930
metrics = { workspace = true }
3031
parking_lot = "0.12.3"
32+
tonic = { version = "0.9.2", features = ["transport"] }
33+
prost = "0.11.9"
34+
prost-types = "0.11.9"
35+
tonic-reflection = "0.9.2"
36+
ethereum-types = "0.14"
37+
38+
[build-dependencies]
39+
tonic-build = "0.9.2"
40+
prost-build = "0.11.9"

0 commit comments

Comments
 (0)