Repository navigation
Fix: 4 issues (#947, #948, #949, #957) - #992
Merged
Kingsman-99 merged 2 commits intoOct 19, 2026
Merged
Conversation
Co-authored-by: Simple Agent <agent@simple.dev>
|
@spotkorner-dot 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! 🚀 |
5 tasks
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.
Closes #947
Closes #948
Closes #949
Closes #957
Issues
#947 Optimize math operations
#948 Implement incremental state updates
#949 Add storage tier optimization
#957 Add guard failure events
Summary
Fixed-point work (#947) must preserve exact accuracy: keep the canonical 7-decimal scale and checked arithmetic, and verify the largest-remainder sum invariant. Incremental updates (#948) should read-modify-write single keys and must be proven equivalent to full rewrites via tests. Storage tier changes (#949) must keep the key-uniqueness tests green and avoid moving hot payment-path data out of instance storage. Guard-failure events (#957) must be emitted before returning errors at every release guard site, with stable topics and payloads for indexers. Run all CI checks (unit, property, fuzz, compute-budget, event-log, storage-rent) before review.
Changes
FixedPointtype (scaled by 10^CANONICAL_DECIMALS) with checked add/sub/mul/div helpers and conversion to/from i128, and route the existing normalize/denormalize helpers through it. Add unit tests for overflow, rounding and round-trip accuracy. This replaces general integer math in the split contract with cheaper fixed-point operations (Optimize math operations #947). (contracts/split/src/math.rs)sum(result) == totalinvariant and exact accuracy. Add unit tests covering rounding and overflow paths. (contracts/split/src/calc.rs)guard_failed(env, guard: Symbol, invoice_id: u64, data)) with topics(split, guard_fail, guard)and payload including guard identifier and relevant data, plus any helper to enumerate guard names. Ensure the event is indexable and documented alongside existing events. (contracts/split/src/events.rs)