chore: depend on sentrix-proto crate, drop vendored proto#32
Merged
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
satyakwok
added a commit
that referenced
this pull request
May 13, 2026
) 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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