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

Don't send message to Ethereum with zero rewards #847

Merged
merged 10 commits into from
Feb 7, 2025

Conversation

nanocryk
Copy link
Contributor

@nanocryk nanocryk commented Feb 5, 2025

  • Early return if token inflation or points are zero.
  • Refactor the code to favor if-guard style (if => early return, avoid nesting)
  • Update tests that assumed message was always emitted

@nanocryk nanocryk added A3-inprogress Pull request is in progress. No review needed at this stage. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Feb 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

WASM runtime size check:

Compared to target branch

dancebox runtime: 1416 KB (no changes) ✅

flashbox runtime: 824 KB (no changes) ✅

dancelight runtime: 2176 KB (no changes) ✅

container chain template simple runtime: 1116 KB (no changes) ✅

container chain template frontier runtime: 1404 KB (no changes) ✅

@nanocryk nanocryk marked this pull request as ready for review February 5, 2025 10:59
Copy link
Contributor

github-actions bot commented Feb 5, 2025

Coverage Report

(master)

@@                              Coverage Diff                              @@
##           master   jeremy-dont-send-message-for-zero-rewards      +/-   ##
=============================================================================
+ Coverage   66.04%                                      66.10%   +0.06%     
  Files         335                                         335              
+ Lines       58850                                       58933      +83     
=============================================================================
+ Hits        38866                                       38957      +91     
- Misses      19984                                       19976       -8     
Files Changed Coverage
/chains/orchestrator-relays/runtime/dancelight/src/genesis_config_presets.rs 60.09% (+0.06%)
/chains/orchestrator-relays/runtime/dancelight/src/lib.rs 69.06% (+0.45%)
/chains/orchestrator-relays/runtime/dancelight/src/tests/common/mod.rs 97.55% (+0.18%)
/chains/orchestrator-relays/runtime/dancelight/src/tests/slashes.rs 98.63% (+0.05%)
/pallets/external-validators/src/lib.rs 91.03% (+0.18%)
/pallets/external-validators-rewards/src/lib.rs 88.54% (+0.68%)

Coverage generated Fri Feb 7 14:33:01 UTC 2025

@girazoki girazoki added this pull request to the merge queue Feb 7, 2025
Merged via the queue into master with commit fae9632 Feb 7, 2025
41 checks passed
@girazoki girazoki deleted the jeremy-dont-send-message-for-zero-rewards branch February 7, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A3-inprogress Pull request is in progress. No review needed at this stage. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants