-
Notifications
You must be signed in to change notification settings - Fork 462
feat: hourglass #1576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: hourglass #1576
Conversation
**Motivation:** We need to migrate the hourglass core contracts from https://github.com/Layr-Labs/hourglass-monorepo/tree/master/contracts. This is due to the following reasons: * Better security posture of the core contracts repository * Automatic support of Zeus for contract upgrades * Easier maintainability along with other core contracts which will be governed by the protocol council. **Modifications:** * TaskMailbox and interface * Extensive unit tests for the TaskMailbox (with appropriate Mock contracts) * Updated bindings (Including stale bindings from Multichain) * Smart contract documentation for the TaskMailbox **Result:** The Hourglass core contract migration.
**Motivation:** We needed to fix the build as a result of the rebase. There were some new functions added to the Certificate verifier interfaces which need to be reflected in the Mocks. **Modifications:** Updated Mock certificate verifiers **Result:** Successful build
**Motivation:** Hourglass Zeus deploy scripts **Modifications:** * Updated `Env.sol` to include the `TaskMailbox` * v1.8.0 `upgrade.json` * Release steps **Result:** v1.8.0 release
**Motivation:** We need to add some additional certificate checks in the `submitResult` function of the TaskMailbox to prevent malicious behavior. **Modifications:** * Require check that the referenceTimestamp of the certificate equals the referenceTimestamp snapshotted at task creation time. * Require check that the messageHash of the certificate matches the hash of the task result. **Result:** Safe `submitResult`.
**Motivation:** The ECDSA message hash check was being incorrectly calculated. It just needed to be `keccak256(result)`.
**Motivation:** Addressing the comments on the `release-dev/hourglass` PR : #1543 **Modifications:** * Adding named parameters while assigning values to the task struct * Removing unnecessary storage slot comments on the TaskMailbox types * Updating the README with testnet values. **Result:** Cleaner PR
**Motivation:** Various fixes as part of the Hourglass internal review **Modifications:** * Small documentation improvments * Refactoring of duplicative require statements into a single internal function **Result:** Cleaner, safer code
**Motivation:** The TaskMailbox needs an option to allow no consensus config to be set, such that the AVS can define their own consensus logic in their `handlePostTaskResultSubmission` hook. **Modifications:** * Consensus.NONE is a valid consensus option. * Updated `handlePostTaskResultSubmission` to take `msg.sender` field as well. **Result:** More flexible consensus configs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces the "Hourglass" v1.8.0 release, which adds a comprehensive task-based AVS framework. The release includes core infrastructure contracts, mock implementations for testing, and deployment scripts for destination chain deployment.
- Introduces TaskMailbox core contract for task-based AVS execution models
- Adds comprehensive mock implementations for certificate verifiers and task hooks
- Provides deployment scripts for multi-chain proxy and implementation deployment
Reviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/contracts/avs/task/TaskMailbox.sol | Core TaskMailbox contract implementing task lifecycle management with certificate verification |
| src/contracts/avs/task/TaskMailboxStorage.sol | Storage contract defining state variables and immutable dependencies for TaskMailbox |
| src/contracts/interfaces/ITaskMailbox.sol | Interface definitions for TaskMailbox including types, errors, and events |
| src/contracts/interfaces/IAVSTaskHook.sol | Interface for AVS-specific task lifecycle hooks and validation |
| src/test/mocks/*.sol | Mock implementations for testing including certificate verifiers, task hooks, and attack scenarios |
| script/releases/v1.8.0-hourglass/*.sol | Deployment scripts for proxies, implementations, and initialization |
| script/releases/Env.sol | Environment configuration updates to support TaskMailbox deployment |
| pkg/bindings/TaskMailboxStorage/binding.go | Generated Go bindings for TaskMailboxStorage contract |
Comments suppressed due to low confidence (1)
src/test/mocks/MockSimpleERC20.sol:14
- [nitpick] Parameter 'amount' should be named 'amount_' or '_amount' to follow Solidity naming conventions for function parameters.
function mint(address to, uint amount) public {
v1.8.0 Hourglass
The Hourglass release consists of a framework that supports the creation of task-based AVSs. The task-based AVSs are enabled through a
TaskMailboxcore contract deployed to all chains that support aCertificateVerifier. Additionally AVSs deploy theirTaskAVSRegistrar. The release has 3 components:The below release notes cover Core Contracts. For more information on the end to end protocol, see our docs and core contract docs.
Release Manager
@0xrajath
Highlights
This hourglass release only introduces new contracts. As a result, there are no breaking changes or deprecations.
🚀 New Features
Destination Chain Contracts
TaskMailbox: A core infrastructure contract that enables task-based AVS execution models. It provides a standardized way for AVSs to create tasks, have operators execute them, and submit verified results on-chain. The contract acts as a mailbox system where task creators post tasks with fees, and operators compete to execute and submit results with proper consensus verification.Changelog
submitResultcertificate checks PR #1557