Skip to content

fix(rs-dpp): Remove overflows - #818

Closed
qrayven wants to merge 12 commits into
v0.24-devfrom
fix/remove-overflow
Closed

fix(rs-dpp): Remove overflows#818
qrayven wants to merge 12 commits into
v0.24-devfrom
fix/remove-overflow

Conversation

@qrayven

Copy link
Copy Markdown
Contributor

Removes potential overflows and unifies types for common fileds containg numbers

Issue being fixed or feature implemented

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@qrayvenqrayven changed the title Fix/remove-overflowfix(rs-dpp): Remove overflowsMar 14, 2023
@qrayven
qrayvenforce-pushed the fix/remove-overflow branch from 6502205 to 7ae7c6eCompareMarch 14, 2023 09:25
@qrayven

Copy link
Copy Markdown
ContributorAuthor

Closed due to of too many conflicts

@qrayvenqrayven closed this Mar 31, 2023
@shumkov
shumkov deleted the fix/remove-overflow branch August 25, 2024 08:51
bfoss765 added a commit to bfoss765/platform that referenced this pull request Aug 5, 2026
…field
The key-wallet pin bump takes key-wallet dashpay#818, which dropped
`generated_at` / `used_at` from `#[repr(C)] FFIAddressInfo`.
`build_ios.sh` regenerates that crate's cbindgen header into
DashSDKFFI.xcframework, so a fresh framework build left
AddressPool.swift referencing a member the C struct no longer has:
error: value of type 'FFIAddressInfo' has no member 'generated_at'
`generatedAt` is kept (public API, no in-repo or observable change)
and pinned to the Unix epoch. That is not a substituted value: every
key-wallet `AddressInfo` constructor set `generated_at: 0` ("Should
use actual timestamp"), so the property has always evaluated to the
epoch. Both it and `used` now document the new `AddressState` model,
including that a `Reserved` address reports `used == false` and that
reservation state is not observable across the C surface.
Also settles the persistence round-trip question raised in review.
`generated_at` / `used_at` were never serialized — `CoreAddressEntryFFI`
has no field for them, and `address_info_from_ffi` was the only
producer, from the literals `0` / `Some(0)` — so dropping them is
lossless. `Reserved { at }` genuinely has no slot in that schema and
would reload as `Available`, but nothing in platform reserves
addresses (no caller of `next_receive_address_and_reserve` /
`next_unused_and_reserve` in the workspace), so the loss is
unreachable today rather than live. The emit path now spells the
`Reserved` arm out and warns instead of silently flattening it, the
schema field documents the constraint, and a new test pins the
behavior so a future reserving caller surfaces as a schema decision.
Verified: `cargo check --workspace --all-targets` clean; platform-wallet
513 passed, platform-wallet-ffi 221 passed; rustfmt clean; scoped clippy
(the CI invocation) clean. Swift verified by type-checking the whole
SwiftDashSDK module under -swift-version 6 -warnings-as-errors against
the cbindgen headers regenerated from the new pin — clean, and the
pre-fix source reproduces the reviewer's exact error against the same
headers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
QuantumExplorer added a commit that referenced this pull request Aug 21, 2026
The pin moves past the direction-aligned merge so that grovedb #818
(verifier reads a synthesized path-component layer's direction off the
proof) is in the tree: without it a descending cursor proof either
fails subset verification with "Cannot verify lower bound of queried
range" or, on a key-bearing opening node, verifies to an empty result
set for a subtree that exists. Adaptations ride along:
- indexed-axis reads return IndexedAxisEntry<T> (ordering_value,
primary_key, resolved value) instead of (T, key) tuples; the ranked
and having executors and verifiers project to the ranking pair
- TreeType::PrivateDocumentStore arms fail closed in the two generic
empty-tree constructors (its entry size is not carried by TreeType)
- CommitmentTree::append_many_raw takes a GroveVersion
Fee goldens, query suites and the abci query tests are unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@qrayven