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

FIR-18: Blockchain confirmation listeners #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented May 8, 2024

Putting my proposal in a comment for now, and will work through discussion in the Github item before working to finalize the FIR document

Currently in FireFly you can:

  • Listen for a reliable stream blockchain events emitted from successfully executed smart contract logic.
  • Get a success/failure event from an operation that you submit via your particular FireFly server

However, there is a common pattern of programming that is not well served by this:

  • Listen for all confirmed transactions (maybe matching some criteria)
  • Query the events associated with that receipt
  • Determine whether you want to process the events associated with that receipt

This requires a reliable ordered stream of receipts that are delivered in the order they are confirmed on the blockchain (the block containing them pass a point of finality), and the ability to decode the events associated with that receipt.

This issue proposes we:

  • Design+add this new capability to the FFTM connector toolkit, as an optional feature a connector can implement
  • Implement this feature in EVMConnnect
  • Design+add a new Blockchain confirmations collection into FireFly core with appropriate listening/filtering
  • Design+add a new semantic for decoding blockchain events on-demand into FireFly core

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@peterbroadhurst peterbroadhurst changed the title Start proposal FIR-18: Blockchain confirmation listeners May 8, 2024
Copy link

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The summary is quite concrete and happy with the proposal! I wonder if these FIR templates can be too long for such proposal as this one. Having to provide reference level explanation might be easier as you go an implement the feature for example

Comment on lines +38 to +60
# Guide-level explanation
[guide-level-explanation]: #guide-level-explanation

Explain the proposal as if it was already included in FireFly and you were
teaching it to another FireFly developer. That generally means:

- Introducing new named concepts.
- Explaining the feature largely in terms of examples.
- Explaining how FireFly programmers should *think* about the feature, and how
it should impact the way they use FireFly. It should explain the impact as
concretely as possible.
- If applicable, provide sample error messages, deprecation warnings, or
migration guidance.
- If applicable, describe the differences between teaching this to established
and new FireFly developers.
- If applicable, describe any changes that may affect the security of
communications or administration.

For implementation-oriented FIRs (e.g. for validator internals), this section
should focus on how contributors should think about the change, and give
examples of its concrete impact. For policy FIRs, this section should provide
an example-driven introduction to the policy, and explain its impact in
concrete terms.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you've talked this in the summary so might be worth just extending it a little bit with an example

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

Successfully merging this pull request may close these issues.

2 participants