Uh oh!
There was an error while loading. Please reload this page.
chore: depend on sentrix-proto crate, drop vendored proto - #32
Conversation
Replace the vendored proto/sentrix.proto + the build.rs tonic-build
invocation with a dependency on the standalone `sentrix-proto` crate
that the chain repo (sentrix-labs/sentrix) publishes to crates.io as
the single source of truth for the schema.
This is the Cosmos `ibc-proto` pattern: one repo owns the .proto, every
consumer pulls the same generated types from crates.io. Eliminates the
schema drift that had already started across the four consumers.
The `pb` module stays as a thin re-export of `sentrix_proto`, so
existing consumers that path-into `pb::*` don't churn:
pub mod pb { pub use sentrix_proto::*; }
Drops `tonic-prost` + `prost` from `[dependencies]` and `tonic-prost-build`
+ `prost-build` from `[build-dependencies]` — they're transitive through
`sentrix-proto` now. `tonic` stays for the codegen macros + transport.
The SSR-vs-WASM build-server gating that build.rs previously handled is
no longer relevant — `sentrix-proto` always builds with `build_server =
true` and tonic's `transport` feature stays gated behind the SSR
feature on this crate.
Tested locally: cargo build / test --doc / clippy -- -D warnings all clean.📝 WalkthroughWalkthroughThis change removes local protobuf codegen and the proto contract: Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
v0.1.0 of sentrix-proto pulled `tonic/transport` unconditionally, which propagates a tokio-net / mio dep that doesn't compile for the wasm32-unknown-unknown target — the leptos build emits both wasm (browser bundle) and native (SSR) targets, so the wasm leg was failing. v0.1.1 (sentrix-labs/sentrix#670) makes `transport` an opt-in feature. Disable it here so the wasm target compiles. The SSR binary uses tonic without the hyper Channel anyway; the browser uses tonic-web-wasm-client. Tested locally: - `cargo check` (native) clean - `cargo check --target wasm32-unknown-unknown` clean
Uh oh!
There was an error while loading. Please reload this page.
) The proto schema was extracted into a standalone `sentrix-proto` crate on crates.io (chain repo PR #667) and this app migrated to consume it in PR #32 — local `proto/` + `build.rs` + tonic codegen are gone. The Architecture diagram still showed: proto/sentrix.proto → build.rs / tonic-build → src/grpc/pb Updated to reflect the current path: sentrix-proto crate → re-exported as `pb` in src/grpc/mod.rs Includes the wasm-specific `default-features = false` note since the transport feature gate is the whole reason that migration shipped. Co-authored-by: satyakwok <satyakwok@users.noreply.github.com>
Why
The proto schema lived in four places (chain server, sdk-rs, sentrix-grpc-wasm, this repo). Drift had already started. The chain repo now ships a sibling `sentrix-proto` crate (sentrix-labs/sentrix#667 merged + published v0.1.0 to crates.io 2026-05-13) as the single source of truth.
This PR migrates explorer-v2 to consume `sentrix-proto` from crates.io. Same pattern landing in parallel for sdk-rs (Sentriscloud/sdk-rs#23) and sentrix-grpc-wasm (Sentriscloud/sentrix-grpc-wasm#17).
What
Net diff: -308 / +49 lines.
Test plan
Summary by CodeRabbit