feat: add shared witness encoding helpers#137
Conversation
|
The PR currently has no labels, but it appears the The title ( |
|
Clean extraction. The layering is clear (compress/decompress for raw bytes, encode/decode for the full versioned string), error types are typed, and the rpc_client.rs migration is straightforward. Two things before merge — see inline comments:
|
|
LGTM. Previous feedback addressed — |
|
Clean extraction — error types, tests, and the rpc_client migration all look good. Previous nits (consistent One concern: |
Summary
Add shared witness encoding helpers to
stateless-commonand switchRpcClientwitness decoding to use the shared implementation.What Changed
stateless-common::witness_encodingfor the shared witness RPC wire formatfetch_witness_rawdecode path inrpc_client.rsto call the shared decoderv0:test stub inrpc_client.rswith the shared version prefix constantNotes
v0:base64(zstd(level=9, bincode-legacy((SaltWitness, MptWitness))))rpc_client.rsrequest flow and retry behavior are unchangedValidation
cargo check -p stateless-commoncargo test -p stateless-common witness_encoding