-
Notifications
You must be signed in to change notification settings - Fork 586
chore!: update domain separators #19905
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
Conversation
24cad60 to
8d3b9ea
Compare
7689d3e to
614aec9
Compare
IlyasRidhuan
left a comment
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 from the AVM side
iAmMichaelConnor
left a comment
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.
Approved! I wrote some pedantic comments that would change the domain separator string, but it looks like it would take forever to make such changes, so it's likely not worth your time.
noir-projects/noir-protocol-circuits/crates/types/src/domain_separators.nr
Outdated
Show resolved
Hide resolved
noir-projects/noir-protocol-circuits/crates/types/src/domain_separators.nr
Outdated
Show resolved
Hide resolved
noir-projects/noir-protocol-circuits/crates/types/src/domain_separators.nr
Outdated
Show resolved
Hide resolved
| assert(DOM_SEP__TSK_M == 51, "Unexpected domain separator"); | ||
| // assert(DOM_SEP__TSK_M == derive_dom_sep("az_tsk_m"), "Unexpected domain separator"); | ||
| unconstrained fn tsk_m_matches_derived() { | ||
| assert_eq(DOM_SEP__TSK_M, derive_dom_sep("az_tsk_m"), "Unexpected domain separator"); |
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.
We might repurpose this to something else, but I guess until we know the name, we can't replace this name.
| unconstrained fn contract_address_v1_matches_derived() { | ||
| assert_eq( | ||
| DOM_SEP__CONTRACT_ADDRESS_V1, | ||
| derive_dom_sep("az_contract_address_v1"), |
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.
Each version of the Aztec rollup, we'll need to change* this domain separator with the new rollup version. Will the rollups be named v1, v2, ...?
* Or more likely add another domain separator and pass it as a param to address derivations, so that people can still compute old addresses for things like migration proofs.
| // The following value was generated by `public_keys.test.ts`. | ||
| let expected_public_keys_hash = | ||
| 0x0fecd9a32db731fec1fded1b9ff957a1625c069245a3613a2538bd527068b0ad; | ||
| 0x029d92319623fe2e5804a64b35d13e1c4881045371c41f36329b44dfc237d232; |
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.
Omg this must have taken ages
8fd4a5e to
734c4b1
Compare
734c4b1 to
396231f
Compare
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
poseidon2_hash('az_name_of_separator') as u32DOM_SEP__PUBLIC_LEAF_INDEXtoDOM_SEP__PUBLIC_LEAF_SLOTDOM_SEP__BLOCK_HASHtoDOM_SEP__BLOCK_HEADER_HASHDOM_SEP__OUTER_NULLIFIERtoDOM_SEP__SILOED_NULLIFIERDOM_SEP__FUNCTION_LEAFtoDOM_SEP__PRIVATE_FUNCTION_LEAFDOM_SEP__CONSTRUCTORtoDOM_SEP__INITIALIZERDOM_SEP__PUBLIC_STORAGE_MAP_SLOTDOM_SEP__PRIVATE_LOG_FIRST_FIELD