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

my new nada program #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions nohup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ℹ️ cluster id is 9e68173f-9c23-4acc-ba81-4f079b639964
ℹ️ using 256 bit prime
ℹ️ storing state in /tmp/.tmpXXhZBN (80.01Gbs available)
🏃 starting nilchain node in: /tmp/.tmpXXhZBN/nillion-chain
⛓ nilchain JSON RPC available at http://127.0.0.1:48102
⛓ nilchain REST API available at http://localhost:26650
⛓ nilchain gRPC available at localhost:26649
🏃 starting node 12D3KooWMvw1hEqm7EWSDEyqTb6pNetUVkepahKY6hixuAuMZfJS
⏳ waiting until bootnode is up...
🏃 starting node 12D3KooWAiwGZUwSUaT2bYVxGS8jmfMrfsanZYkHwH3uL7WJPsFq
🏃 starting node 12D3KooWM3hsAswc7ZT6VpwQ1TCZU4GCYY55nLhcsxCcfjuixW57
👛 funding nilchain keys
📝 nillion CLI configuration written to /root/.config/nillion/nillion-cli.yaml
🌄 environment file written to /root/.config/nillion/nillion-devnet.env
7 changes: 7 additions & 0 deletions quickstart/nada_quickstart_programs/nada-project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "nada_quickstart_programs"
version = "0.1.0"
authors = [""]

[[programs]]
path = "src/main.py"
prime_size = 128
12 changes: 12 additions & 0 deletions quickstart/nada_quickstart_programs/src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from nada_dsl import *

def nada_main():
party1 = Party(name="Party1")
party2 = Party(name="Party2")
party3 = Party(name="Party3")
a = SecretInteger(Input(name="A", party=party1))
b = SecretInteger(Input(name="B", party=party2))

result = a + b

return [Output(result, "my_output", party3)]
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
from nada_dsl import *

def nada_main():

party1 = Party(name="Party1")
party2 = Party(name="Party2")

my_int1 = SecretInteger(Input(name="my_int1", party=party1))

my_int2 = SecretInteger(Input(name="my_int2", party=party1))
my_int3 = SecretInteger(Input(name="my_int3", party=party2))

sum_int = my_int1 + my_int2
diff_int = my_int1 - my_int3
prod_int = my_int2 * my_int3

new_int = my_int1 + my_int2
max_int = Maximum([sum_int, diff_int, prod_int])

return [Output(new_int, "my_output", party1)]
return [
Output(sum_int, "sum_output", party1),
Output(diff_int, "diff_output", party2),
Output(prod_int, "prod_output", party1),
Output(max_int, "max_output", party2)
]
Binary file not shown.