-
Notifications
You must be signed in to change notification settings - Fork 217
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
Better error handling and recovery when using custom batch pin functionality #1255
Labels
enhancement
New feature or request
Comments
Some ideas for specific things that could be investigated to solve these problems:
|
One thing not on the list, that I'd like your thought on @awrichar:
This might go some way to solving (1) "detection API", and also when combined with with (3) "gap fill" API I wonder if this gives the narrower scope of failure that we need. |
@peterbroadhurst yes I think that's (4) 🙂 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part of FIR-17
Follow-on to #1213
One major issue with the functionality added in the PR above is that it's possible to get into a bad situation that prevents FireFly from dispatching new messages within particular constraints. Specifically, if these criteria are met:
/invoke
request which includes amessage
, per the new added functionalitythen the message batch will be built, sealed, and sent to the smart contract, but the blockchain transaction will fail. This will be retried forever, failing every time, and blocking the batch processor from processing more work (see below for details of the blockage).
FireFly creates "batch processors" to assemble and dispatch message batches. One is created for each unique combination of these dimensions:
In the "blocked" scenario described, no more messages for the blocked processor will be processed. Since this is limited to the new transaction type
contract_invoke_pin
, effective blockage scopes might be:contract_invoke_pin
broadcasts from a particular identitycontract_invoke_pin
private messages from a particular identity to a particular privacy groupThis is a very large scope of blockage - notably it is well beyond the scope of a single topic or ordering context.
In addition, for private messages, each message will claim a nonce/pin for each of its contexts (where a context is a unique combination of a topic and a group hash). If such a pin is assigned but never successfully dispatched, this will effectively kill that topic, as pins need to be processed sequentially, and a gap of this kind means no further message from that author will be honored.
Before the next feature release, we need some investigation into how the scope of such a blockage can be limited, how a user can most effectively avoid getting into this situation, and how a user can recover if this does happen.
The text was updated successfully, but these errors were encountered: