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

fulfillment modes #47

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

fulfillment modes #47

wants to merge 7 commits into from

Conversation

zale144
Copy link
Collaborator

@zale144 zale144 commented Oct 6, 2024

Changes:

  • implement fulfillment modes: sequencer (existing default), p2p and settlement (missing API)
  • refresh and check balances after top-up
  • skip orders with no fees
  • add block height to demand order
  • introduce demand order pool
  • rework logic for adding demand orders for finalization
  • periodic store syncing is implemented by currently disabled
  • apart from listening to finalization events, added logic to periodically check for mature finalized orders
  • entire flow of the eibc-client covered with unit tests with minimal abstractions
  • add unit tests for the order tracker
  • cleanup and refactor
  • various abstractions
  • various bug fixes

General new behaviour:


  • in sequencer mode, the first batch is sent to the output channel, and the rest of the orders are added to the pool
  • in p2p and settlement mode, all orders are added to the pool. Then, the orders are periodically popped (fetched and deleted) from the pool and checked for validity.
    If the order is valid, it is sent to the output channel.
    If the order is not valid, it is added back to the pool.
    After the order validity deadline is expired, the order is removed permanently.
    Once an order is fulfilled, it is removed from the store

areas for improvement:

  • orders added to the pool for validating and fulfilling are not added to the store, the order is only added to the store once fulfilled. If the bot shuts down, the cached orders are lost, so the pool needs to be populated from the indexer again upon startup

@zale144 zale144 self-assigned this Oct 6, 2024
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.

1 participant