Skip to content

Commit

Permalink
Merge pull request #23 from EspressoSystems/fix/aggregator
Browse files Browse the repository at this point in the history
Fix liveness bug in aggregator error handling
  • Loading branch information
jbearer authored Feb 13, 2023
2 parents 372cc59 + e66f0b1 commit ac693fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,17 @@ func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface
// build the final proof. If no proof is provided it looks for a previously
// generated proof. If the proof is eligible, then the final proof generation
// is triggered.
func (a *Aggregator) tryBuildFinalProof(ctx context.Context, prover proverInterface, proof *state.Proof) (bool, error) {
func (a *Aggregator) tryBuildFinalProof(ctx context.Context, prover proverInterface, proof *state.Proof) (proofBuilt bool, err error) {
log.Debugf("tryBuildFinalProof start prover { ID [%s], addr [%s] }", prover.ID(), prover.Addr())

var err error
if !a.canVerifyProof() {
log.Debug("Time to verify proof not reached")
return false, nil
}
log.Debug("Send final proof time reached")

defer func() {
if err != nil {
if !proofBuilt {
a.enableProofVerification()
}
}()
Expand Down
2 changes: 1 addition & 1 deletion test/config/test.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ MaxAllowedFailedCounter = 50
Host = "0.0.0.0"
Port = 50081
RetryTime = "5s"
VerifyProofInterval = "90s"
VerifyProofInterval = "5s"
TxProfitabilityCheckerType = "acceptall"
TxProfitabilityMinReward = "1.1"
ProofStatePollingInterval = "5s"
Expand Down

0 comments on commit ac693fc

Please sign in to comment.