dedis / cothority

Scalable collective authority
Other
425 stars 106 forks source link

about skipchain #2254

Closed a1424360017 closed 4 years ago

a1424360017 commented 4 years ago

If I want to achieve a simple communication between severs(conodes) and client by using skipchain, Which part of codes should i learn(only skipchain?)

a1424360017 commented 4 years ago

All nodes are running on my computer

ineiti commented 4 years ago

I think a good start is here:

https://github.com/dedis/cothority/tree/master/scmgr

a1424360017 commented 4 years ago

I have learned scmgr and easily achieve that code: ./run_nodes.sh -n 3 and start three conode I just want to make an experiment on my computer , so should I achieve the goals in following parts of scmgr? 1、Securing the conode by creating a link 2、Creating a new skipchain 3、Following a skipchain

ineiti commented 4 years ago

Yes, that sounds doable. Alternatively, you can write your own go-program that achieves this. Either as a main, or in a _test.

a1424360017 commented 4 years ago

Should I run following command of scmgr? ./scmgr link add co1/private.toml ./scmgr skipchain create -b 10 -he 10 co1/public.toml ./scmgr link add co2/private.toml ./scmgr link add co3/private.toml ./scmgr follow add single SKIPCHAIN_ID localhost:7772 ./scmgr follow add single SKIPCHAIN_ID localhost:7774 ./scmgr skipchain block add -roster public.toml SKIPCHAIN_ID ./scmgr skipchain block print SKIPBLOCK_ID

ineiti commented 4 years ago

Sounds good - what is your final goal?

a1424360017 commented 4 years ago

In this step,I just want to create a skipchain privately for myself and then do an experiment , which will achieve a simple communication between severs(conodes) and client(all nodes running on my computer only).

But I am confronting a bug when running:"scmgr follow add single SKIPCHAIN_ID localhost:7772"

the bug is :" couldn't add this block as chain-follower: sending: connection read: websocket: close 1002 (protocol error): unexpected error: processing error: wrong signature of unknown signer"

I do not know how to settle it.

ineiti commented 4 years ago

Hmm - it works here:

cmds.txt

ineiti commented 4 years ago

What kind of information do you want to communicate? I'm asking to make sure that skipchains will really solve your problem...

a1424360017 commented 4 years ago

I want to do an experiment to achieve an vote system by using Homomorphic encryption The clients will broadcast his ballot papers,which is encrypted by cothrity's public key. The cothrity will decrypted the information by using its private key.

ineiti commented 4 years ago

Did you look at the implementation in the evoting sub-directory? There are a lot of pitfalls in an e-voting system, and the most simple approaches usually have a lot of possibilities of discovering the user's vote.

a1424360017 commented 4 years ago

I had read it ,and I know the steps In theory。I am going to implement it

ineiti commented 4 years ago

Hmm - the thing is: it is implemented already. So why not look at the implementation, ask @jeffallen what are the current shortcomings, and work on those?

a1424360017 commented 4 years ago

Thank you very much.