Skip to content

Conversation

0xrajath
Copy link
Collaborator

@0xrajath 0xrajath commented Aug 11, 2025

Motivation:

Certora TaskMailbox audit fixes for Hourglass Part 1 and Part 2.

Modifications:

  • H-03: Aggregator TOCTOU Issues Regarding Stake Weights and Operator Set : Added a MAX_TASK_SLA immutable that will be set as DEALLOCATION_DELAY / 2 so that AVSs have half the Deallocation Delay to do any operator slashing in case of misbehavior

  • L-01: TaskMailbox::createTask() may create tasks that cannot be completed : Checking that block.timestamp + taskConfig.taskSLA <= operatorTableReferenceTimestamp + maxStaleness during taskCreation so that a task cannot be created if its max response time breaches the staleness period of the certificate.

  • L-03: Restrictive check in_validateBN254Certificate() : Updated the check to only be for the (0,0) coordinate.

  • I-02: Incorrect NatSpec in registerExecutorOperatorSet() : Clearer natspec.

  • Updated release scripts

  • Updated Bindings

  • Updated Docs

  • Updated Unit tests

Result:

Bug free code.

@0xrajath 0xrajath self-assigned this Aug 11, 2025
@0xrajath 0xrajath added ⚖️ Audit Fix Audit-related fixes. ⌛ Hourglass Hourglass, a task-based AVS framework labels Aug 11, 2025
@0xrajath 0xrajath marked this pull request as ready for review August 12, 2025 20:04
@0xrajath 0xrajath merged commit 6f8ae0d into release-dev/hourglass-audit-fixes Aug 13, 2025
17 checks passed
@0xrajath 0xrajath deleted the rajath/taskmailbox-audit-fixes branch August 13, 2025 23:19
0xrajath added a commit that referenced this pull request Aug 13, 2025
**Motivation:**

Certora TaskMailbox audit fixes for Hourglass Part 1 and Part 2.

**Modifications:**

* `H-03: Aggregator TOCTOU Issues Regarding Stake Weights and Operator
Set` : Added a `MAX_TASK_SLA` immutable that will be set as
`DEALLOCATION_DELAY / 2` so that AVSs have half the Deallocation Delay
to do any operator slashing in case of misbehavior

* `L-01: TaskMailbox::createTask() may create tasks that cannot be
completed` : Checking that `block.timestamp + taskConfig.taskSLA <=
operatorTableReferenceTimestamp + maxStaleness` during taskCreation so
that a task cannot be created if its max response time breaches the
staleness period of the certificate.

* `L-03: Restrictive check in_validateBN254Certificate()` : Updated the
check to only be for the (0,0) coordinate.

* `I-02: Incorrect NatSpec in registerExecutorOperatorSet()` : Clearer
natspec.

* Updated release scripts

* Updated Bindings

* Updated Docs

* Updated Unit tests

**Result:**

Bug free code.
0xrajath added a commit that referenced this pull request Aug 14, 2025
**Hourglass part 1 and 2 audit fixes**

* TaskMailbox fixes: #1604 
* ReleaseManager fixes: #1608 

**High:**

* `H-03: Aggregator TOCTOU Issues Regarding Stake Weights and Operator
Set` : Added a `MAX_TASK_SLA` immutable that will be set as
`DEALLOCATION_DELAY / 2` so that AVSs have half the Deallocation Delay
to do any operator slashing in case of misbehavior : #1604

**Low:**

* `L-01: TaskMailbox::createTask() may create tasks that cannot be
completed` : Checking that `block.timestamp + taskConfig.taskSLA <=
operatorTableReferenceTimestamp + maxStaleness` during taskCreation so
that a task cannot be created if its max response time breaches the
staleness period of the certificate. : #1604

* `L-03: Restrictive check in_validateBN254Certificate()` : Updated the
check to only be for the (0,0) coordinate. : #1604

**Info:**

* `I-01. isValidRelease() and getLatestUpgradeByTime() may panic when no
releases exist` : Added `NoReleases()` custom error to those 2 functions
in the case of no error. : #1608

* `I-02: Incorrect NatSpec in registerExecutorOperatorSet()` : Clearer
natspec. : #1604

* `I-04. Unused imports can be removed`: Removed unused imports : #1608

**Additional Features:**

* Support for signaling instant upgrades by setting `upgradeByTime` to 0
in the `ReleaseManager` contract: #1608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚖️ Audit Fix Audit-related fixes. ⌛ Hourglass Hourglass, a task-based AVS framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants