Skip to content

Conversation

@dotslashapaar
Copy link

@dotslashapaar dotslashapaar commented Jan 16, 2026

Work in progress #120

Replace unmaintained bincode (RUSTSEC-2025-0141) with wincode across the
codebase. Implements feature flag wincode for safe rollout with byte-level
wire format compatibility.

Changes:

  • Add wincode_schema.rs (~1200 lines) with custom SchemaWrite/SchemaRead
    implementations for Solana transaction types
  • Implement ShortVec wrapper for compact-u16 length encoding (1-3 bytes)
  • Add manual VersionedMessageSchema handling bit-masked discriminator (0x80)
  • Feature-gate all serialization call sites in payload.rs, solana.rs,
    grpc_jet.rs, pubkey_challenger.rs, transaction_handler.rs, and gentx.rs
  • Add 19 wire compatibility tests verifying bincode/wincode equivalence
  • Add OneTimeAuthTokenSchema roundtrip test for comprehensive coverage

Wire format remains identical to bincode for backward compatibility with
existing clients. Feature disabled by default; enable with --features wincode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant