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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

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: 1412 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                                       58941      +91     
=============================================================================
+ Hits        38866                                       38960      +94     
- Misses      19984                                       19981       -3     
Files Changed Coverage
/chains/container-chains/runtime-templates/frontier/src/lib.rs 57.57% (-0.08%)
/chains/orchestrator-paras/runtime/dancebox/src/weights/pallet_author_noting.rs 53.66% (+3.66%)
/chains/orchestrator-paras/runtime/dancebox/src/weights/pallet_balances.rs 36.36% (-0.75%)
/chains/orchestrator-paras/runtime/flashbox/src/weights/pallet_author_noting.rs 34.15% (+2.33%)
/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%)
/chains/orchestrator-relays/runtime/dancelight/src/weights/pallet_author_noting.rs 34.15% (+2.33%)
/chains/orchestrator-relays/runtime/dancelight/src/weights/pallet_xcm.rs 4.07% (-0.05%)
/chains/orchestrator-relays/runtime/dancelight/src/weights/runtime_parachains_paras_inherent.rs 58.82% (+2.57%)
/pallets/external-validators/src/lib.rs 91.03% (+0.18%)
/pallets/external-validators-rewards/src/lib.rs 88.54% (+0.68%)

Coverage generated Wed Feb 5 16:26:25 UTC 2025

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.

2 participants