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:
tx created (waiting for finality or consistency level defined)
tx finalized (observation started to arrive)
signed vaa emitted (obs count > 15)
vaa relayed
vaa redemeed
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.
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)