Skip to content

Strip deploy + Rust/npm surface: the library half is Solidity only - #263

Merged
thedavidmeister merged 1 commit into
mainfrom
strip/library-only
Aug 22, 2026
Merged

Strip deploy + Rust/npm surface: the library half is Solidity only#263
thedavidmeister merged 1 commit into
mainfrom
strip/library-only

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Blocker RESOLVED 2026-08-22: rain-math-float-deploy 0.1.1 is published to Soldeer (release sol-v0.1.1, run 32572473272). External importers of LibDecimalFloatDeploy now have the deploy package to move to.

Strips the deploy surface and the Rust/npm surface from rain.math.float, leaving the pure Solidity math library that publishes only the rain-math-float Soldeer package. Executes the plan ruled in #262 (the migration-plan comment + the Hard Case A ruling). The concrete, the rolling deploy machinery, the deploy scripts/tests, and the Rust/WASM/npm bindings now live in rain.math.float.deploy. The LIBRARY-tagged pin records (*_0_1_1: 0xBee0eE…C926 / 0x7a93d031…) are DELETED, not relocated — the deploy repo's src/generated/0_1_1/ freezes its own release, a different artifact. Those records survive in this repo's git history and the immutable Soldeer archives; consumers have git.

🔒 Blocked-by (ordering constraint)

Must not land until rain.math.float.deploy has published its rain-math-float-deploy Soldeer package, so external importers of LibDecimalFloatDeploy / the deployed addresses have somewhere to repoint. Tracker: rainlanguage/rain.math.float.deploy#1 (step 4 — sol-v* tag → Soldeer publish — is still pending). Source ruling + plan: #262.

Repointing other org consumers is out of scope here (2026-08-20 human narrowing).

Removed (77 files)

Deploy Solidity (Tier 1 + Tier 2, un-gated):

  • src/concrete/DecimalFloat.sol, src/generated/LogTables.pointers.sol, src/lib/deploy/LibDecimalFloatDeploy.sol
  • script/Deploy.sol, script/BuildPointers.sol, script/check-published-deploy-constants.sh, script/lib/LibEtchLogTables.sol
  • test/src/concrete/*.t.sol (31), test/src/lib/deploy/*.t.sol (4), test/src/lib/table/LibLogTable.bytes.t.sol

Rust/npm surface + CopyArtifacts bridge:

  • crates/** (15), Cargo.toml, Cargo.lock, package.json, package-lock.json, tsconfig.json, .prettierignore, test_js/**, scripts/*.js
  • script/CopyArtifacts.sol, script/lib/LibCopyArtifacts.sol, test/script/CopyArtifacts.t.sol
  • test/concrete/TestDecimalFloat.sol + its two wrapper tests (TestDecimalFloat.unpack.t.sol, DecimalFloat.packLossless.t.sol) — per Correction 1; direct packLossless/unpack coverage stays in test/src/lib/LibDecimalFloat.pack.t.sol
  • Workflows: copy-artifacts.yaml, manual-sol-artifacts.yaml, rainix-rs-static.yaml, rainix-rs-test.yaml, rainix-rs-wasm.yaml

Kept

  • Pure-math library: src/lib/{LibDecimalFloat, format, parse, implementation, table/LibLogTable} + src/error/*; its full test suite; the slow reference impls (test/lib/*).
  • rain-datacontract dep (the test log-tables helper needs it).
  • Lifecycle: package-release.yaml (now publishes only rain-math-float Soldeer), rainix-sol.yaml, pr-assessment.yaml.

Added (Hard Case C — mandatory)

test/abstract/LogTest.sol rewritten self-contained: rebuilds the combined log/anti-log tables purely from LibLogTable source (toBytes of the five tables + LOG_TABLE_DISAMBIGUATOR, byte-identical to the old frozen combinedTables()), deploys them via LibDataContract at a create address, and hands the address to the 8 transcendental tests. No Zoltu deploy pin, no src/generated.

Config edits

  • foundry.toml: drop rain-deploy + rain-sol-codegen deps, [rpc_endpoints], [etherscan], fs_permissions, ffi (no retained test uses vm.ffi). Pragma stays ^, optimizer_runs untouched.
  • flake.nix: drop test-wasm-build + test-js-bindings tasks.
  • remappings.txt / soldeer.lock regenerated (deps: forge-std, @openzeppelin-contracts, rain-solmem, rain-string, rain-datacontract).
  • .gas-snapshot regenerated for the stripped suite; CLAUDE.md / README.md / REUSE.toml / .soldeerignore / .gitignore library-only.

CI (green locally, nix develop -c)

  • forge build → successful
  • forge test444 passed, 0 failed, 0 skipped (48 suites); transcendental tests pass on the new helper
  • slither .0 results (14 contracts)
  • reuse lintcompliant (78/78 files)

QA

  • Discriminating tests: the 8 transcendental tests that consume the new LogTest.logTables() helper — LibDecimalFloat.{log10,pow,pow10,sqrt}.t.sol and LibDecimalFloatImplementation.{internals,log10,lookupLogTableVal,pow10}.t.sol. They fail if the helper deploys the wrong table bytes (transcendental lookups extcodecopy from the tables address; garbage tables give wrong results, and the packed-vs-unpacked and slow-reference cross-checks in these files diverge). Verified: 444 passed / 0 failed / 0 skipped on the stripped tree; before the strip these tests reached the tables via the Zoltu-pinned etch, and they now reach byte-identical tables via the self-contained helper (same 8 tests, same assertions, still green).
  • Mutations applied: n/a — this PR removes the deploy/Rust surface and rewrites a test helper; it introduces no new production logic to mutate. The one behavioral risk it does carry — that the rebuilt-from-source tables differ from the deployed tables — is pinned by structural equivalence (below), not left to chance: change the helper's concatenation order or drop the disambiguator and the 8 transcendental tests fail.
  • Oracle: independent of the new helper. The deleted test/src/lib/table/LibLogTable.bytes.t.sol asserted LibLogTable.toBytes(logTableDec()) == LOG_TABLES (and the same for the other four tables) against the frozen src/generated/LogTables.pointers.sol snapshot — exactly the five toBytes(...) terms the new helper concatenates. So the helper's output is provably byte-identical to the old LibDecimalFloatDeploy.combinedTables() it replaces. Transcendental expected values are additionally cross-checked against the slow reference implementations in test/lib/.
  • Category check: Split rain.math.float into a library half and a new rain.math.float.deploy #262 keep/remove list is the spec. Covered — removed = Tier 1 + Tier 2 (un-gated) Solidity deploy surface + the ruling's Rust/npm addition + TestDecimalFloat (Correction 1); kept = the pure-math surface + tests + rain-datacontract; added = the mandatory Hard Case C helper. No consumer repointing (out of scope per the 2026-08-20 narrowing).

Closes the library-strip step of #262 once unblocked.

Adversarial-review disclosures (2026-08-22)

Per rain.math.float#262 (Split into library + rain.math.float.deploy) and the
Hard Case A ruling, this repo becomes the pure Solidity math library that
publishes only the `rain-math-float` Soldeer package. The deployed concrete,
deploy pins/snapshot, deploy scripts/tests, and the Rust/WASM/npm bindings move
to rain.math.float.deploy.

Removed (77 files):
- Deploy Solidity: src/concrete/DecimalFloat.sol, src/generated/*,
  src/lib/deploy/LibDecimalFloatDeploy.sol, script/{Deploy,BuildPointers,
  check-published-deploy-constants.sh}, deploy tests, LibLogTable.bytes.t.sol.
- Rust/npm: crates/**, Cargo.*, package*.json, tsconfig.json, .prettierignore,
  test_js/**, scripts/*.js, the CopyArtifacts bridge (script + lib + test),
  and TestDecimalFloat harness + its two wrapper tests.
- Workflows: copy-artifacts, manual-sol-artifacts, rainix-rs-{static,test,wasm}.

Added / changed:
- test/abstract/LogTest.sol rewritten self-contained (Hard Case C): rebuilds the
  combined log tables from LibLogTable source and deploys them via LibDataContract
  at a `create` address, so the transcendental tests (log10/pow/pow10/sqrt) run
  with no Zoltu deploy pin and no src/generated snapshot.
- foundry.toml: drop rain-deploy + rain-sol-codegen deps, [rpc_endpoints],
  [etherscan], fs_permissions, ffi. Pragma stays `^`.
- package-release.yaml: publish only the rain-math-float Soldeer package
  (drop crate + npm-package inputs).
- flake.nix: drop test-wasm-build + test-js-bindings tasks.
- CLAUDE.md/README/REUSE.toml/.soldeerignore/.gitignore/remappings: library-only.
- .gas-snapshot + soldeer.lock regenerated for the stripped tree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Aug 20, 2026
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@thedavidmeister, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8498a34a-e331-4985-b2f2-f03193336f64

📥 Commits

Reviewing files that changed from the base of the PR and between d3fb611 and 2eb0f03.

⛔ Files ignored due to path filters (4)
  • Cargo.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
  • soldeer.lock is excluded by !**/*.lock
  • src/generated/LogTables.pointers.sol is excluded by !**/generated/**
📒 Files selected for processing (84)
  • .gas-snapshot
  • .github/workflows/copy-artifacts.yaml
  • .github/workflows/manual-sol-artifacts.yaml
  • .github/workflows/package-release.yaml
  • .github/workflows/rainix-rs-static.yaml
  • .github/workflows/rainix-rs-test.yaml
  • .github/workflows/rainix-rs-wasm.yaml
  • .gitignore
  • .prettierignore
  • .soldeerignore
  • CLAUDE.md
  • Cargo.toml
  • REUSE.toml
  • crates/float-wasm/Cargo.toml
  • crates/float-wasm/src/lib.rs
  • crates/float/Cargo.toml
  • crates/float/abi/DecimalFloat.json
  • crates/float/abi/TestDecimalFloat.json
  • crates/float/proptest-regressions/fuzz_ops.txt
  • crates/float/proptest-regressions/lib.txt
  • crates/float/src/error.rs
  • crates/float/src/evm.rs
  • crates/float/src/fuzz_ops.rs
  • crates/float/src/js_api.rs
  • crates/float/src/lib.rs
  • crates/float/src/tables.rs
  • flake.nix
  • foundry.toml
  • package.json
  • remappings.txt
  • script/BuildPointers.sol
  • script/CopyArtifacts.sol
  • script/Deploy.sol
  • script/check-published-deploy-constants.sh
  • script/lib/LibCopyArtifacts.sol
  • script/lib/LibEtchLogTables.sol
  • scripts/build.js
  • scripts/prepublish.js
  • src/concrete/DecimalFloat.sol
  • src/lib/deploy/LibDecimalFloatDeploy.sol
  • test/abstract/LogTest.sol
  • test/concrete/DecimalFloat.packLossless.t.sol
  • test/concrete/TestDecimalFloat.sol
  • test/concrete/TestDecimalFloat.unpack.t.sol
  • test/script/CopyArtifacts.t.sol
  • test/src/concrete/DecimalFloat.abs.t.sol
  • test/src/concrete/DecimalFloat.add.t.sol
  • test/src/concrete/DecimalFloat.ceil.t.sol
  • test/src/concrete/DecimalFloat.constants.t.sol
  • test/src/concrete/DecimalFloat.constructor.t.sol
  • test/src/concrete/DecimalFloat.div.t.sol
  • test/src/concrete/DecimalFloat.eq.t.sol
  • test/src/concrete/DecimalFloat.floor.t.sol
  • test/src/concrete/DecimalFloat.format.t.sol
  • test/src/concrete/DecimalFloat.frac.t.sol
  • test/src/concrete/DecimalFloat.fromFixedDecimalLossless.t.sol
  • test/src/concrete/DecimalFloat.fromFixedDecimalLossy.t.sol
  • test/src/concrete/DecimalFloat.gt.t.sol
  • test/src/concrete/DecimalFloat.gte.t.sol
  • test/src/concrete/DecimalFloat.integer.t.sol
  • test/src/concrete/DecimalFloat.inv.t.sol
  • test/src/concrete/DecimalFloat.isZero.t.sol
  • test/src/concrete/DecimalFloat.log10.t.sol
  • test/src/concrete/DecimalFloat.lt.t.sol
  • test/src/concrete/DecimalFloat.lte.t.sol
  • test/src/concrete/DecimalFloat.max.t.sol
  • test/src/concrete/DecimalFloat.min.t.sol
  • test/src/concrete/DecimalFloat.minus.t.sol
  • test/src/concrete/DecimalFloat.mul.t.sol
  • test/src/concrete/DecimalFloat.parse.t.sol
  • test/src/concrete/DecimalFloat.pow.t.sol
  • test/src/concrete/DecimalFloat.pow10.t.sol
  • test/src/concrete/DecimalFloat.sqrt.t.sol
  • test/src/concrete/DecimalFloat.sub.t.sol
  • test/src/concrete/DecimalFloat.toFixedDecimalLossless.t.sol
  • test/src/concrete/DecimalFloat.toFixedDecimalLossy.t.sol
  • test/src/lib/deploy/LibDecimalFloatDeploy.checkLogTablesDeployed.t.sol
  • test/src/lib/deploy/LibDecimalFloatDeploy.t.sol
  • test/src/lib/deploy/LibDecimalFloatDeployProd.t.sol
  • test/src/lib/deploy/LibDecimalFloatDeployTaggedConstants.t.sol
  • test/src/lib/table/LibLogTable.bytes.t.sol
  • test_js/float.test.ts
  • test_js/tsconfig.json
  • tsconfig.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thedavidmeister
thedavidmeister marked this pull request as ready for review August 22, 2026 12:20
@thedavidmeister thedavidmeister changed the title blocked-by: rain.math.float.deploy Soldeer publish — strip deploy + Rust/npm surface (library-only) Strip deploy + Rust/npm surface: the library half is Solidity only Aug 22, 2026
@thedavidmeister
thedavidmeister merged commit 4f66ff3 into main Aug 22, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

Sign up for free to 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