-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix bugs related to fidelity registration and redemption #390
Conversation
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.
Concept ACK. Approach suggestion below.
d0c15f4
to
183c3db
Compare
20fe8ec
to
6b36ed5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #390 +/- ##
==========================================
+ Coverage 70.06% 70.71% +0.64%
==========================================
Files 34 34
Lines 4263 4258 -5
==========================================
+ Hits 2987 3011 +24
+ Misses 1276 1247 -29 ☔ View full report in Codecov by Sentry. |
6b36ed5
to
4ce52a3
Compare
fn manage_fidelity_bonds_and_update_dns( | ||
maker: &Maker, | ||
maker_addr: &str, | ||
dns_addr: &str, | ||
) -> Result<(), MakerError> { | ||
maker.wallet.write()?.redeem_expired_fidelity_bonds()?; | ||
|
||
let proof = setup_fidelity_bond(maker, maker_addr)?; | ||
|
||
// Check for swap liquidity | ||
check_swap_liquidity(maker)?; | ||
|
||
let dns_metadata = DnsMetadata { | ||
url: maker_address.clone(), | ||
url: maker_addr.to_string(), | ||
proof, | ||
}; | ||
|
||
let request = DnsRequest::Post { | ||
metadata: dns_metadata, | ||
}; |
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.
In every 10 min , Maker Server checks for fidelity bonds and make POST request to DNS which seems like spamming the DNS server as it makes the request even if it's fidelity proof doesn't change.
And we want to make this request so that DNS can sync with the maker's latest data and in case of DNS server failure.
So we can have a better logic :
- In every 10 min -> call this api, but make the POST request to DNS only when maker's fidleity proof change or at an interval of 1 day.
what do you think @mojoX911 ?
Solving 3 issues + some other changes in a single PR makes it bloated and hard to review. |
This PR addresses the following issues:
Additionally, it includes some auxiliary enhancements.
Note to Reviewers
Work left to be done: