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

Require policy engines to map failures during submission to idempotency #104

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Dec 21, 2023

See hyperledger/firefly#1435

The implementation here:

  • Requires the policy manager implementations to return a new boolean
  • Provides a mapping from the ErrorReason information that FFCAPI implementations already provide
  • Uses a submissionRejected boolean on the response back to core (so false means it is retryable)
  • Updates to latest firefly-common

…nRejected bool

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (66e6593) 99.94% compared to head (af513fc) 99.94%.

❗ Current head af513fc differs from pull request most recent head 8bcd0d4. Consider uploading reports for the commit 8bcd0d4 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #104   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files          79       80    +1     
  Lines        5177     5182    +5     
=======================================
+ Hits         5174     5179    +5     
  Misses          3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

case ErrorReasonInvalidInputs,
ErrorReasonTransactionReverted,
ErrorReasonInsufficientFunds:
// These reason codes are considered as rejections of the transaction - see ffcapi.SubmissionError
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels like the most significant part of the change. This list seems good from what I can tell though.

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@peterbroadhurst peterbroadhurst merged commit 4dc70d4 into main Dec 21, 2023
2 checks passed
@peterbroadhurst peterbroadhurst deleted the submission-reject branch December 21, 2023 19:36
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