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

Initial codebase review for FireFly Transaction Manager #2

Merged
merged 16 commits into from
Apr 20, 2022

Conversation

peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Apr 19, 2022

This is a unit tested base set of functionality for the FireFly transaction manager for review.

Aligns with high level design outlined in hyperledger/firefly-ethconnect#149 (comment)

The architecture is summarized as follows:

  • New FireFly Transaction Manager runtime
    • Operates as a microservice extension of the FireFly Core
    • Uses the operation resource within FireFly Core to store and update state
    • Runs as a singleton and is responsible for nonce assignment
    • Takes as much heavy lifting away from blockchain specific connectors as possible
  • Lightweight FireFly Connector API (ffcapi)
    • Simple synchronous RPC operations that map to the most common operations supported across public blockchain technologies
    • Examples:
      • Find the next nonce for a given signing key
      • Serialize a transaction from a set of JSON inputs and an interface definition
      • Submit an un-signed transaction with a given gas price to the blockchain, via a signing wallet
      • Establish a new block listener
      • Poll for new blocks
      • Establish a new event log listener
      • Poll for new events
  • Pluggable Policy Engine
    • Invoked to make decisions on transaction submission
    • Responsible for gas price calculation
    • Able to intervene and adjust the characteristics of signing/submission
    • OSS reference implementation provided with Gas Station REST API integration
  • Confirmation Manager
    • Extracted from the Ethconnect codebase
    • Coupled to both transaction submission and event confirmation
    • Embeds an efficient block cache
  • Event Streams - _not yet completed
    • Extracted from the Ethconnect codebase
    • Checkpoint restart based reliable at-least-once delivery of events
    • WebSockets interface upstream to FireFly Core

peterbroadhurst and others added 14 commits April 19, 2022 08:20
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Ry Jones <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
@awrichar
Copy link
Contributor

Thanks for posting this - I've gone over the high level and it seems to match what we've discussed for this piece. I'm still going over the changes in more detail to see if I have any questions/concerns, but so far looks like a very good baseline.

@peterbroadhurst peterbroadhurst merged commit 4b8046d into main Apr 20, 2022
@peterbroadhurst peterbroadhurst deleted the initial2 branch April 20, 2022 12:28
Chengxuan added a commit that referenced this pull request Feb 23, 2023
Define persistence interface in one place
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.

3 participants