Skip to content

Conversation

@omar-hgraph
Copy link
Contributor

HIP-1190: Multi-Node Transaction Signing UI & Testing

Overview

Complete UI implementation and testing infrastructure for HIP-1190 multi-node transaction signing with automatic failover, execution strategies, and comprehensive metrics.

Key Features

  • UI Configuration: Dynamic node count selector (1, 3, 5, 7, 10 nodes)
  • Dual Integration: Works with both V1 (DAppConnector) and V2 (Reown AppKit)
  • Execution Strategies:
    • firstSuccess: Production mode (stop on first success)
    • allNodes: Testing mode (try all nodes, gather complete metrics)
  • Rich Metrics: Signing duration, execution duration, per-node performance
  • Automatic Failover: Sequential node attempts with detailed attempt tracking
  • Feature Parity: V1 and V2 implementations fully aligned

Implementation Details

HIP-1190 Method Support (commit c8fb045)

  • Added signTransactions method to both V1 and V2 hooks
  • Implemented signature extraction per node
  • Enhanced result display with per-node signature details

UI Components (commit f8bd79e)

  • Added node count parameter with dropdown (1-10 nodes)
  • Enhanced result formatting with summary + expandable details
  • Added TransactionProgressModal component for future progress tracking
  • Integrated HIP-1190 into MethodExecutor component

Execution Engine (commit acdd94c)

  • Added executionStrategy parameter with UI selection
  • Implemented sequential node attempt logic with early exit (firstSuccess) or complete attempts (allNodes)
  • Extract actual Hedera transaction IDs per node
  • Return nodeIndexUsed indicating which node succeeded
  • Comprehensive per-node attempt details (success/failure, duration, error messages)

Metrics & Tracking (commit 02da0c6)

  • Extract all signatures with public key prefix and hex signature
  • Track nodeId and transactionId for each attempt
  • Report signing duration (wallet response time)
  • Report total execution duration (end-to-end)
  • Per-node execution duration tracking
  • Achieve full feature parity between V1 and V2 implementations

Developer Experience (commits 3f54d87, 18979e7, 9022da8)

  • Local dependency linking for active development
  • Pre-build scripts ensure wallet-connect is always up-to-date
  • Null safety improvements preventing runtime errors
  • Clean provider configuration

Testing Capabilities

  • firstSuccess (Production): Fast failover, stops on first successful execution
  • allNodes (Testing): Comprehensive testing, gathers metrics from all nodes
  • Detailed per-node results for debugging and analysis
  • Signature validation and extraction

Implement hedera_signTransactions method execution in both
DAppConnector (V1) and Reown AppKit (V2) integration paths.

Changes:
- Fix HederaSignTransactionsParams interface (recipientId → to)
- Add AccountId import for parameter conversion
- Extract and display unique signatures for each node
- Format result with per-node signature details
Add HIP-1190 method configuration with dynamic node count selector
(1-10 nodes). Enhance result display to show per-node signatures.

Changes:
- Add nodeCount parameter with options: 1, 3, 5 (default), 7, 10
- Format multi-node results with summary and expandable details
- Add TransactionProgressModal component (not yet wired)
Add defensive null checks to prevent runtime errors when
optional parameters are undefined.

Changes:
- toEvmAddress: return empty string if accountId is null/undefined
- personal_sign: use optional chaining for message.startsWith check
Remove logger configuration from V2 AppKit setup and add onProgress
parameter to hook calls for future progress tracking support.

Changes:
- Remove redundant logger options from provider and AppKit configs
- Add undefined onProgress parameter to V1 and V2 method hooks
- Minor formatting cleanup
Switch to file link for active HIP-1190 development. Add pre-build
scripts to ensure wallet-connect is built before dev/build/test.

Changes:
- Update dependency: @hashgraph/hedera-wallet-connect 2.0.4-canary → file:../
- Add predev, prebuild, pretest scripts to auto-build wallet-connect
…strategies

- Implement complete PHASE 2: execution with automatic failover
- Add executionStrategy parameter: 'firstSuccess' (production) vs 'allNodes' (testing)
- Extract and report all signatures with public keys
- Add performance metrics: signingDuration, totalDuration, per-node duration
- Return actual Hedera transaction IDs and nodeIndexUsed
- Include comprehensive per-node attempt details with success/failure status
- Update MethodExecutor UI with execution strategy selection dropdown
…feature parity

- Add allSignatures extraction with publicKeyPrefix and signature hex reporting
- Implement per-node ID tracking in execution attempts array
- Add nodeId and transactionId fields to each attempt record
- Update both execution strategy return statements with allSignatures
- Add executionStrategy parameter to type definitions
- Achieve full feature parity between V1 and V2
- Add missing 'error' property to attempt type definition in MethodExecutor
- Remove explicit type annotation for protoTx parameter to let TypeScript infer from ISignedTransaction
- Fixes compatibility with Hedera SDK's ISignedTransaction and ISignatureMap types

Resolves TypeScript errors:
- TS2339: Property 'error' does not exist on attempt type
- TS2345: Type incompatibility between custom type and ISignedTransaction
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