chore: drop origami_algebra and cubit, port origami_defi to fixed, set version 1.8.0 - #125
Merged
Merged
Conversation
…t version 1.8.0 - Remove the origami_algebra crate (superseded by nalgebra / glam on scarbs.xyz). - Port origami_defi from cubit (Q64.64) to the registry package fixed 0.4.0 (Q32.32), with overflow-safe exp/ln formulations; defi becomes publishable. - Set the workspace version to 1.8.0 and delete stale per-crate lockfiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bal7hazar
force-pushed
the
chore/drop-algebra-cubit-1.8.0
branch
from
September 27, 2026 13:45
4cfab6e to
466e4a6
Compare
- ContinuousGDA: divide by decay_constant last on a 128-bit product (mul_div) and compute the growth as decay_constant * (quantity / emission_rate). - DiscreteGDA: sum the exponents exactly with fixed::wide and divide by scale_factor - 1 last on a 128-bit product. - LogisticVRGDA: target sale time as time_scale * ln_1p(2 sold / (limit - sold)), which never forms limit + sold. - Reproduction tests for each case, domain limits documented on the public functions. - Housekeeping: ignore .snfoundry_cache, version 1.8.0 in the crate READMEs, origami_hexmap not published yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
origami_algebra: crate, workspace member, CI job and README entry removed. The README now points readers to thenalgebra/glampackages on scarbs.xyz.origami_defifromcubittofixed0.4.0 (registry).cubitis gone from the workspace,origami_defiis publishable and is in the CI packaging job.[workspace.package], and<version>→1.8.0in every README.crates/random/Scarb.lockandcrates/security/Scarb.lock. Rebased on feat(hexmap): origami_hexmap foundation (L0) #126 (hexmap), andorigami_hexmapis markedpublish = false(stubs until the facade lot)..snfoundry_cacheis ignored.API change (
origami_defi)Function names and argument order are unchanged. The
Fixedtype changes fromcubit::f128::types::fixed::Fixed(Q64.64) tofixed::Fixed(Q32.32,{ raw: i64 }, range[-2^31, 2^31)).New public item:
helpers::FixedStorePacking(StorePacking<Fixed, i64>). It lets the structs keep#[derive(starknet::Store)].Each public function now documents its remaining domain limits in a
# Domainsection.Audit follow-up (intermediate overflows where the result fits)
Each case is reproduced by a test with the exact failing input. Each test failed before the fix and passes after it.
initial_price / decay_constantcontinuous::test_price_small_decaydecay_constantlast, on an exact 128-bit product (helpers::mul_div)decay_constant * quantity / emission_ratecontinuous::test_price_large_quantitydecay_constant * (quantity / emission_rate)initial_price * (high - low) / (scale_factor - 1)discrete::test_price_large_initial_pricemul_div, and exponents summed exactly withfixed::wide(one rescale)limit + soldlogistic::test_target_sale_time_large_max_sellabletime_scale * ln_1p(2 sold / (limit - sold))Gas (cairo-test, same inputs)
All the original tests keep their inputs, expected values and tolerances.
🤖 Generated with Claude Code