mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-05-02 03:02:54 -04:00
Only Create Deposit Proofs Pre-Genesis (#9289)
* remove proof gen * fix pre-genesis case Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -140,14 +140,16 @@ func (s *Service) ProcessDepositLog(ctx context.Context, depositLog gethTypes.Lo
|
||||
}
|
||||
s.depositTrie.Insert(depositHash[:], int(index))
|
||||
|
||||
proof, err := s.depositTrie.MerkleProof(int(index))
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Unable to generate merkle proof for deposit")
|
||||
}
|
||||
|
||||
deposit := ðpb.Deposit{
|
||||
Data: depositData,
|
||||
Proof: proof,
|
||||
Data: depositData,
|
||||
}
|
||||
// Only generate the proofs during pre-genesis.
|
||||
if !s.chainStartData.Chainstarted {
|
||||
proof, err := s.depositTrie.MerkleProof(int(index))
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Unable to generate merkle proof for deposit")
|
||||
}
|
||||
deposit.Proof = proof
|
||||
}
|
||||
|
||||
// We always store all historical deposits in the DB.
|
||||
|
||||
Reference in New Issue
Block a user