Skip to content

fix: delay and timeout oo settlements#4868

Merged
Reinis-FRP merged 1 commit intomasterfrom
reinis-frp/delay-timeout-settlements
Sep 16, 2025
Merged

fix: delay and timeout oo settlements#4868
Reinis-FRP merged 1 commit intomasterfrom
reinis-frp/delay-timeout-settlements

Conversation

@Reinis-FRP
Copy link
Copy Markdown
Contributor

Motivation

Better handle processing of OO settlements when settleable requests are spiking.

Summary

Adds delay and timeout to OO settlement bots.

Details

SETTLE_DELAY environment (defaults to 5 minutes) allows other operators to settle OO requests/assertions reducing the risk of reverts.
SETTLE_TIMEOUT environment (defaults to 4 minutes) allows avoiding parallel runs of multiple bot instances in serverless mode when the transaction submission takes longer than bot run cycle.

Testing

Check a box to describe how you tested these changes and list the steps for reviewers to test.

  • Ran end-to-end test, running the code as in production
  • New unit tests created
  • Existing tests adequate, no new tests required
  • All existing tests pass
  • Untested

Issue(s)

Fixes #XXXX

Signed-off-by: Reinis Martinsons <reinis@umaproject.org>
logger.warn({
at: "OOv3Bot",
message: "Execution deadline reached, skipping settlement",
remainingAssertions: setteableAssertions.length - i,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: For observability, we might want to add some more info to this log:

executionDeadline: params.executionDeadline,
now: Math.floor(Date.now() / 1000),
timeoutSec: Number(process.env.SETTLE_TIMEOUT) || 240,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure if that adds much, since executionDeadline and now are going to be pretty close and also we have current timestamp in the logs

@Reinis-FRP Reinis-FRP merged commit d358785 into master Sep 16, 2025
22 checks passed
@Reinis-FRP Reinis-FRP deleted the reinis-frp/delay-timeout-settlements branch September 16, 2025 16:48
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.

2 participants