diff --git a/node/pkg/processor/cleanup.go b/node/pkg/processor/cleanup.go index aa883109..47bad537 100644 --- a/node/pkg/processor/cleanup.go +++ b/node/pkg/processor/cleanup.go @@ -3,6 +3,7 @@ package processor import ( "context" "github.com/certusone/wormhole/node/pkg/common" + "github.com/certusone/wormhole/node/pkg/vaa" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "time" @@ -57,7 +58,6 @@ func (p *Processor) handleCleanup(ctx context.Context) { // arrive, barring special circumstances. This is a better time to count misses than submission, // because we submit right when we quorum rather than waiting for all observations to arrive. s.settled = true - p.logger.Info("VAA considered settled", zap.String("digest", hash)) // Use either the most recent (in case of a VAA we haven't seen) or stored gs, if available. var gs *common.GuardianSet @@ -67,6 +67,23 @@ func (p *Processor) handleCleanup(ctx context.Context) { gs = p.gs } + hasSigs := len(s.signatures) + wantSigs := CalculateQuorum(len(gs.Keys)) + + var chain vaa.ChainID + if s.ourVAA != nil { + chain = s.ourVAA.EmitterChain + } + + p.logger.Info("VAA considered settled", + zap.String("digest", hash), + zap.Duration("delta", delta), + zap.Int("have_sigs", hasSigs), + zap.Int("required_sigs", wantSigs), + zap.Bool("quorum", hasSigs >= wantSigs), + zap.Stringer("emitter_chain", chain), + ) + for _, k := range gs.Keys { if _, ok := s.signatures[k]; ok { aggregationStateFulfillment.WithLabelValues(k.Hex(), s.source, "present").Inc() diff --git a/node/pkg/vaa/structs.go b/node/pkg/vaa/structs.go index 4bb36be3..8378e42c 100644 --- a/node/pkg/vaa/structs.go +++ b/node/pkg/vaa/structs.go @@ -81,6 +81,8 @@ func (a SignatureData) String() string { func (c ChainID) String() string { switch c { + case 0: + return "unset" case ChainIDSolana: return "solana" case ChainIDEthereum: