Skip to content

Conversation

@Bojan131
Copy link
Contributor

Fix: Add timeout protection to prevent infinite hangs in DKG client operations

Problem

Jenkins pipeline tests were hanging indefinitely during DKG operations, particularly affecting Neuroweb testnet. The issue was caused by missing timeout protection in core blockchain interaction methods, leading to infinite loops when network conditions were poor or nodes were unresponsive.

Root Cause

Several critical DKG client methods lacked proper timeout protection:

  • waitForEventFinality: No timeout protection, could hang indefinitely during block confirmations
  • executeContractFunction: No timeout protection, could hang indefinitely during contract execution
  • finalityStatus: Only had retry limits (25s max), no total timeout protection
  • getOperationResult: Only had retry limits (25s max), no total timeout protection

Solution

Added comprehensive timeout protection to prevent infinite hangs:

  • waitForEventFinality: Added 60-second timeout (using existing transactionFinalityMaxWaitTime config)
  • executeContractFunction: Added 5-minute total timeout
  • finalityStatus: Added 5-minute total timeout (in addition to existing retry limits)
  • getOperationResult: Added 5-minute total timeout (in addition to existing retry limits)

Impact

  • Prevents Jenkins pipeline timeouts and hanging jobs
  • Improves reliability across all blockchain networks (Base, Gnosis, Neuroweb)
  • Maintains existing functionality while adding safety protection
  • No breaking changes to API or behavior

Testing

  • Fixes Neuroweb testnet hanging issues
  • All existing timeout configurations preserved
  • Generous timeout values ensure normal operations are not affected

@Bojan131 Bojan131 closed this Nov 25, 2025
@Bojan131 Bojan131 deleted the jenkins_timeout_fix branch December 22, 2025 12:19
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.

3 participants