Skip to content

UPDATE operations timeout on isolated nodes without returning UpdateResponse #1884

@sanity

Description

@sanity

Problem Description

UPDATE operations sent to isolated nodes (nodes with no network peers) fail to return an UpdateResponse, causing the operation to timeout. This is a distinct issue from update propagation problems (#1848) and delta transmission optimization (#1450).

Test Evidence

Using the test isolated_node_regression.rs:

  1. Single isolated node (no network peers)
  2. Contract successfully PUT with initial state
  3. UPDATE operation sent with new state
  4. Contract executor successfully updates the contract state
  5. UpdateResponse is never sent back to the client
  6. Operation times out after 10 seconds

Logs from Test

UPDATE operation started
Contract executor updating contract (full state)
Delta updates are not yet supported (runtime.rs:304)
Contract state successfully updated in storage
[10 second timeout - no UpdateResponse received]
Test failed: timeout waiting for UpdateResponse

Root Cause Analysis

The contract executor logs a warning at runtime.rs:304:

tracing::warn!("Delta updates are not yet supported");

Despite this warning, the executor IS sending full state updates (not deltas), but the UpdateResponse appears to never be generated or routed back to the client.

Distinction from Related Issues

Expected Behavior

  1. Client sends UPDATE operation
  2. Contract executor receives update, processes it (with full state)
  3. Contract state is updated in storage
  4. UpdateResponse is generated and sent back to client (THIS IS MISSING)
  5. Client receives UpdateResponse confirming the update

Actual Behavior

Steps 1-3 succeed, but step 4 never happens, causing step 5 to timeout.

Impact

Environment

  • Freenet version: Latest main branch
  • Test: crates/core/tests/isolated_node_regression.rs
  • Node configuration: Single isolated node (no network peers)

Code References

  • Warning location: crates/core/src/contract/executor/runtime.rs:304
  • Test demonstrating issue: crates/core/tests/isolated_node_regression.rs
  • Related to update operation: crates/core/src/operations/update.rs

Related Issues

[AI-assisted debugging and comment]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contractsArea: Contract runtime, SDK, and executionA-networkingArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateP-mediumMedium priority

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions