From ea5ed70aeb48962685ace395384a3be810b19be6 Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Mon, 11 Nov 2024 11:47:26 -0600 Subject: [PATCH] don't penalize for tree mismatch --- .../intrinsics/token/application/token_handle_mint.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/node/execution/intrinsics/token/application/token_handle_mint.go b/node/execution/intrinsics/token/application/token_handle_mint.go index c111043..d66a2b7 100644 --- a/node/execution/intrinsics/token/application/token_handle_mint.go +++ b/node/execution/intrinsics/token/application/token_handle_mint.go @@ -256,6 +256,7 @@ func (a *TokenApplication) handleMint( return nil, errors.Wrap(ErrInvalidStateTransition, "handle mint") } + wesoVerified := true if verified && delete != nil && len(t.Proofs) > 3 { newFrame, _, err := a.ClockStore.GetDataClockFrame( frame.Filter, @@ -339,7 +340,7 @@ func (a *TokenApplication) handleMint( zap.Uint64("frame_number", currentFrameNumber), ) // we want this to still apply the next commit even if this proof failed - verified = false + wesoVerified = false } } @@ -355,7 +356,7 @@ func (a *TokenApplication) handleMint( }, ) } - if verified && delete != nil && len(t.Proofs) > 3 { + if verified && delete != nil && len(t.Proofs) > 3 && wesoVerified { storage := PomwBasis(1, ring, currentFrameNumber) storage.Quo(storage, big.NewInt(int64(parallelismMap[ring]))) storage.Mul(storage, big.NewInt(int64(parallelism))) @@ -431,7 +432,7 @@ func (a *TokenApplication) handleMint( }, }, ) - if !verified { + if !wesoVerified { outputs = append(outputs, &protobufs.TokenOutput{ Output: &protobufs.TokenOutput_Penalty{ Penalty: &protobufs.ProverPenalty{