Fix sync protocol next_sync_committee_branch verification and remove active header#2829
Fix sync protocol next_sync_committee_branch verification and remove active header#2829
next_sync_committee_branch verification and remove active header#2829Conversation
next_sync_committee_branch verification and and remove active headernext_sync_committee_branch verification and remove active header
|
The changes seem a bit rushed to me.
Re perspective of builder:
Other related PRs (building on top of the previous approach, but the edge cases are discussed there as well): |
|
Agree with @etan-status on most points. In regular mainnet conditions we can always wait for a finalized update which gives you the highest security guarantee at no extra cost |
|
The work here is covered by #2932 |
|
closing in favor of #2932 |
Discussed with @vbuterin today:
update.next_sync_committee_branchMerkle branch verification, it should be onattested_headerrather than usingactive_headerthat may befinalized_header.update_periodshould be fromattested_headerrather than usingactive_header.apply_light_client_updateintoupdate_sync_committees_from_updateandupdate_new_finalized_header.LightClientUpdatebuilder, no need to fill emptynext_sync_committee_branch.From the perspective of a
LightClientUpdatebuilder:attested_headerwith the recent block headerattested_headerstate should point to thefinalized_checkpointnext_sync_committeeandnext_sync_committee_branchnext_sync_committeeandnext_sync_committee_branchcorresponding toattested_headerfinalized_header != BeaconBlockHeader()finality_branchcorresponding to the state of theattested_headerfinalized_headerwithBeaconBlockHeader()finality_branchwith[Bytes32() for _ in range(floorlog2(FINALIZED_ROOT_INDEX))]sync_aggregateis always theSyncAggregateofattested_headerfork_versionis forsync_aggregate/cc @etan-status @jinfwhuang @dapplion if you have time to review :)