You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up task to #12020.
These 2 fields are not verified yet, because #11931 might need to be tackled first:
// The last two block headers are also needed for various purposes after epoch sync.
// TODO(#11931): do we really need these?
pub last_block_header_in_prev_epoch: BlockHeader,
pub second_last_block_header_in_prev_epoch: BlockHeader,
The text was updated successfully, but these errors were encountered:
staffik
changed the title
[Epoch Sync] Validate 2 last block headers in prev epoch
[Epoch Sync] Verify 2 last block headers in prev epoch
Oct 18, 2024
Issue: #11932
Implements EpochSyncProof validation, according to:
- [design
doc](https://docs.google.com/document/d/14Itc9Hs7ewTRmcGANid9UCaYcJzaLzzM7FsvYYIFKDY/edit#heading=h.p2oiicluwd6o)
-
[`epoch_sync.rs`](https://github.com/near/nearcore/blob/d6d6e4782f7d57a7b7acc2894e1668355012ff74/core/primitives/src/epoch_sync.rs)
Summary:
- Move block merkle proof retrieval logic from `Chain` to a separate
trait (`MerkleProofAccess`). Make `Store` implements this trait so that
we can `get_block_proof` while serving `EpochSyncRequest` from a
separate thread and having no access to `Chain`.
- Refactor `verify_approval` and `compute_bp_hash` so that we can use it
for proof validation.
- Derive `first_block_info_in_epoch` from block header.
- Implement the validation logic.
- Add 2 more fields to the proof
- `EpochSyncProofPastEpochData::protocol_version`
- `merkle_proof_for_first_block` generated at height of final block of
current epoch.
- Apparently, we need to add even more to enable generating
`merkle_proof_for_first_block` at the bootstrapped node. That will be
done as a follow-up issue:
#12255.
- Create a bunch of follow-up issues (added to the [tracking
issue](near/near-one-project-tracking#73)):
- #12255
- #12256
- #12258
- #12259
- #12260
Description
Follow-up task to #12020.
These 2 fields are not verified yet, because #11931 might need to be tackled first:
The text was updated successfully, but these errors were encountered: