Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect a transaction when created #352

Open
gipsh opened this issue May 28, 2023 · 1 comment
Open

Detect a transaction when created #352

gipsh opened this issue May 28, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@gipsh
Copy link
Contributor

gipsh commented May 28, 2023

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.

Take a look at watcher impl for inspiration here

(discuss implementation details with the team)

@gipsh gipsh added the draft label May 28, 2023
@hernandiegosavio hernandiegosavio added this to the v2 milestone May 30, 2023
@agodnic agodnic self-assigned this May 31, 2023
@agodnic
Copy link
Contributor

agodnic commented Jun 2, 2023

Breakdown into actionable tasks:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants