Skip to content
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: posting ECDSARegistry signature to s3 bucket for validators #3674

Closed
wants to merge 47 commits into from

Conversation

aroralanuk
Copy link
Contributor

Description

  • add announce_to_avs to validator code to publish their avs signature

Drive-by changes

Related issues

Backward compatibility

Testing

Copy link

changeset-bot bot commented Apr 29, 2024

⚠️ No Changeset found

Latest commit: 85ab916

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@aroralanuk aroralanuk changed the base branch from main to kunal/avs-contracts April 29, 2024 10:50
Copy link
Collaborator

@tkporter tkporter left a comment

Choose a reason for hiding this comment

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

directionally lgtm!

rust/agents/validator/src/validator.rs Outdated Show resolved Hide resolved
rust/agents/validator/src/validator.rs Outdated Show resolved Hide resolved
#[derive(Clone, Debug, Default)]
pub struct StakingConf {
/// Address of the HyperlaneServiceManager contract
pub service_managers: HashMap<u32, H160>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

will there be stuff in here other than the service_managers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I imagine we'll have more config once we have native staking which will also have some form of registration announcement in a json form.

@@ -40,6 +41,8 @@ pub struct ValidatorSettings {
pub reorg_period: u64,
/// How frequently to check for new checkpoints
pub interval: Duration,

pub staking_config: StakingConf,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you expect to ever have this be set via settings?

if we won't ever have a different config other than the default_staking_config, imo you could just not even have this in ValidatorSettings, and just create it in impl BaseAgent for Validator {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

given the above comment, I was anticipating we may need to set it via settings as you mentioned

@@ -122,6 +124,7 @@ impl BaseAgent for Validator {
agent_metrics,
chain_metrics,
core_metrics: metrics,
staking_config: settings.staking_config,
Copy link
Collaborator

Choose a reason for hiding this comment

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

imo instead of storing a config in the Validator that you can then lookup

let service_manager = self
            .staking_config
            .service_managers
            .get(&avs_domain)

it'd be nicer to just do that lookup in here when building the Validator once, and then store the service_manager as the config in the Validator

rust/hyperlane-core/src/utils.rs Outdated Show resolved Hide resolved
rust/hyperlane-core/src/utils.rs Outdated Show resolved Hide resolved
@nbayindirli nbayindirli requested a review from ltyu April 30, 2024 14:14
@aroralanuk aroralanuk marked this pull request as ready for review May 9, 2024 13:25
Base automatically changed from kunal/avs-contracts to main May 9, 2024 17:08
@aroralanuk aroralanuk closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Validator client changes for posting ECDSARegistry signature to s3 bucket
2 participants