Node/Solana: TX for account #4350
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the Solana watcher so that it can use the
getSignaturesForAddress
RPC call to poll for Wormhole observations, and enables the feature for Fogo. (This is the technique used in the dashboard monitor.)Note that this PR does not affect the behavior for either Solana or Pyth.
The hope is that this technique will work better than the current technique of polling for every block, given Fogo's short block time.
Each interval (one second), it polls for the latest slot, determines the range of transactions (but not the complete list of transactions) since the last interval, and uses the above mentioned RPC call to read all transactions involving the Core contract within that range of transactions. If it finds any transactions involving the Core contract, it uses the standard transaction processing code to observe any messages.
This PR also adds the transaction signature to the "message observed" log message, to help with debugging and reobservation.