-
-
Couldn't load subscription status.
- Fork 106
Closed
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionA-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-mediumMedium priorityMedium priority
Description
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:
- Single isolated node (no network peers)
- Contract successfully PUT with initial state
- UPDATE operation sent with new state
- Contract executor successfully updates the contract state
- UpdateResponse is never sent back to the client
- 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
- Issue Fix Update Propagation Architecture: Implement Proximity-Based Forwarding and Repair Subscription Topology #1848: Focuses on update propagation between multiple network peers and subscription topology
- Issue Add support for update deltas through the network #1450: Focuses on optimizing network transmission using deltas instead of full state
- This issue: UPDATE operations fail to complete at all on isolated nodes, even when sending full state
Expected Behavior
- Client sends UPDATE operation
- Contract executor receives update, processes it (with full state)
- Contract state is updated in storage
- UpdateResponse is generated and sent back to client (THIS IS MISSING)
- Client receives UpdateResponse confirming the update
Actual Behavior
Steps 1-3 succeed, but step 4 never happens, causing step 5 to timeout.
Impact
- Testing single-node configurations fails
- Local development workflows broken
- Cannot verify UPDATE functionality in isolation
- Discovered while testing PR Fix: WebSocket SubscribeResponse not being delivered to clients #1844 (Subscribe fix)
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
- Fix Update Propagation Architecture: Implement Proximity-Based Forwarding and Repair Subscription Topology #1848 - Update propagation architecture (multi-peer networks)
- Add support for update deltas through the network #1450 - Delta update transmission optimization
- Fix: WebSocket SubscribeResponse not being delivered to clients #1844 - Subscribe fix that exposed this issue during testing
[AI-assisted debugging and comment]
Metadata
Metadata
Assignees
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionA-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-mediumMedium priorityMedium priority
Type
Projects
Status
Done