-
Notifications
You must be signed in to change notification settings - Fork 18
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
PS-217: Implement the circuit for SC2SC verification #110
Conversation
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.
LGTM ! The requested changes are mainly very minor: refactoring, stile, typos...
demo-circuit/src/test_utils.rs
Outdated
} | ||
|
||
impl CommitmentHelper { | ||
pub(crate) fn add_random_forward_transert_to_sc( |
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.
Mmm don't see it changed
demo-circuit/src/test_utils.rs
Outdated
}); | ||
} | ||
|
||
pub(crate) fn add_random_backward_transert_to_sc( |
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.
Don't see it changed
Should be done now... THX 👀 |
9513669
to
5556b6a
Compare
e2720af
to
1df03ee
Compare
to reuse some utilities in tests from other circuits.
ScCommitmentPath and simplified the tests that now fail all with the same message
it by hand and removed the _man in the middle_ enforce_message_path() . implemented check_membership() also for ScCommitmentCertPathGadget: a more idionatic way to define it.
RandomWithdrawalCertificateDataBuilder to build WithdrawalCertificateData for a generic Rng
- transfert -> transfer - widthdrawal -> withdrawal
check the minimum number of custom fields. Add also test and removed the hardcoded 3: replaced it with MSG_MT_HEIGHT everywhere
Implement Sc2Sc jni interface
Add ScCommitmentCertPath.updateScCommitmentPath() to handle the case where sdk can just rebuilt the sidechain tree but not the complete commitment tree.
- Fixed TYPOS - Renamed variable to use the same notation used in design documents - Don't point to outdated doc
This circuit follow the specifications in ZenIP-42205 and tests use
cctp_primitives::commitment_tree::CommitmentTree
to build a valid states tree.BTW I did a little refactor to reuse some utilities in tests from other circuits. I've introduced some structs to simplify the tests for this circuit but I avoided to refactor the other circuits tests and use the newer utilities ... That can be done later in another PR if we prefer.