Skip to content

chore(relayer): migrate relayer to fhevm (#914)#2184

Merged
mergify[bot] merged 1735 commits intomainfrom
paulo/migration/914-relayer-migration
Mar 26, 2026
Merged

chore(relayer): migrate relayer to fhevm (#914)#2184
mergify[bot] merged 1735 commits intomainfrom
paulo/migration/914-relayer-migration

Conversation

@paulo-zama
Copy link
Copy Markdown
Contributor

migrate relayer codebase

manoranjith and others added 30 commits December 11, 2025 21:20
chore(relayer): removing cron from ci
chore(ci): increasing pg max connections for test ci

chore(relayer): applying changes for err_reason

chore(ci): increasing max connection for ci

chore(ci): increasing ulimit of rust tests
Correctly handle ext_job_id from db:

- Add tests to ensure consecutive duplicate requests are failing in case
  of v2 (since an unassigned ext_job_id is returned to the user). v1
  does not have this issue, as the ext_job_id is not used.

- The tests only assert if job ids are valid by making GET query.

- Then fix the bug by handling the ext_job_id returned from db correctly
  and then returning it to the user for user decrypt and public decrypt.

UNIQUE constraint in DB:

- Previously the ext_job_id was unique only when status is not failed or
  timed out. So, when a new request has to be made, it can have same
  ext_job_id. But we want it to always be unique.

- So, add missing UNIQUE constraints on ext_job_id to enforce the
  uniqueness at DB level.
- Previosly, doing these two updates in separate transaction could lead
  to race condition where a request can be timed out by the cron between
  these two transactions.

- To remove this possibility, ensure both the operations are done
  atomically in a single transaction.
- Add GatewayBlockNumber model, to make this repo consistent with
  others and update the query to use it.

- Include tx hash in UserDecryptShare model. Also, create a model for
  user decrypt share since it has many parameters.
- Previously, the retry after was in body for 202 responses.

- Now, to align 429 response (which returns the retry-after in header)
  move it to header and hence remove the field in response.

- Also, update tests to assert this.
chore(relayer): metrics doc for statuses
chore(relayer): metrics on active and idle connection and acquire
chore(relayer): metrics documentation for http legacy and v2
@paulo-zama paulo-zama marked this pull request as ready for review March 26, 2026 13:31
@paulo-zama paulo-zama requested review from a team as code owners March 26, 2026 13:31
@paulo-zama
Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify
Copy link
Copy Markdown

mergify bot commented Mar 26, 2026

Merge Queue Status

This pull request spent 2 hours 42 minutes 4 seconds in the queue, including 1 hour 53 minutes 10 seconds running CI.

Required conditions to merge

mergify bot added a commit that referenced this pull request Mar 26, 2026
mergify bot added a commit that referenced this pull request Mar 26, 2026
mergify bot added a commit that referenced this pull request Mar 26, 2026
@mergify mergify bot removed the merge-queued label Mar 26, 2026
mergify bot added a commit that referenced this pull request Mar 26, 2026
@mergify mergify bot merged commit 7dfe213 into main Mar 26, 2026
63 of 64 checks passed
@mergify mergify bot deleted the paulo/migration/914-relayer-migration branch March 26, 2026 16:26
@mergify mergify bot removed the queued label Mar 26, 2026
mergify bot added a commit that referenced this pull request Mar 26, 2026
mergify bot added a commit that referenced this pull request Mar 26, 2026
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.

7 participants