Skip to content
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

Adjust degree bit automatically #201

Open
eigmax opened this issue Dec 28, 2024 · 1 comment
Open

Adjust degree bit automatically #201

eigmax opened this issue Dec 28, 2024 · 1 comment

Comments

@eigmax
Copy link
Member

eigmax commented Dec 28, 2024

Now the degree bit for shrinking the Stark verifier circuit in prove_root is assigned manually, the range of the degree bits is too large and lead to large memory consuming.

@VanhGer
Copy link

VanhGer commented Jan 7, 2025

First idea: Determine the relationship between the segment size and the original_degree_bit of each table.
Currently, the degree_bits_range for each table is:

const DEGREE_BITS_RANGE: [Range(usize); 6] = [10..21, 12..22, 12..21, 8..21, 6..21, 13..23];

Below are the tables of segment size and degree bit of 6 module tables

sha2-rust-program

Segment size Arithmetic Cpu Poseidon Poseidon
Sponge
Logic Memory
2^10 = 1024 16 11 11 11 6 17
2^11 = 2048 16 11 11 11 6 17
2^12 = 4096 16 11-12 11 11 7-10 17
2^13 = 8192 16 12-13 11-12 11-12 9-11 17-18
2^14 = 16384 16 14 12 12 11 18
2^15 = 32768 16 14 12 12 11 18
2^16 = 65536 16 14 12 12 11 18
2^17 = 131072 16 14 12 12 11 18
2^21 = 2097152 16 14 12 12 11 18

revme-program

Segment size Arithmetic Cpu Poseidon Poseidon
Sponge
Logic Memory
2^15 = 32768 16 15 12-14 12-14 6-14 18-19
2^16 = 65536 16 16 13-14 13-14 10-15 19-20
2^17 = 131072 16 16-17 13-14 13-14 11-15 19-21
2^18 = 262144 16 18 15 15 15 21
2^19 = 524288 18 19 15 15 16 22
2^20 = 1048576 18 19 15 15 16 22
2^21 = 2097152 18 19 15 15 16 22

It seems that with different segments of the same size, the number of each type of instruction varies. This makes it challenging to fix the degree bit for each table, particularly for the memory and logic tables. So this idea is difficult to implement.

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

No branches or pull requests

2 participants