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

Proposal for enhancing historical information of Operations in FireFly for DX and other plugins #535

Open
gabriel-indik opened this issue Feb 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@gabriel-indik
Copy link
Contributor

When data exchange events are received, they contain additional information under the "info" JSON object. Within a single operation there may be more than one data exchange event. Currently, when a new data exchange event comes in for an operation that already had a previous data exchange event, the "info" JSON object is overwritten. The logic should be changed in order to aggregate these objects as it will be important to see what that information was throughout the operation and in each of the data exchange events. More information can be found in #534 (review)

@peterbroadhurst peterbroadhurst changed the title DX info merging logic Proposal for enhancing historical information of Operations in FireFly for DX and other plugins Aug 10, 2022
@peterbroadhurst peterbroadhurst added the enhancement New feature or request label Aug 10, 2022
@peterbroadhurst
Copy link
Contributor

peterbroadhurst commented Aug 10, 2022

Just replaying my understanding.

Current behavior of FireFly operations as used by EVM Connect and FireFly Data Exchange implementations:

  • Operations have three states Pending,Succeeded, Failed
  • There are output and error fields to capture implementation specific detail related to these states
  • Plugin implementations (and by extension APIs exposed by those plugins to other microservices) replace the entire output section, each time there is a status change
  • Multiple updates can happen without changing states
  • The plugin implementation is responsible for merging any historical information into the latest state
  • Only the latest copy is kept in the database

Proposed enhancement:

  • Change the database structure for operations to have multiple output/error operation_status change records
  • Update the API to query these historical records
  • Change connectors like DX/EVMConnect that currently aggregate this data, to just provide minimal update history

Note that in EVMConnect, many of updates might occur for a single operations - as it works through submission, gas estimation, signing+sending to get a TX hash, confirmation tracking, possible re-submission at higher gas prices, obtaining a receipt, and finally getting confirmation.

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

No branches or pull requests

2 participants