stacks-network / sbtc

Repo containing sbtc
GNU General Public License v3.0
260 stars 5 forks source link

[Feature]: Emily Event Observer Sidecar #340

Open AshtonStephens opened 3 months ago

AshtonStephens commented 3 months ago

Feature - Emily Event Observer Sidecar

1. Description

This ticket is to implement the Emily event observer which will update the API with events that are considered trusted.

How to handle the events is linked below:

1.1 Context & Purpose

The API sidecar will ingest the information required to update operation status based on the event data printed to chain and sent to the event observer. The sBTC operation clarity contracts will need to publish specific information about a transaction’s status when processing an sBTC operation.

This Sidecar will be updating the API database to be consistent.

2. Technical Details:

Technical details are in the link above, reposting here:

2.1 Acceptance Criteria:

3. Related Issues and Pull Requests (optional):

djordon commented 3 months ago

Hmm, might be simpler than we think to do this. I was just looking and it looks like we might be able to specify that we only want smart-contract-events. I think these lines dictate the format.


Sorry, the above was terse, let me try this again.

I think we might be able to forgo building the sidecar and just have the stacks node send events directly to the lambda. I got this impression by looking here (I know that you know that stacks-core sends these event). But, then I found this example in stacks-core where it seems like we can watch print events from a contract. For us, we can just watch sbtc-registry print events and get everything that we want.

Well, I'm probably missing something here, so let me know what you think.

AshtonStephens commented 3 months ago

This totally makes sense, @jovanvuleta are you familiar with how to execute the smart contracts on a local environment?

jovanvuleta commented 3 months ago

Until now I have been deploying our contracts via clarinet deployment command, will I be able to do the same here or is the flow different? @AshtonStephens

AshtonStephens commented 2 weeks ago

Look here for some existing sidecar code: signer/src/stacks/webhooks.rs

AshtonStephens commented 1 week ago

This may be best doable in the sBTC Signer, design issue linked #687