Skip to content

Comments

feat: different operator and signer#178

Merged
reecepbcups merged 9 commits intomainfrom
ethan/different-operator-and-signer
May 30, 2025
Merged

feat: different operator and signer#178
reecepbcups merged 9 commits intomainfrom
ethan/different-operator-and-signer

Conversation

@ethanfrey
Copy link
Contributor

I am trying to update to the latest wavs-middleware (merged today) that takes separate operator key an avs address.

First setting them both to the same path to make sure I can run through the README and the syntax is correct everywhere. But I am hitting some issues I would love @reecepbcups to help debug.

Once that is working, I would set the keys to be different and see if wavs handles this properly (or better, whether the new contracts handle this properly)

@reecepbcups
Copy link
Member

GNU bash, version 5.2.32(1)-release (x86_64-pc-linux-gnu)

(ethan/different-operator-and-signer) -> $ DELEGATION=0.001ether OPERATOR_PRIVATE_KEY=${OPERATOR_PRIVATE_KEY} AVS_SIGNING_ADDRESS=${AVS_SIGNING_ADDRESS} make V=1 operator-register
Calling: /wavs/register.sh 0xf0860de5762e5d4defd38ee92c07109494977210865090138e4bdbeff2a799cb 0x58F7Dc4de075161C3E29859d11291f5034b652f9 0.001ether
/wavs/register.sh: line 69: syntax error near unexpected token `<<<'

@ethanfrey
Copy link
Contributor Author

ethanfrey commented May 29, 2025

Yeah, I fixed that. There was a merge conflict I accidentally merged (I thought it was just cosmetic updates and didn't do full review on last commits)

This works now on d801801

However, the last commit (9ab10f8) fails.

$ docker logs wavs-1
...
 INFO Received local command: StartListeningChain { chain_name: ChainName("local") }
input id: 1
resp_data: PriceFeedData { symbol: "BTC", timestamp: "2025-05-29T13:10:26", price: 108578.01 }
ERROR Aggregator errored: ServiceManagerValidate(TransportError(ErrorResp(ErrorPayload { code: 3, message: "execution reverted: custom error 0x50884582", data: Some(RawValue("0x50884582")) })))
input id: 1
resp_data: PriceFeedData { symbol: "BTC", timestamp: "2025-05-29T13:10:26", price: 108578.01 }
ERROR Aggregator errored: ServiceManagerValidate(TransportError(ErrorResp(ErrorPayload { code: 3, message: "execution reverted: custom error 0x50884582", data: Some(RawValue("0x50884582")) })))

I think this dies on aggregator validation that queries the contract with the signer key, expecting it to be operator key.
You have the following queries, likely you will want getLatestOperatorForSigningKey()

interface IECDSAStakeRegistry {
    /*
     * @notice Retrieves the latest signing key for a given operator.
     * @param operator The address of the operator.
     * @return The latest signing key of the operator.
     */
    function getLatestOperatorSigningKey(
        address operator
    ) external view returns (address);

    /*
     * @notice Retrieves the signing key for an operator at a specific block.
     * @param operator The address of the operator.
     * @param blockNumber The block number to query at.
     * @return The signing key of the operator at the given block.
     */
    function getOperatorSigningKeyAtBlock(
        address operator,
        uint256 blockNumber
    ) external view returns (address);


    /*
     * @notice Retrieves the latest operator address associated with a signing key.
     * @param signingKey The address of the signing key.
     * @return The latest operator address associated with the signing key, or address(0) if none.
     */
    function getLatestOperatorForSigningKey(
        address signingKey
    ) external view returns (address);

    /*
     * @notice Retrieves the operator address associated with a signing key at a specific block.
     * @param signingKey The address of the signing key.
     * @param blockNumber The block number to query at.
     * @return The operator address associated with the signing key at the given block, or address(0) if none.
     */
    function getOperatorForSigningKeyAtBlock(
        address signingKey,
        uint256 blockNumber
    ) external view returns (address);
}

@ethanfrey
Copy link
Contributor Author

I just updated to the latest changes on wavs-middleware and this passes now!
I submit a trigger and the result is properly written to disk.

Copy link
Member

@ueco-jb ueco-jb left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Comment on lines -343 to +344
DELEGATION=0.001ether AVS_PRIVATE_KEY=${AVS_PRIVATE_KEY} make V=1 operator-register
DELEGATION=0.001ether OPERATOR_PRIVATE_KEY=${OPERATOR_PRIVATE_KEY} AVS_SIGNING_ADDRESS=${AVS_SIGNING_ADDRESS} make V=1 operator-register
Copy link
Member

Choose a reason for hiding this comment

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

This checks out.

Copy link
Member

Choose a reason for hiding this comment

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

Ill simplify this in another pr (#179)

@reecepbcups reecepbcups force-pushed the ethan/different-operator-and-signer branch from 10c6190 to 2d38069 Compare May 30, 2025 16:05
Copy link
Member

@reecepbcups reecepbcups left a comment

Choose a reason for hiding this comment

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

Nice! Glad we get multiple service keys in ECDSA now :D -- ran though it, all works looks good.

@reecepbcups reecepbcups merged commit 2a4e7cb into main May 30, 2025
5 checks passed
@reecepbcups reecepbcups deleted the ethan/different-operator-and-signer branch May 30, 2025 16:06
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.

4 participants