Repository navigation
Update dependencies, require polars 2, and speed up the binary - #2
Merged
Merged
Conversation
Fix the rustls and lru advisories, require Python polars 2, and move governor, rand, syn, mesc, colored and the CI actions to current majors. Build releases with thin LTO and use jemalloc in the binary, which decreased user CPU time by 21 percent in a replayed mainnet benchmark.
Clippy 1.99 adds this code to the single_element_loop lint, and CI installs the latest stable toolchain, so the clippy job failed.
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.
Overview of changes
deny.tomlignore entries that are no longer necessary.polars>=2inpyproject.tomland in CI. Before, the package did not declare polars at all.python_tests/test_offline_rpc.py. A local JSON-RPC server replays two recorded mainnet blocks, so CI tests the Rust → Python DataFrame hand-off without an endpoint secret.actions/checkoutandsetup-pythonto v7,upload-artifactto v7, anddownload-artifactto v8. Replace the retiredmacos-13runner withmacos-15-intel.[profile.release]withlto = "thin"andcodegen-units = 1in both workspaces.triodionbinary, behind the defaultjemallocfeature. The Python wheel and Windows MSVC builds keep the system allocator. CI now also runs clippy with--no-default-features.#[to_df()]attribute as a compile error, not a panic.Reasoning
The Rust polars crate for 2.0 is not published yet, so the Rust side stays on polars 0.55 with pyo3-polars 0.28. The hand-off to Python polars 2.0.0 works, and the new offline test keeps that true. Every speed setting was measured before it was added. Fat LTO and mimalloc were measured and rejected.
Tests
cargo build,cargo test(257 passed), clippy-D warningswith--all-featuresand with--no-default-features,cargo +nightly fmt --check, andcargo deny check.crates/pythonwith toolchain 1.95.0: clippy-D warnings, build, fmt, andcargo deny. The wheel installspolars 2.0.0by itself, and pytest gives 9 passed and 28 skipped (endpoint tests).triodion-coremacro expansion is byte-identical with syn 1 and syn 2.--chunk-order random --requests-per-second 2. Both chunks were written, and the rate limit held.hyperfine, 40 runs. Wall time 324 → 268 ms, user CPU −21 %, peak memory 167 → 208 MB, binary 73 → 49 MB. The output parquet is identical.actionlintpasses on both workflows.TL;DR
Fix two advisories, move to Python polars 2 and current dependency majors, and make the CLI binary about 1.2 times faster.