node/watchers/solana: pythnet safety carve out
This commit is contained in:
parent
140e8a08d7
commit
4bfcb89d4c
|
@ -822,6 +822,8 @@ func (s *SolanaWatcher) processMessageAccount(logger *zap.Logger, data []byte, a
|
|||
return
|
||||
}
|
||||
|
||||
// As of 2023-11-09, Pythnet has a bug which is not zeroing out these fields appropriately. This carve out should be removed after a fix is deployed.
|
||||
if s.chainID != vaa.ChainIDPythNet {
|
||||
// SECURITY: ensure these fields are zeroed out. in the legacy solana program they were always zero, and in the 2023 rewrite they are zeroed once the account is finalized
|
||||
if !bytes.Equal(proposal.EmitterAuthority.Bytes(), emptyAddressBytes) || proposal.MessageStatus != 0 || !bytes.Equal(proposal.Gap[:], emptyGapBytes) {
|
||||
solanaAccountSkips.WithLabelValues(s.networkName, "unfinalized_account").Inc()
|
||||
|
@ -831,6 +833,7 @@ func (s *SolanaWatcher) processMessageAccount(logger *zap.Logger, data []byte, a
|
|||
zap.Binary("data", data))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var txHash eth_common.Hash
|
||||
copy(txHash[:], acc[:])
|
||||
|
|
Loading…
Reference in New Issue