Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat(prover): check guardian prover contract address (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Jan 11, 2024
1 parent 8f0b4c8 commit 3794caf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) {

// Guardian prover heartbeat sender
if p.IsGuardianProver() {
// Check guardian prover contract address is correct.
if _, err := p.rpc.GuardianProver.MinGuardians(&bind.CallOpts{Context: ctx}); err != nil {
return fmt.Errorf("failed to get MinGuardians from guardian prover contract: %w", err)
}

p.guardianProverSender = guardianproversender.New(
p.cfg.L1ProverPrivKey,
p.cfg.GuardianProverHealthCheckServerEndpoint,
Expand Down

0 comments on commit 3794caf

Please sign in to comment.