Add requires suggested-fee-recipient flag when always-prepare-payload is set (#6079)

* Add requires

* Try to fix test

* Add suggested fee recipient

* Fix

* Add execution-endpoint

* Add execution-jwt

* Revise execution-jwt

* Add execution-jwt-secret-key

* Define dir in execution-jwt
This commit is contained in:
chonghe
2024-07-18 16:54:05 +08:00
committed by GitHub
parent 86cb3f45d2
commit 3859c9bca5
3 changed files with 12 additions and 1 deletions

View File

@@ -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")

View File

@@ -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' \

View File

@@ -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));
}