wormhole-foundation / wormhole-explorer

We could have named this super-parakeet. Tweet tweet.
Other
30 stars 28 forks source link

Detect a transaction when created #352

Open gipsh opened 1 year ago

gipsh commented 1 year ago

Currently we only detect a transaction when the first observation reach fly as we tap into the gossip network. There are some cases with chains with longer finally times (ie eth and polygon) where a tx is created but we wouldnt see an observation many minutes after the event.
This of course depends of the consistency level defined on the VAA but for token bridge its always finality .

So what we need is a way to represent better the life cycle of a vaa:

To achieve the first step is not enough to tap into gossip network, we will need to watch for node logs and detect the event of the tx creation or the publish message emitted by the contract.

Implementation

First step is to create a stand alone service. This service will connect to each node (for now only eth and polygon) and wait for messages from the core layer contract. Once a message is detected store it an wait for finality.

Provide an API to check if a TX is pending / finalized.

Take a look at watcher impl for inspiration here

(discuss implementation details with the team)

agodnic commented 1 year ago

Breakdown into actionable tasks: