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
Implement complete SubmissionManager with expiry dedupe cache #6646
Conversation
Signed-off-by: Richard Bair <rbair23@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: Richard Bair <rbair23@users.noreply.github.com>
Signed-off-by: Richard Bair <rbair23@users.noreply.github.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #6646 +/- ##
==============================================
+ Coverage 67.93% 90.73% +22.79%
+ Complexity 22545 17524 -5021
==============================================
Files 2092 1390 -702
Lines 137030 50501 -86529
Branches 7788 5093 -2695
==============================================
- Hits 93088 45820 -47268
+ Misses 42424 3711 -38713
+ Partials 1518 970 -548
☔ View full report in Codecov by Sentry. |
SonarCloud Quality Gate failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
Signed-off-by: Richard Bair <rbair23@users.noreply.github.com>
Closes #6636
SubmissionManager
can ignore theRecordCache
and have its own expiry cache. This makes it really easy to understand the behavior of the system and nullifies some potential problems with dishonest nodes. Most importantly, the question theSubmissionManager
has to answer is "Have I seen this transaction ID submitted to me already?". It needs to answer this question because the node does not want to submit duplicate transactions (since if it does, it has to pay for it). It doesn't need to know anything about what transactions other nodes have seen or what the ultimate resolution of a transaction is. It just needs to say "within the valid transaction ID lifespan, have I seen this transaction submitted by a user before"? This allows us to keep the implementation very simple and decoupled from theRecordCache
.