feat: Stellar Wave – Issues #252, #253, #254, #258#265
Merged
elizabetheonoja-art merged 2 commits intoApr 28, 2026
Merged
Conversation
…ip#254, Utility-Drip#258 (Stellar Wave) Issue Utility-Drip#258 - Auto-Rent-Deduction: - Add RENT_DEDUCTION_STROOPS (1000 stroops) and TTL safety threshold constants - Hook in claim() to auto-deduct rent when TTL < 6-month threshold - Emit RentRenew event with deduction amount and new TTL - Skip silently for non-XLM tokens to avoid blocking streams Issue Utility-Drip#254 - Formal Proof: Per-Second Stream Exhaustion Invariant: - Add calculate_remaining_balance() pure helper with floor-division rounding - Add 4 fuzz tests: 100k randomised inputs, 10-year pause/resume simulation, rounding direction verification, exhaustive grid search - Create SECURITY.md with mathematical proof and auditor documentation Issue Utility-Drip#253 - Multi-Sig Technical Veto for IoT Fleet: - Add FleetSecurityCouncil struct (up to 5 members, 3-of-5 threshold) - Add StagedFleetUpdate struct with 48-hour staging window - Add register_fleet_council, stage_fleet_update, veto_fleet_update, execute_fleet_update, request_dao_council_rotation, finalize_dao_council_rotation, get_staged_update, get_fleet_council - Emergency bypass for circuit-breaker updates - 7-day DAO rotation delay for lost council keys Issue Utility-Drip#252 - Carbon-Credit Streaming: - Add CarbonCreditState struct with accumulated_slices, deferred_credits - Add CarbonCreditMinter cross-contract client interface - Hook in claim() to accumulate credit slices per green energy ratio - Cross-contract mint on full integer credit; defer on failure - Add set_green_energy_ratio, set_carbon_minter, retry_deferred_carbon_credits, get_carbon_credit_state functions Bug fixes: - Remove duplicate imports at top of lib.rs - Add missing is_closed field to Meter struct - Add missing green_energy_discount_bps and renewable fields in batch_register - Fix broken refresh_activity(meter) call (missing now parameter) - Fix duplicate get_provider_total_pool and get_watt_hours_display functions - Fix verify_usage_signature ? operator in non-Result function - Fix get_effective_rate called with wrong arity
|
@DanielCharis1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements all four Stellar Wave issues assigned to @DanielCharis1.
Issue #258 – Auto-Rent-Deduction for Protocol Storage
claim()that automatically deducts 1 000 stroops (0.0001 XLM) from the meter balance to extend the contract's ledger TTL.RentRenewevent with the deduction amount and new TTL.Issue #254 – Formal Proof: Per-Second Stream Exhaustion Invariant
calculate_remaining_balance()pure helper with floor-division rounding (always in favour of contract solvency).fuzz_tests.rs:test_stream_exhaustion_invariant_randomised– 100 000 randomised (balance, rate) pairs via deterministic LCGtest_stream_never_negative_after_pause_resume– 10-year simulation with pause/resume and partial top-upstest_rounding_always_favours_solvency– verifies floor-division rounding directiontest_calculate_remaining_balance_never_negative– exhaustive grid searchSECURITY.mdwith a mathematical proof of the invariant and auditor documentation.Issue #253 – Multi-Sig Technical Veto for IoT Fleet
FleetSecurityCouncil(up to 5 members, 3-of-5 threshold) andStagedFleetUpdatestructs.register_fleet_council,stage_fleet_update,veto_fleet_update,execute_fleet_update,request_dao_council_rotation,finalize_dao_council_rotation.FleetUpdateStaged,FleetUpdateVetoed,FleetUpdateExecevents.Issue #252 – Built-In Dynamic Carbon-Credit Streaming
CarbonCreditStatestruct andCarbonCreditMintercross-contract client interface.claim()accumulates credit slices:tokens_streamed × green_ratio × multiplier.Deferred_Issuancebuffer.set_green_energy_ratio,set_carbon_minter,retry_deferred_carbon_credits,get_carbon_credit_state.CarbonCreditsAccruedandCCDeferredevents.Bug Fixes (pre-existing)
useimports at top oflib.rsis_closedfield toMeterstructgreen_energy_discount_bpsandrenewable_*fields inbatch_register_metersrefresh_activity(meter)call (missingnowparameter)get_provider_total_poolandget_watt_hours_displayfunction definitionsverify_usage_signature?operator used in non-Resultfunctionget_effective_ratecalled with wrong arity indeduct_unitsTesting
fuzz_tests.rs(Issue Formal Proof: Per-Second Stream Exhaustion Invariant #254)test.rscovering Issues Built-In Dynamic "Carbon-Credit" Streaming #252, Implement Multi-Sig "Technical Veto" for IoT Fleet #253, Implement "Auto-Renew" for Protocol Storage Rent #258.github/workflows/test.yml