Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

feat: adding testable docker behavior #109

Merged
merged 9 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
!crates
!tests
!Cargo.*
!tools/init.sh

!LICENSE
103 changes: 28 additions & 75 deletions Cargo.lock

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

55 changes: 36 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,52 @@ members = [
]

[workspace.dependencies]

topos-core = { path = "./crates/topos-core", default-features = false }

async-trait = { version = "0.1", default-features = false }
async-stream = { version = "0.3", default-features = false }
futures = { version = "0.3" }
libp2p = { version = "0.49", default-features = false, features = ["noise"]}
clap = { version = "4.0", features = ["derive", "env"] }
hyper = { version = "0.14", features = ["full"] }
rand = { version = "0.8", default-features = false }
rand_core = { version = "0.6", default-features = false }
rand_distr = { version = "0.4", default-features = false }
rstest = { version = "0.16", default-features = false }
serde = { version = "1.0", default-features = false }
thiserror = { version = "1.0", default-features = false }

# Async & Tokio related
async-stream = { version = "0.3", default-features = false }
async-trait = { version = "0.1", default-features = false }
futures = { version = "0.3" }
tokio = { version = "1.24", default-features = false }
tokio-stream = { version = "0.1", default-features = false }
tonic = { version = "0.8", default-features = false }
tower = "0.4"

# Blockchain
ethereum-types = { version = "0.12.1"}
secp256k1 = {version = "0.21.3", features = ["recovery"]}
web3 = { version = "0.18", features = ["signing"]}

# Log, Tracing & telemetry
opentelemetry = { version = "0.18", features = ["rt-tokio", "metrics"] }
opentelemetry-otlp = { version = " 0.11", features = ["tonic", "metrics"] }
pretty_env_logger = { version = "0.4", default-features = false }
tracing = { version = "0.1", default-features = false }
tracing-attributes = "0.1"
tracing-opentelemetry = "0.18"
tracing-subscriber = { version = "0.3", default-features = false }
ethereum-types = { version = "0.12.1"}
serde_json = { version = "1.0", default-features = false }

# gRPC
prost = {version = "0.11"}
tonic = { version = "0.8", default-features = false }

# P2P related
libp2p = { version = "0.49", default-features = false, features = ["noise"]}

# Serialization & Deserialization
bincode = { version = "1.3", default-features = false }
byteorder = { version = "1.4", default-features = false }
uuid = { version = "1.1.2", default-features = false, features = ["v4"] }
bytes = { version = "1.3", default-features = false }
hyper = { version = "0.14", features = ["full"] }
hex = { version = "0.4", default-features = false }
web3 = { version = "0.18", features = ["signing"]}
pretty_env_logger = { version = "0.4", default-features = false }
clap = { version = "4.0", features = ["derive", "env"] }
bincode = { version = "1.3", default-features = false }
prost = {version = "0.11"}
secp256k1 = {version = "0.21.3", features = ["recovery"]}
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false }
thiserror = { version = "1.0", default-features = false }
uuid = { version = "1.1.2", default-features = false, features = ["v4"] }

# Tests
rstest = { version = "0.16", default-features = false }
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ RUN adduser \
WORKDIR /usr/src/app

COPY --from=build /usr/src/app/target/release/topos .
COPY tools/init.sh ./init.sh

RUN apt-get update && apt-get install jq -y

USER topos:topos

ENTRYPOINT ["./topos"]
RUN mkdir /tmp/shared

ENTRYPOINT ["./init.sh"]
8 changes: 4 additions & 4 deletions crates/topos-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ tonic = { workspace = true, default-features = false, features = [
"transport",
] }
ethereum-types.workspace = true
uuid.workspace = true
hex.workspace = true
prost.workspace = true
uuid.workspace = true


[build-dependencies]
Expand All @@ -25,8 +25,8 @@ tonic-build = { version = "0.8", default-features = false, features = [
] }

[dev-dependencies]
tokio.workspace = true
async-stream.workspace = true
futures.workspace = true
tokio-stream.workspace = true
async-stream.workspace = true
tower = "0.4.13"
tokio.workspace = true
tower.workspace = true
6 changes: 6 additions & 0 deletions crates/topos-api/proto/topos/tce/v1/console.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "topos/shared/v1/uuid.proto";

service ConsoleService {
rpc PushPeerList(PushPeerListRequest) returns (PushPeerListResponse);
rpc Status(StatusRequest) returns (StatusResponse);
}

message PushPeerListRequest {
Expand All @@ -14,3 +15,8 @@ message PushPeerListRequest {
}

message PushPeerListResponse {}

message StatusRequest {}
message StatusResponse {
bool has_active_sample = 1;
}
Binary file modified crates/topos-api/src/generated/topos.bin
Binary file not shown.
Loading