hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
311 stars 341 forks source link

Validator doesn't announce without funds on the validator key (but the signer) #3850

Open nambrot opened 4 months ago

nambrot commented 4 months ago

Problem

Is your feature request related to a problem? Please describe. Validators can specify a separate chain signer key which submits the tx on-chain, so that the validator key never needs to have funds on-chain. However, that functionality is broken right now, as the validator requires funds on the validator key itself, even if there is enough on the chain signer.

Additional context Looks like the issue is here https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/f2cb6ebc1b75612cb22b5135dd0ad1f133b3a197/rust/chains/hyperlane-ethereum/src/contracts/validator_announce.rs#L152

Solution

Describe the solution you'd like Validators should be able to announce with just funds on the chain signer

hydrogenbond007 commented 3 months ago

Hey @nambrot didnt fully understand but do you want the announcement to happen from validator signer account? I think then we could just make new txn for that

 let validator = announcement.value.validator;
 let tx = contract_call
        .from(eth_h160)
        .send()
        .await?;

    let receipt = tx.await?;
    Ok(receipt.into())
avious00 commented 3 months ago

hey @daniel-savu or @tkporter could you help clarify for a new community contributor?

nambrot commented 2 months ago

The announcement should happen from the signer indeed if specified, its just that we look up the balance of the validator key

avious00 commented 2 months ago

assigned to @hydrogenbond007 btw

avious00 commented 1 month ago

hey @hydrogenbond007 any update here

avious00 commented 1 month ago

hey @hydrogenbond007 will need to ship a fix for this soon, can you wrap up your WIP?

hydrogenbond007 commented 1 month ago

will be pushing new change in a day or two, sorry been afk because of travel