Skip to content

Commit

Permalink
Merge of #6079
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 18, 2024
2 parents 58113e6 + 1375779 commit 65917dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ pub fn cli_app() -> Command {
.action(ArgAction::SetTrue)
.help_heading(FLAG_HEADER)
.display_order(0)
.requires("suggested-fee-recipient")
)
.arg(
Arg::new("fork-choice-before-proposal-timeout")
Expand Down
2 changes: 1 addition & 1 deletion book/src/api-bn.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ You can replace `1` in the above command with the validator index that you would

### Events API

The [events API](https://ethereum.github.io/beacon-APIs/#/Events/eventstream) provides information such as the payload attributes that are of interest to block builders and relays. To query the payload attributes, it is necessary to run Lighthouse beacon node with the flag `--always-prepare-payload`. It is also recommended to add the flag `--prepare-payload-lookahead 8000` which configures the payload attributes to be sent at 4s into each slot (or 8s from the start of the next slot). An example of the command is:
The [events API](https://ethereum.github.io/beacon-APIs/#/Events/eventstream) provides information such as the payload attributes that are of interest to block builders and relays. To query the payload attributes, it is necessary to run Lighthouse beacon node with the flag `--always-prepare-payload`. With the flag `--always-prepare-payload`, it is mandatory to also have the flag `--suggested-fee-recipient` set on the beacon node. You could pass a dummy fee recipient and have it override with the intended fee recipient of the proposer during the actual block proposal. It is also recommended to add the flag `--prepare-payload-lookahead 8000` which configures the payload attributes to be sent at 4s into each slot (or 8s from the start of the next slot). An example of the command is:

```bash
curl -X 'GET' \
Expand Down
10 changes: 10 additions & 0 deletions lighthouse/tests/beacon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,18 @@ fn always_prepare_payload_default() {

#[test]
fn always_prepare_payload_override() {
let dir = TempDir::new().expect("Unable to create temporary directory");
CommandLineTest::new()
.flag("always-prepare-payload", None)
.flag(
"suggested-fee-recipient",
Some("0x00000000219ab540356cbb839cbe05303d7705fa"),
)
.flag("execution-endpoint", Some("http://localhost:8551/"))
.flag(
"execution-jwt",
dir.path().join("jwt-file").as_os_str().to_str(),
)
.run_with_zero_port()
.with_config(|config| assert!(config.chain.always_prepare_payload));
}
Expand Down

0 comments on commit 65917dc

Please sign in to comment.