Skip to content

refactor(coprocessor): remove tenant notion from sns-worker#1903

Merged
dartdart26 merged 7 commits intopetar/db-keys-refactorfrom
sns-worker-tenantless
Feb 5, 2026
Merged

refactor(coprocessor): remove tenant notion from sns-worker#1903
dartdart26 merged 7 commits intopetar/db-keys-refactorfrom
sns-worker-tenantless

Conversation

@obatirou
Copy link
Copy Markdown
Contributor

@obatirou obatirou commented Feb 4, 2026

Summary

  • Remove tenant_id usage in sns-worker paths; carry host_chain_id and key_id through tasks.
  • Load latest SnS key by sequence_number with key-id cache and LOB read.
  • Update migrations, tests/harness, and sns-worker docs/compose for new schema.

@cla-bot cla-bot bot added the cla-signed label Feb 4, 2026
@obatirou obatirou changed the title sns-worker: remove tenant notion refactor(coprocessor): remove tenant notion from sns-worker Feb 4, 2026
@mergify
Copy link
Copy Markdown

mergify bot commented Feb 4, 2026

🧪 CI Insights

Here's what we observed from your CI run for 0d4690a.

❌ Job Failures

Pipeline Job Health on main Retries 🔍 CI Insights 📄 Logs
common-pull-request common-pull-request/lint (bpr) Unknown 0 View View
coprocessor-cargo-test coprocessor-cargo-test/cargo-tests (bpr) Unknown 0 View View
coprocessor-dependency-analysis coprocessor-dependency-analysis/dependencies-check (bpr) Unknown 0 View View

@obatirou obatirou force-pushed the sns-worker-tenantless branch from 73a3fb9 to 94453d7 Compare February 4, 2026 20:54
@obatirou obatirou marked this pull request as ready for review February 4, 2026 21:24
@obatirou obatirou requested review from a team as code owners February 4, 2026 21:24
@obatirou obatirou requested a review from dartdart26 February 4, 2026 21:25
Copy link
Copy Markdown
Collaborator

@dartdart26 dartdart26 left a comment

Choose a reason for hiding this comment

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

Great job! I am merging it to be able to use it.

Comment thread coprocessor/fhevm-engine/sns-worker/src/bin/utils/daemon_cli.rs
Comment thread coprocessor/fhevm-engine/sns-worker/README.md
@dartdart26 dartdart26 merged commit 18bdbf2 into petar/db-keys-refactor Feb 5, 2026
48 of 52 checks passed
@dartdart26 dartdart26 deleted the sns-worker-tenantless branch February 5, 2026 08:02
info!(tenant_api_key, "Cache hit");
return Ok(Some(keys.clone()));
}
async fn fetch_latest_key_id(pool: &PgPool) -> Result<Option<(DbKeyId, i64)>, ExecutionError> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Putting a note here to move code in this file to the common crate.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will be done in a separate PR.

dartdart26 pushed a commit that referenced this pull request Feb 6, 2026
* db-migration: remove tenant_id from ciphertexts128 and add host_chain_id to pbs_computations

* sns-worker: remove tenant API key and refactor keyset loading

* tests: align sns-worker and harness with key_id/host_chain_id

* docs/compose: update sns-worker usage for tenant-less schema

* test-harness: drop keys.chain_id filter after tenant removal

* style: cargo fmt

* Clarify keyset invariant and rotation TODO
dartdart26 pushed a commit that referenced this pull request Feb 6, 2026
* db-migration: remove tenant_id from ciphertexts128 and add host_chain_id to pbs_computations

* sns-worker: remove tenant API key and refactor keyset loading

* tests: align sns-worker and harness with key_id/host_chain_id

* docs/compose: update sns-worker usage for tenant-less schema

* test-harness: drop keys.chain_id filter after tenant removal

* style: cargo fmt

* Clarify keyset invariant and rotation TODO
dartdart26 pushed a commit that referenced this pull request Feb 9, 2026
* db-migration: remove tenant_id from ciphertexts128 and add host_chain_id to pbs_computations

* sns-worker: remove tenant API key and refactor keyset loading

* tests: align sns-worker and harness with key_id/host_chain_id

* docs/compose: update sns-worker usage for tenant-less schema

* test-harness: drop keys.chain_id filter after tenant removal

* style: cargo fmt

* Clarify keyset invariant and rotation TODO
dartdart26 pushed a commit that referenced this pull request Feb 10, 2026
* db-migration: remove tenant_id from ciphertexts128 and add host_chain_id to pbs_computations

* sns-worker: remove tenant API key and refactor keyset loading

* tests: align sns-worker and harness with key_id/host_chain_id

* docs/compose: update sns-worker usage for tenant-less schema

* test-harness: drop keys.chain_id filter after tenant removal

* style: cargo fmt

* Clarify keyset invariant and rotation TODO
dartdart26 pushed a commit that referenced this pull request Feb 11, 2026
* db-migration: remove tenant_id from ciphertexts128 and add host_chain_id to pbs_computations

* sns-worker: remove tenant API key and refactor keyset loading

* tests: align sns-worker and harness with key_id/host_chain_id

* docs/compose: update sns-worker usage for tenant-less schema

* test-harness: drop keys.chain_id filter after tenant removal

* style: cargo fmt

* Clarify keyset invariant and rotation TODO
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.

2 participants