Skip to content

Fix MatrixView encode row count, gf128Inv pivot selection, and exact span bounds - #16

Merged
ladnir merged 2 commits into
ladnir:mainfrom
james-choncholas:fix-paxos-bounds-and-gf128inv
Nov 17, 2026
Merged

ladnir merged 2 commits into
ladnir:mainfrom
james-choncholas:fix-paxos-bounds-and-gf128inv

Conversation

@james-choncholas

Copy link
Copy Markdown
Contributor

Paxos::encode(MatrixView) constructed its block-reduced output view with values.rows() rows instead of output.rows(), causing block-aligned multi-byte MatrixView encodings to fail the output row check. gf128Inv(Matrix<block>) only accepted OneBlock when searching for a pivot row below a zero diagonal entry, reporting invertible GF(2^128) matrices as singular whenever the non-zero pivot was not 1. Also Baxos::implParSolve lacked entry state and size checks, and Baxos::solve, Baxos::implParDecode, and Paxos::decode allowed mismatched inputs and values counts even though single-bin Baxos::solve and Baxos::check require exact row counts.

Pass output.rows() when reducing MatrixView outputs in Paxos::encode, pivot on any non-zero block in gf128Inv(Matrix<block>), and enforce exact row-count checks across Paxos::decode, Baxos::solve/implParSolve, and Baxos::implParDecode, covered by Paxos_bounds_and_gf128Inv_Test.

james-choncholas and others added 2 commits November 13, 2026 23:00
…span bounds

Pass output.rows() instead of values.rows() when Paxos::encode(MatrixView) constructs its block-reduced output view, accept any non-zero GF(2^128) element as a pivot in gf128Inv(Matrix<block>), and enforce exact row-count checks across Paxos::decode, Baxos::solve/implParSolve, and Baxos::implParDecode with regression tests in Paxos_bounds_and_gf128Inv_Test.
@ladnir
ladnir marked this pull request as ready for review November 17, 2026 22:17
@ladnir
ladnir merged commit 60b4f3d into ladnir:main Nov 17, 2026
3 checks passed
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.

2 participants