mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
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:
@@ -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")
|
||||
|
||||
@@ -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' \
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user