8 Commits
Author SHA1 Message Date
zeekay 4004c16cab fix(bindings/rust): lux-precompile-sys — un-collide the FFI crate from the sdk-rs wrapper
228fffb renamed luxprecompile-sys -> lux-precompile for lux-consensus naming
consistency, but that (a) broke every consumer importing luxprecompile_sys and
(b) collided with sdk-rs's idiomatic wrapper crate, which is ALSO lux-precompile
— cargo refuses two same-named packages in one graph. Keep the family consistent
AND the Rust FFI convention: the -sys crate is lux-precompile-sys, the wrapper
stays lux-precompile. Consumed as a local path dep from sdk-rs (no crates.io
publish required).
2026-07-14 22:38:10 -07:00
zeekay d5b109891d fix(cabi): include stdint.h for fixed-width integer types in cgo preamble 2026-06-20 11:19:45 -07:00
zeekay 636478f0aa fix: gofmt -s across repo (CI format check) 2026-06-02 23:27:11 -07:00
zeekay 7b0ab9d2eb precompile: rename Corona → Corona; assign Ring-LWE threshold slot 0x012206
Corona is the Ring-LWE threshold signature scheme (lattice flavor:
Ring-LWE, vs Pulsar's Module-LWE / ML-DSA). The pre-rename library
name was Corona. Sweep eliminates every Corona reference across
the precompile tree and gives the Ring-LWE threshold its own slot
in the LP-4200 PQCrypto block:

  0x012201 = ML-KEM     (Module-LWE KEM,        FIPS 203)
  0x012202 = ML-DSA     (Module-LWE single-sig, FIPS 204)
  0x012203 = SLH-DSA    (hash-based signature,  FIPS 205)
  0x012204 = Pulsar     (Module-LWE threshold,  FIPS 204 byte-equal)
  0x012205 = P3Q        (strict-PQ STARK)
  0x012206 = Corona     (Ring-LWE threshold)

Pulsar previously squatted 0x012204 alone; Corona/Corona also
claimed 0x012204 — direct slot collision. Fixed by moving Corona
to its own slot 0x012206 since they're distinct primitives
(different lattice flavors).

  - Directory: corona/ → corona/
  - Package:   coronathreshold → coronathreshold
  - Type:      coronaThresholdPrecompile → coronaThresholdPrecompile
  - Var:       CoronaThresholdPrecompile → CoronaThresholdPrecompile
  - Address:   0x012204 → 0x012206
  - Library:   luxfi/corona/sign → luxfi/corona/sign
               luxfi/corona/threshold → luxfi/corona/threshold
  - Interface: ICoronaThreshold.sol → ICoronaThreshold.sol
  - Registry:  CoronaCChain → CoronaCChain, CORONA → CORONA
  - Quasar:    Corona* identifiers in quasar/contract.go renamed
  - Bridge:    docstring sweep

All affected packages build clean. All 5/6 PQ precompile tests pass
(one flaky on first run, green on retry). Bridge has a pre-existing
unrelated build break (ErrChainNameTooLong undefined).
2026-05-13 14:23:53 -07:00
zeekay 228fffb4db rename: luxprecompile-sys → lux-precompile for consistency with lux-consensus 2026-05-13 01:04:32 -07:00
zeekay 72b6c2d371 bindings/rust: publish luxprecompile-sys v0.1.0 to crates.io
Metadata polish for the public registry: switch from `license = "MIT"`
(wrong) to `license-file = "LICENSE"` with the actual Lux Ecosystem
License 1.2 vendored in-crate, declare `links = "luxprecompile"` so
cargo enforces the single-source-of-truth for the sys crate, add
README/homepage/authors, and add a docs.rs section that disables the
link step (docs.rs has no libluxprecompile.dylib).

build.rs: skip linking entirely on docs.rs, consult /usr/local/lib as
a standard install fallback in addition to the in-tree dist/ path, and
emit rerun-if-env-changed hints. Existing in-tree dev workflow is
unchanged; downstream consumers must install libluxprecompile.dylib
externally (the 18 MiB Go-built dylib exceeds crates.io's 10 MiB tarball
limit, so vendoring is not viable).

Published: https://crates.io/crates/luxprecompile-sys/0.1.0
2026-05-13 00:18:16 -07:00
zeekay 3d48a72d2e feat: precompiles — anchor, babyjubjub EIP-2494, coverage, slug validation 2026-03-02 02:00:00 +00:00
zeekay 8e28ea5025 feat: C FFI + Rust bindings (libluxprecompile) 2026-03-02 19:46:17 +00:00