Skip to content

Commit 5c8c8da

Browse files
eserilevmichaelsprouljimmygchen
authored
Use blocks v3 endpoint in the VC (#4813)
* block v3 endpoint init * block v3 flow * block v3 flow * continue refactor * the full flow... * add api logic * add api logic * add new endpoint version * added v3 endpoint * some debugging * merge v2 flow with v3 * debugging * tests passing * tests passing * revert cargo lock * initial v3 test * blinded payload test case passing * fix clippy issues * cleanup * cleanup * remove dead code * fixed logs * add block value * block value fix * linting * merge unstable * refactor * add consensus block value * lint * update header name to consensus block value * prevent setting the participation flag * clone get_epoch_participation result * fmt * clone epoch participation outside of the loop * add block v3 to vc * add v3 logic into vc * add produce-block-v3 * refactor based on feedback * update * remove comments * refactor * header bugfix * fmt * resolve merge conflicts * fix merge * fix merge * refactor * refactor * cleanup * lint * changes based on feedback * revert * remove block v3 fallback to v2 * publish_block_v3 should return irrecoveerable errors * comments * comments * fixed issues from merge * merge conflicts * Don't activate at fork; support builder_proposals * Update CLI flags & book * Remove duplicate `current_slot` parameter in `publish_block` function, and remove unnecessary clone. * Revert changes on making block errors irrecoverable. --------- Co-authored-by: Michael Sproul <[email protected]> Co-authored-by: Jimmy Chen <[email protected]>
1 parent f70c32e commit 5c8c8da

File tree

6 files changed

+347
-97
lines changed

6 files changed

+347
-97
lines changed

book/src/help_vc.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ FLAGS:
5656
machine. Note that logs can often contain sensitive information about your validator and so this flag should
5757
be used with caution. For Windows users, the log file permissions will be inherited from the parent folder.
5858
--metrics Enable the Prometheus metrics HTTP server. Disabled by default.
59+
--produce-block-v3
60+
Enable block production via the block v3 endpoint for this validator client. This should only be enabled
61+
when paired with a beacon node that has this endpoint implemented. This flag will be enabled by default in
62+
future.
5963
--unencrypted-http-transport
6064
This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a
6165
custom HTTP address is unsafe.

lighthouse/tests/validator_client.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,21 @@ fn no_doppelganger_protection_flag() {
421421
.run()
422422
.with_config(|config| assert!(!config.enable_doppelganger_protection));
423423
}
424+
#[test]
425+
fn produce_block_v3_flag() {
426+
CommandLineTest::new()
427+
.flag("produce-block-v3", None)
428+
.run()
429+
.with_config(|config| assert!(config.produce_block_v3));
430+
}
431+
432+
#[test]
433+
fn no_produce_block_v3_flag() {
434+
CommandLineTest::new()
435+
.run()
436+
.with_config(|config| assert!(!config.produce_block_v3));
437+
}
438+
424439
#[test]
425440
fn no_gas_limit_flag() {
426441
CommandLineTest::new()

0 commit comments

Comments
 (0)