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

fix(BUX-461) fee quotes for both arc and mAPI with user defined fee quote #403

Merged
merged 9 commits into from
Jan 12, 2024

Conversation

chris-4chain
Copy link
Contributor

@chris-4chain chris-4chain commented Jan 11, 2024

Pull Request Checklist

  • πŸ“– I created my PR using provided : CODE_STANDARDS
  • πŸ“– I have read the short Code of Conduct: CODE_OF_CONDUCT
  • 🏠 I tested my changes locally.
  • βœ… I have provided tests for my changes.
  • πŸ“ I have used conventional commits.
  • πŸ“— I have updated any related documentation.
  • πŸ’Ύ PR was issued based on the Github or Jira issue.

This new version introduces new config field: nodes.fee_unit and moves nodes.mapi.use_fee_quotes to nodes.use_fee_quotes. This change is made because the setting is now applicable to both the ARC and mAPI protocols.

When nodes.fee_unit is defined, it will be used as the offered fee to miners when use_fee_quotes is disabled.
However, by default, use_fee_quotes is enabled, so during the initialization stage, the lowest fee among the fee quotes from configured miners will be selected.

When neither nodes.use_fee_quotes nor nodes.fee_unit is set, the config validation will fail and the application won't start.

Requires new bux version (BuxOrg/bux#533)

@chris-4chain chris-4chain requested a review from a team as a code owner January 11, 2024 12:49
@mergify mergify bot added the bug-P3 Lowest rated bug, affects nearly none or low-impact label Jan 11, 2024
Copy link
Contributor

mergify bot commented Jan 11, 2024

Welcome to our open-source project @chris-4chain! πŸ’˜

Copy link
Contributor

@Nazarii-4chain Nazarii-4chain left a comment

Choose a reason for hiding this comment

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

Please check tests

@chris-4chain
Copy link
Contributor Author

chris-4chain commented Jan 12, 2024

Tests will pass after bux PR and a new release with 0.13.0 version.

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (85cbe7a) 40.18% compared to head (b5f0a56) 40.61%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #403      +/-   ##
==========================================
+ Coverage   40.18%   40.61%   +0.42%     
==========================================
  Files          46       46              
  Lines        1640     1667      +27     
==========================================
+ Hits          659      677      +18     
- Misses        944      950       +6     
- Partials       37       40       +3     
Flag Coverage Ξ”
unittests 40.61% <67.56%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Ξ”
config/config.go 100.00% <ΓΈ> (ΓΈ)
config/defaults.go 100.00% <100.00%> (ΓΈ)
config/validate.go 88.00% <0.00%> (-12.00%) ⬇️
config/validate_nodes.go 87.23% <88.00%> (-1.23%) ⬇️
config/services.go 43.77% <25.00%> (-0.07%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 85cbe7a...b5f0a56. Read the comment docs.

@chris-4chain chris-4chain merged commit eda28a6 into master Jan 12, 2024
10 checks passed
@chris-4chain chris-4chain deleted the fix-461-arc-fee-quotes branch January 12, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-P3 Lowest rated bug, affects nearly none or low-impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants