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

Broadcast various requests as per #4684 #4920

Merged
merged 9 commits into from
Nov 27, 2023
Merged

Conversation

uvizhe
Copy link
Contributor

@uvizhe uvizhe commented Nov 9, 2023

Issue Addressed

Addresses #4684

Proposed Changes

Adds to a validator client --broadcast option taking multiple possible values.

Additional Info

I included a commit with multiple flags to make it possible to assess which variant fits better (because single option adds complexity to the code).

@CLAassistant
Copy link

CLAassistant commented Nov 9, 2023

CLA assistant check
All committers have signed the CLA.

@xrchz
Copy link
Contributor

xrchz commented Nov 9, 2023

I think "none" may be a little confusing - is it not ok to have an empty string for that case?

@uvizhe
Copy link
Contributor Author

uvizhe commented Nov 9, 2023

@xrchz but isn't disabling broadcasting by supplying bare --broadcast flag more confusing?

@xrchz
Copy link
Contributor

xrchz commented Nov 9, 2023

@xrchz but isn't disabling broadcasting by supplying bare --broadcast flag more confusing?

🤷‍♀️ I think it makes more sense that way

@chong-he chong-he added val-client Relates to the validator client binary ready-for-review The code is ready for review labels Nov 9, 2023
@michaelsproul
Copy link
Member

I don't mind the --broadcast none syntax. Lighthouse doesn't have any other flags like --flag "", so I think that would be a bit strange

I'll try to review properly in the next little while, but seems fine at a glance

@michaelsproul
Copy link
Member

@uvizhe Looks like cargo-fmt is failing, you can fix it with cargo fmt --all

@uvizhe
Copy link
Contributor Author

uvizhe commented Nov 13, 2023

@michaelsproul is it ok if I shorten 'sync-committee-messages' flag value to 'sync-committee' to match enum variant?

@michaelsproul
Copy link
Member

@uvizhe yeah I think that's fine

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Looking good on the whole, just a few minor suggestions

validator_client/src/beacon_node_fallback.rs Outdated Show resolved Hide resolved
validator_client/src/beacon_node_fallback.rs Outdated Show resolved Hide resolved
@uvizhe
Copy link
Contributor Author

uvizhe commented Nov 15, 2023

@michaelsproul can we move further?

It's not that I'm in a hurry, I just want to make sure my part is done here.

@michaelsproul
Copy link
Member

I think we're probably good to review and test this. It would be good if you could integrate it into one of the simulator tests

@michaelsproul
Copy link
Member

I'm at devconnect right now but should have some time to review in a bit, or worst case once I'm back in 10 days

@uvizhe
Copy link
Contributor Author

uvizhe commented Nov 17, 2023

Regarding adding more tests, I'm afraid I can't do it in the scope of this issue. This would require mocking at least BeaconNodeHttpClient and depending on an approach (either integration test or a chain of unit tests) adding more helper code / tests somewhere. This is not well aligned with present tests, so all the negotiations can delay the PR for indefinite time.

@michaelsproul
Copy link
Member

I think it would be relatively straightforward to adapt one of the existing simulator tests to use the broadcast flags. I can push a commit to do this shortly

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

I pushed those tests, using some code from #4393 (thanks @macladson). That PR will conflict slightly with this one, but I think we should merge this first as it's simpler.

validator_client/src/cli.rs Show resolved Hide resolved
@michaelsproul michaelsproul added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Nov 19, 2023
@uvizhe
Copy link
Contributor Author

uvizhe commented Nov 22, 2023

@michaelsproul, I'm not sure if you noticed my last force-push

@michaelsproul
Copy link
Member

@uvizhe yeah I did thanks, will deploy this on some testnet infra next week then we can merge

I'm still on leave after devconnect and will be back next week

@xrchz
Copy link
Contributor

xrchz commented Nov 22, 2023

before next release i hope 😁 and not too long before

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

This is now running on some Goerli and Sepolia validators with --broadcast subscriptions,blocks,sync-committee and seems to be working well. I'll continue rolling it out on our infra ahead of the next release.

Let's merge!

@michaelsproul michaelsproul merged commit b4556a3 into sigp:unstable Nov 27, 2023
23 checks passed
@jimmygchen jimmygchen added the backwards-incompat Backwards-incompatible API change label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompat Backwards-incompatible API change val-client Relates to the validator client binary waiting-on-author The reviewer has suggested changes and awaits thier implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants