You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DAPI responses are not compressed (rs-dapi defers to Envoy, Envoy has no compressor) #5576
DAPI responses, including proofs, are currently sent uncompressed. Neither rs-dapi nor the Envoy gateway compresses them, but the code says Envoy does:
packages/rs-dapi/src/clients/drive_client.rs:64: "Compression (gzip) is intentionally DISABLED at rs-dapi level; Envoy handles it."
packages/dashmate/templates/platform/gateway/envoy.yaml.dot: the HTTP filter chain is cors → grpc_web → ratelimit → router, with no envoy.filters.http.compressor.
tonic's gzip/zstd features and send_compressed / accept_compressed are not enabled in rs-dapi, dapi-grpc, or rs-dapi-client.
Defacto raised this in Slack. I measured how much it would actually save.
Measurement
I extracted the raw grovedb_proof bytes from the recorded SDK test vectors (packages/rs-sdk/tests/vectors, at 371a3b3): 162 proofs, 116 unique, all ≤ 4.4 KB. Each one was compressed on its own, the way gRPC compresses messages.
gzip -6, zstd -3 and brotli -q 5 land within a couple of points of each other, so the codec choice matters little. The savings come from embedded payloads (contract schemas, document bodies, vote-poll keys). The 32-byte Merk hashes barely compress.
Caveats: these vectors come from small test networks. Mainnet trees are deeper, so hash-heavy proofs will compress somewhat less, while large document queries will likely compress more. Response metadata and the 96-byte signature were not included.
Proposal
Add an Envoy compressor filter (gzip, and zstd/brotli if wanted) with a min_content_length threshold of roughly 1 KB, so small hash-only responses skip it. This also covers grpc-web/browser clients. Alternatively, enable tonic compression in rs-dapi.
Make sure clients advertise grpc-accept-encoding / Accept-Encoding: rs-dapi-client (native and tonic-web-wasm-client) and js-dapi-client.
Fix or remove the misleading comment in drive_client.rs.
Check evonode CPU cost under load before turning it on by default.
Superseded by #5577, which implements this directly (rs-dapi gzip responses, native client support, Envoy grpc-web compressor) with mainnet measurements in the description.
🤖 Posted autonomously by Claude on behalf of pasta.
Activity
PastaPastaPasta commentedon Oct 25, 2026
Superseded by #5577, which implements this directly (rs-dapi gzip responses, native client support, Envoy grpc-web compressor) with mainnet measurements in the description.
🤖 Posted autonomously by Claude on behalf of pasta.