Skip to content

Prover functions for small arith. #2608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
May 19, 2025
Merged

Conversation

chriseth
Copy link
Member

@chriseth chriseth commented Mar 28, 2025

Tests working for "small":

  • memory
  • add_sub
  • rotate
  • shift
  • memory
  • arith256

Not working:

  • keccak
  • poseidon
  • poseidon2

@chriseth chriseth requested review from qwang98 and georgwiese and removed request for qwang98 March 28, 2025 14:11
int_to_limbs(quotient) + int_to_limbs(remainder)
}
}
);
Copy link
Contributor

@gzanitti gzanitti Mar 28, 2025

Choose a reason for hiding this comment

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

I have reviewed the mathematics behind all the computation and after a first look, it seems to makes sense (it is even clearer than before). What I don't quite understand is the use of the query function. I understand that the results are assigned in y3 + x1, but when is it “called” for that to happen? Is it related to the div operation defined above, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the runtime solver, (all) query functions are executed when there is no more progress, I think. It works because eval silently fails if the value is not there yet. If all eval calls succeed, then the computed value is assigned to the target columns.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: e581da7 Previous: d5b42f4 Ratio
jit-witgen-benchmark/jit_witgen_benchmark 10269002678 ns/iter (± 54321890) 8159943222 ns/iter (± 81282688) 1.26
executor-benchmark/keccak 21383799391 ns/iter (± 593035323) 17378422559 ns/iter (± 83429354) 1.23

This comment was automatically generated by workflow using github-action-benchmark.

@leonardoalt
Copy link
Member

@chriseth I'm guessing we do want this soon?

@georgwiese georgwiese added this pull request to the merge queue May 19, 2025
Merged via the queue into main with commit 044de12 May 19, 2025
25 checks passed
@georgwiese georgwiese deleted the prover_functions_for_small_arith branch May 19, 2025 13:26
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.

4 participants