Skip to content

[Reputation Oracle] Mark escrow completion as completed before webhook creation#3876

Open
flopez7 wants to merge 2 commits intodevelopfrom
flopez/escrow-completion
Open

[Reputation Oracle] Mark escrow completion as completed before webhook creation#3876
flopez7 wants to merge 2 commits intodevelopfrom
flopez/escrow-completion

Conversation

@flopez7
Copy link
Copy Markdown
Contributor

@flopez7 flopez7 commented Apr 24, 2026

Issue tracking

Freestyle

Context behind the change

Persist escrow completion immediately after successful on-chain finalization, so webhook creation failures no longer leave the escrow stuck in an inconsistent DB state.

How has this been tested?

Ran unit tests locally

Release plan

None

Potential risks; What to monitor; Rollback plan

None

@flopez7 flopez7 requested a review from portuu3 April 24, 2026 12:52
@flopez7 flopez7 self-assigned this Apr 24, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

5 Skipped Deployments
Project Deployment Actions Updated (UTC)
faucet-frontend Ignored Ignored Preview Apr 29, 2026 7:44am
faucet-server Ignored Ignored Preview Apr 29, 2026 7:44am
human-app Skipped Skipped Apr 29, 2026 7:44am
human-dashboard-frontend Skipped Skipped Apr 29, 2026 7:44am
staking-dashboard Skipped Skipped Apr 29, 2026 7:44am

Request Review

Co-authored-by: portuu3 <61605646+portuu3@users.noreply.github.com>
@vercel vercel Bot temporarily deployed to Preview – human-dashboard-frontend April 29, 2026 07:43 Inactive
@vercel vercel Bot temporarily deployed to Preview – human-app April 29, 2026 07:43 Inactive
@vercel vercel Bot temporarily deployed to Preview – staking-dashboard April 29, 2026 07:43 Inactive
@flopez7 flopez7 requested review from Dzeranov and dnechay April 29, 2026 07:52
Copy link
Copy Markdown
Collaborator

@dnechay dnechay left a comment

Choose a reason for hiding this comment

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

After this change, if webhook creation fails - it will never be retried, making the guarantee of webhook sending "at most once", but we need "at least once" in order to notify other oracle and let the whole flow finish.

If we fail to get operator data or fail to create webhook in DB (which can be only DB error), then we should fail and retry later. If oracle doesn't have webhook url set at all - we fail as well, but can consider a possibility of skipping webhook creation for such oracles

oracleAddress,
);
if (!oracleData) {
throw new Error('Oracle data is missing');
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.

It is mainly a safety belt for lagging subgraph, because it shouldn't be possible since at least fee and role must be set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants