Description
Standardize transaction serialization to ensure deterministic proposal hashing.
Problem Statement
Different versions of the client library interpret JSON object ordering differently, leading to inconsistent transaction hashes for the same proposal. This prevents multi-sig signers from reaching consensus, as their calculated hashes never match.
Technical Requirements
- Requirement: Implement a canonical JSON serializer that sorts keys alphabetically.
- Requirement: Ensure that numbers and addresses are cast to standard types before serialization.
Implementation Guide
- Suggested Approach: Use a custom serializer module in
src/engine/serialization.rs that enforces alphabetical key sorting using serde.
- Branch Strategy:
git checkout -b fix/deterministic-hashes
- Affected Areas:
src/engine/serialization.rs
Acceptance Criteria
Definition of Done
Description
Standardize transaction serialization to ensure deterministic proposal hashing.
Problem Statement
Different versions of the client library interpret JSON object ordering differently, leading to inconsistent transaction hashes for the same proposal. This prevents multi-sig signers from reaching consensus, as their calculated hashes never match.
Technical Requirements
Implementation Guide
src/engine/serialization.rsthat enforces alphabetical key sorting usingserde.git checkout -b fix/deterministic-hashessrc/engine/serialization.rsAcceptance Criteria
serdeversions.Definition of Done