Skip to content

Enhance Multi-sig Transaction Serialization #151

Description

@grantfox-oss

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

  • Multiple test runs from different environments produce identical hashes for the same input.
  • Integration tests verify hash consistency across different serde versions.

Definition of Done

  • Code reviewed
  • CI/CD passed

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions