mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 05:44:44 +00:00
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 <michael@sigmaprime.io> Co-authored-by: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -97,6 +97,7 @@ pub struct ValidatorStore<T, E: EthSpec> {
|
||||
fee_recipient_process: Option<Address>,
|
||||
gas_limit: Option<u64>,
|
||||
builder_proposals: bool,
|
||||
produce_block_v3: bool,
|
||||
task_executor: TaskExecutor,
|
||||
_phantom: PhantomData<E>,
|
||||
}
|
||||
@@ -128,6 +129,7 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore<T, E> {
|
||||
fee_recipient_process: config.fee_recipient,
|
||||
gas_limit: config.gas_limit,
|
||||
builder_proposals: config.builder_proposals,
|
||||
produce_block_v3: config.produce_block_v3,
|
||||
task_executor,
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
@@ -336,6 +338,10 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore<T, E> {
|
||||
self.spec.fork_at_epoch(epoch)
|
||||
}
|
||||
|
||||
pub fn produce_block_v3(&self) -> bool {
|
||||
self.produce_block_v3
|
||||
}
|
||||
|
||||
/// Returns a `SigningMethod` for `validator_pubkey` *only if* that validator is considered safe
|
||||
/// by doppelganger protection.
|
||||
fn doppelganger_checked_signing_method(
|
||||
|
||||
Reference in New Issue
Block a user