Skip to content

Conversation

@antoniupop
Copy link
Collaborator

No description provided.

@antoniupop antoniupop requested a review from a team as a code owner December 31, 2025 00:03
@cla-bot cla-bot bot added the cla-signed label Dec 31, 2025
@mergify
Copy link

mergify bot commented Dec 31, 2025

🧪 CI Insights

Here's what we observed from your CI run for 32dc8d0.

🟢 All jobs passed!

But CI Insights is watching 👀

@antoniupop antoniupop force-pushed the antoniu/hotfix/release-dep-chains branch from 5778aaa to e951f11 Compare December 31, 2025 00:23
@antoniupop antoniupop requested review from Copilot and removed request for a team December 31, 2025 00:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a mechanism to release dependence chain locks when no progress is being made during worker cycles. The implementation tracks progress across worker cycles and releases locks after a configurable number of cycles without progress, allowing other chains to be processed.

Key Changes

  • Introduces a no-progress cycle counter that releases dependence chain locks when a threshold is reached
  • Modifies the database schema to mark non-allowed computations as completed immediately upon insertion
  • Updates the release_current_lock API to optionally set the last_updated_at timestamp for released chains

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tfhe-worker/src/tfhe_worker.rs Adds no-progress tracking mechanism, modifies query_for_work to return earliest computation timestamp, updates upload_transaction_graph_results to return progress indicator
tfhe-worker/src/dependence_chain.rs Extends release_current_lock to accept optional timestamp parameter for updating last_updated_at field
tfhe-worker/src/daemon_cli.rs Adds CLI argument for configuring maximum no-progress cycles threshold
tfhe-worker/src/tests/utils.rs Updates test configuration with new dcid_max_no_progress_cycles parameter
host-listener/src/database/tfhe_event_propagate.rs Modifies computation insertion to mark non-allowed operations as completed immediately
tfhe-worker/Cargo.toml Adds time crate dependency
Cargo.lock Updates lock file with time dependency
.sqlx/query-*.json Updates SQLx query metadata for modified database queries
Files not reviewed (1)
  • coprocessor/fhevm-engine/.sqlx/query-156dcfa2ae70e64be2eb8014928745a9c95e29d18a435f4d2e2fda2afd7952bf.json: Language not supported
Comments suppressed due to low confidence (1)

coprocessor/fhevm-engine/tfhe-worker/src/tfhe_worker.rs:686

  • Inconsistent indentation: tabs are used here instead of spaces. The rest of the codebase uses spaces for indentation. This should be changed to use spaces to maintain consistency.
	let (tenant_ids, (handles, (ciphertexts, (ciphertext_versions, ciphertext_types)))): (
            Vec<_>,
            (Vec<_>, (Vec<_>, (Vec<_>, Vec<_>))),
	) = cts_to_insert.into_iter().unzip();
        let _ = query!(
			"
                    INSERT INTO ciphertexts(tenant_id, handle, ciphertext, ciphertext_version, ciphertext_type)
                    SELECT * FROM UNNEST($1::INTEGER[], $2::BYTEA[], $3::BYTEA[], $4::SMALLINT[], $5::SMALLINT[])
                    ON CONFLICT (tenant_id, handle, ciphertext_version) DO NOTHING
                    ",
		&tenant_ids, &handles, &ciphertexts, &ciphertext_versions, &ciphertext_types)
			.execute(trx.as_mut())

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@antoniupop antoniupop force-pushed the antoniu/hotfix/release-dep-chains branch from e951f11 to 9ad7851 Compare December 31, 2025 07:43
@antoniupop antoniupop force-pushed the antoniu/hotfix/release-dep-chains branch from 9ad7851 to c01c771 Compare December 31, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants