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

[Merged by Bors] - Strict fee recipient #3363

Closed
wants to merge 7 commits into from

Conversation

realbigsean
Copy link
Member

Issue Addressed

Resolves #3267
Resolves #3156

Proposed Changes

  • Move the log for fee recipient checks from proposer cache insertion into block proposal so we are directly checking what we get from the EE
  • Only log when there is a discrepancy with the local EE, not when using the builder API. In the builder-api branch there is an info log when there is a discrepancy, I think it is more likely there will be a difference in fee recipient with the builder api because proposer payments might be made via a transaction in the block. Not really sure what patterns will become commong.
  • Upgrade the log from a warn to an error - not actually sure which we want, but I think this is worth an error because the local EE with default transaction ordering I think should pretty much always use the provided fee recipient
  • add a strict-fee-recipient flag to the VC so we only sign blocks with matching fee recipients. Falls back from the builder API to the local API if there is a discrepancy .

@realbigsean realbigsean added ready-for-review The code is ready for review bellatrix Required to support the Bellatrix Upgrade v2.5.0 Required for Goerli merge release labels Jul 22, 2022
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Nice, looks well thought out.

I have a simple copy-paste fix (I assume). It might also be easy and simple to add a test for the flag, like this one:

#[test]
fn doppelganger_protection_flag() {
CommandLineTest::new()
.flag("enable-doppelganger-protection", None)
.run()
.with_config(|config| assert!(config.enable_doppelganger_protection));
}

validator_client/src/config.rs Outdated Show resolved Hide resolved
@paulhauner paulhauner 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 Jul 24, 2022
Co-authored-by: Paul Hauner <paul@paulhauner.com>
@realbigsean
Copy link
Member Author

Oof my bad, had I put in the test I would have caught it :/. Thanks!

Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

LGTM!

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jul 26, 2022
@paulhauner
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jul 26, 2022
## Issue Addressed

Resolves #3267
Resolves #3156 

## Proposed Changes

- Move the log for fee recipient checks from proposer cache insertion into block proposal so we are directly checking what we get from the EE
- Only log when there is a discrepancy with the local EE, not when using the builder API. In the `builder-api` branch there is an `info` log when there is a discrepancy, I think it is more likely there will be a difference in fee recipient with the builder api because proposer payments might be made via a transaction in the block. Not really sure what patterns will become commong.
- Upgrade the log from a `warn` to an `error` - not actually sure which we want, but I think this is worth an error because the local EE with default transaction ordering I think should pretty much always use the provided fee recipient
- add a `strict-fee-recipient` flag to the VC so we only sign blocks with matching fee recipients. Falls back from the builder API to the local API if there is a discrepancy .




Co-authored-by: realbigsean <sean@sigmaprime.io>
@bors bors bot changed the title Strict fee recipient [Merged by Bors] - Strict fee recipient Jul 26, 2022
@bors bors bot closed this Jul 26, 2022
@realbigsean realbigsean deleted the strict-fee-recipient branch November 21, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bellatrix Required to support the Bellatrix Upgrade ready-for-merge This PR is ready to merge. v2.5.0 Required for Goerli merge release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants