-
Notifications
You must be signed in to change notification settings - Fork 47
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
chore: prover rename leaf index next index #851
chore: prover rename leaf index next index #851
Conversation
415349c
to
4b046e0
Compare
4b046e0
to
982aa9c
Compare
4897f1f
to
744e511
Compare
744e511
to
0c7f6f5
Compare
The commit updates variables and parameters names in the light-prover, changing from camelCase to snake_case for better readability and consistency. This includes updates in the scripts `generate_keys.sh` and `main.go`. Changes have been made in flags like `compressedAccounts` to `compressed-accounts` and array names like `compressedAccounts_arr` to `compressed_accounts_arr`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one question
pub const FIELD_SIZE_SUB_ONE: &str = | ||
"21888242871839275222246405745257275088548364400416034343698204186575808495616"; | ||
pub const HIGHEST_ADDRESS_PLUS_ONE: &str = | ||
"452312848583266388373324160190187140051835877600158453279131187530910662655"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this value stand for now? It seems lower than the Fr field size limit. Is it intentional to reduce the available range of addresses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- isLess limits the bitsize to 248 bit equivalent to truncated addresses of 31 bytes
- our highest indexed array value FIELD_SIZE - 1 is too great now to work with the circuit,
HIGHEST_ADDRESS_PLUS_ONE
is2^248 -1
the highest 248 bit value. The highest address must be less thanHIGHEST_ADDRESS_PLUS_ONE
hence the name plus one.
- our highest indexed array value FIELD_SIZE - 1 is too great now to work with the circuit,
builds on #850
changes:
test_tree.go
->merkle_tree.go
tree_test.go
->gen_test_data.go
HIGHEST_ADDRESS_PLUS_ONE
is2^248 -1
the highest 248 bit value. The highest address must be less thanHIGHEST_ADDRESS_PLUS_ONE
hence the name plus one.