-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added commitment2 test and modified cleartext code generator to throw…
… appropriate exceptions for commitments
- Loading branch information
1 parent
193ed34
commit f4f3b72
Showing
6 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
compiler/tests/should-pass/circuit/cleartext/Commitment2.circuit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
host alice | ||
host bob | ||
|
||
circuit fun <> move@Local(host = alice)(a: int[]) -> b: int[] { | ||
return a | ||
} | ||
|
||
circuit fun <> move2@Local(host = bob)(a: int[]) -> b: int[] { | ||
return a | ||
} | ||
|
||
fun <> main() -> { | ||
val a@Local(host = alice) = alice.input<int[]>() | ||
val c@Commitment(sender = alice, receivers = {bob}) = move<>(a) | ||
val d@Local(host = bob) = move2<>(c) | ||
val = bob.output<int[]>(d) | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5 |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5 |