Skip to content

feat: implement log-derivative argument over small fields#1673

Merged
ivokub merged 25 commits intomasterfrom
feat/logderivative-smallfield
Jan 12, 2026
Merged

feat: implement log-derivative argument over small fields#1673
ivokub merged 25 commits intomasterfrom
feat/logderivative-smallfield

Conversation

@ivokub
Copy link
Copy Markdown
Collaborator

@ivokub ivokub commented Jan 8, 2026

Description

We previously didn't support doing log-derivative argument over small fields as we didn't have operations for defining the log-derivative argument. But now with #1672 we can complete the implementation.

This particularly allows for lookups, range checks etc.

NB! Merge only after #1672.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

  • added explicit small field check for range check and logderivprecomp tests.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Note

Enables the log-derivative argument on small fields and aligns range checking to work with wide commitments.

  • Implement small-field path in logderivarg.Build: use fieldextension ops and multicommit.WithWideCommitment; add extension-based coefficient/combination helpers and small-field detection via smallfields.IsSmallField
  • Preserve existing large-field path with WithCommitment and batch inversion where available
  • Update rangecheck.New to return newCommitRangechecker for frontend.WideCommitter (remove panic)
  • Tests: add test.WithSmallfieldCheck() to lookup; rework rangecheck tests (smaller samples, explicit invalid assignments, add small-field variant)

Written by Cursor Bugbot for commit 67ed00c. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements log-derivative argument support for small fields (BabyBear, KoalaBear, Goldilocks) by utilizing field extensions and the WithWideCommitment interface. Previously, attempting to use range checking with small fields would panic; this change enables it for single-column tables.

Key changes:

  • Enables log-derivative arguments over small fields using field extensions
  • Adds small field test coverage for range checking
  • Removes panic for WideCommitter in rangecheck package

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
std/rangecheck/rangecheck.go Removes panic for WideCommitter case and enables commit-based range checking for small fields
std/rangecheck/rangecheck_test.go Refactors test to use CheckCircuit helper, reduces test size, and adds dedicated small field test
std/internal/logderivarg/logderivarg.go Implements small field support using field extensions and WithWideCommitment, but only for single-column tables

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread std/internal/logderivarg/logderivarg.go
Comment thread std/internal/logderivarg/logderivarg.go Outdated
Comment thread std/internal/logderivarg/logderivarg.go Outdated
@ivokub ivokub requested a review from ThomasPiellard January 9, 2026 09:57
@ivokub ivokub self-assigned this Jan 9, 2026
@ivokub ivokub added the dep: linea Issues affecting Linea downstream label Jan 9, 2026
@ivokub ivokub marked this pull request as ready for review January 9, 2026 11:15
Comment thread std/internal/logderivarg/logderivarg.go
Base automatically changed from feat/internal-koalabear-extension to master January 11, 2026 22:57
@ivokub ivokub merged commit a4e9010 into master Jan 12, 2026
13 checks passed
@ivokub ivokub deleted the feat/logderivative-smallfield branch January 12, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dep: linea Issues affecting Linea downstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants