Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

User Test Guide

zhaojun.sh edited this page Aug 8, 2018 · 2 revisions

The FUSIONDCRM can implement the distributed signature cross-chain transaction through the DCRM technology. We can test the cross-chain transaction between FUSION and Ethereum, follow the steps below:

WARNING: This program is currently a beta version. Do not test on the ethereum mainnet to avoid asset loss.

0. Prepare the runtime env

  • Install the Java JDK
  • Install the libgmp

Java and libgmp detailed installation steps, please refer to FUSION DCRM Verification v1 Guide.pdf.

1. Run the program

Download the program from https://github.com/FUSIONFoundation/dcrm/releases/download/v2.0/FUSIONDCRM.jar

$ java -jar FUSIONDCRM.jar

2. Input the number of Supreme Nodes

After run the FUSIONDCRM program, the output info as follow:

##########################################################################################################################
Please input the number of Supreme Nodes to generate the DCRM private key: (For example: 4)
##########################################################################################################################

Then, we can Enter a number greater than 1.

3. Generate the publickey and address

--Info: User 0 calculate Commitment in KG round ONE

--Info: User 1 calculate Commitment in KG round ONE

--Info: User 2 calculate Commitment in KG round ONE

--Info: User 3 calculate Commitment in KG round ONE

--Info: User 0 calculate Zero-Knowledge in KG round TWO

--Info: User 1 calculate Zero-Knowledge in KG round TWO

--Info: User 2 calculate Zero-Knowledge in KG round TWO

--Info: User 3 calculate Zero-Knowledge in KG round TWO

--Info: Calculate the Encrypted Private Key
 EncPrivateKey: 173129297402630105227105953205118887306461372786222322125320477827447828019225499516552526168086102568606940459886071322614330911605324610312662951585500252781733578756183979715608649072813521734867554929845768111143602248326395637542993557390405142611622312511183965309139104865546788933259747290500682266359031781377749354960503125565815078439896647761646290774104094341214212979514719409680404055642521552624386081763928948987162466840284557425315655845692548940731111238027515123342266973779902729825894892790709400984842867845044111509544877100664526299215624366971084660792612552054923509305427404483859944275596937085766580446679017618760369817193163417206271491858437362096289131277820187242518309547764245624784785565498954663989099641866360981547524718096425890847765687710152980921491136779434404235499788259332304384750499097265829505975461049379655653205526612883621516699194082466244802214461442805364789987107297983326515672847074780666425780349343609446096136767492608347180975815852615456685330254908844923468945092371076276677767483611281322314735430671870589163829981057579848145438002847786603541628663688407094929115411617860809106091412083830541139312594722980175421253371044954418048001050828079376698627637410

--Info: Calculate the Public Key
 PublicKey: (cc87103ad6c16788b5a3a75d3158b848662cc725210d7c5676cf14e78f4b1bae,0d99b1124d3befbc9bd60633eff9d58fbd2b4312fd082ef3cca2862b968c6823)

4. Send testnet ETH to DCRM address

##########################################################################################################################

Please transfer some Rinkeby Testnet ETH to the DCRM Address: 0xb3537d0bbc44a368fc984e8d8e7e1d0ae4b0e43f, (For example: transfer 0.1 Rinkeby Testnet ETH)
Do you complete the procedure of Transferring Rinkeby Testnet ETH? Yes or No? (For example: No)

##########################################################################################################################

We need some test eth to transfer between FUSION and Ethereum. Get rinkeby eth from here.

5. Set the ethereum receive address

##########################################################################################################################

Please input Ethereum Rinkeby Testnet Address to receive ETH, not with the prefix '0x': (For example: 0520e8e5e08169c4dbc1580dc9bf56638532773a)

##########################################################################################################################

We can input the receive address as: 0520e8e5e08169c4dbc1580dc9bf56638532773a

6. Set the transfer value(Wei)

##########################################################################################################################

Please input transfer value(Wei), and confirm you have the enough Rinkeby Testnet ETH(Wei) to transfer: (For example: 10000)

##########################################################################################################################

We can input 10000.

7. Generate DCRM signature

--Info: User 0 calculate Commitment in Signning round ONE

--Info: User 1 calculate Commitment in Signning round ONE

--Info: User 2 calculate Commitment in Signning round ONE

--Info: User 3 calculate Commitment in Signning round ONE

--Info: User 0 calculate Zero-Knowledge in Signning round TWO

--Info: User 1 calculate Zero-Knowledge in Signning round TWO

--Info: User 2 calculate Zero-Knowledge in Signning round TWO

--Info: User 3 calculate Zero-Knowledge in Signning round TWO

--Info: Calculate the Encrypted Inner-Data u
 u: 39504820025179536827510279017741397597606695478590578134875027510120872198782608545857511911463731364366042695952070211364665581607306387603199197145469178430447811186773573095997047832477355726137940624403786727621976150158656704422241114687069610322853604027472463324683062042384521510661401946201128035969280459348463298259263821643096481269208721014874679431495596547218370694833571130402788324435923172574357074573785085910270468754952080305727697417088715272355741774771112682968725888685268976979620168311537706478591919617576523278715667334118799868292158158462671321977718958805590916449314674033846138239259480854900921999136185221444863355639159442752053341217921276964119101793829349793752117204774987846929897630740835951981474516148290874500396970374929646868819519675463631485890392262462323906448731935468482498624521533147684684867890144616400210580020504761688088608687435995890561831634969312632515217321031716542720754010612623316807300394947073504453451436723702194546226687283473161246958009863908846960697768777788491632621732432330238749832445541503701095325213408111304532828831048254525892467690871896283125163264398387183340546425971400607287291687182013185931101872916666840969128819413377677059130362153

--Info: Calculate the Encrypted Inner-Data v
 v: 189366226192951467869869105948506565808518051775774403500527670100978826171789280068158246659162334147199550551300867670555793506789401343025897984896140517553602608179423887332073678113554515316582026769367978744917072307549076193244441919147501688987645422195972750771722537411744316151191312627439732286213547948983398844324637587346843632126377290115235551976550845092251971690251917502334057723677787525210857761578739437484558683015870068014228719383243420938043888723387505277135464518264738043976065799201912779694935325914411640340930267331894258420455606731261105658453311865399329413649320629206228567660983821320615639200651303549837374066492029667327835933942609873630830037798269551916536906114616232231899829571919714694904780375306734858360073410853333056957308092334737919825274412587669802510453164074068378464085834136364549149715457349608006823681748358148416160909926911519413091056699909516495295931015037712489533718310977635645872954574038913693024825476989554602050187399823697748236419970271642049726029706054258728092525599012521697632613961203382541163395653266359244666281040833823700147277894697953194104758612370160384028728812497696344525843831893758708707682394435580905182926483126320897607701422058

--Info: User 0 calculate Commitment in Signning round THREE

--Info: User 1 calculate Commitment in Signning round THREE

--Info: User 2 calculate Commitment in Signning round THREE

--Info: User 3 calculate Commitment in Signning round THREE

--Info: Calculate the Encrypted Inner-Data u
 u: 39504820025179536827510279017741397597606695478590578134875027510120872198782608545857511911463731364366042695952070211364665581607306387603199197145469178430447811186773573095997047832477355726137940624403786727621976150158656704422241114687069610322853604027472463324683062042384521510661401946201128035969280459348463298259263821643096481269208721014874679431495596547218370694833571130402788324435923172574357074573785085910270468754952080305727697417088715272355741774771112682968725888685268976979620168311537706478591919617576523278715667334118799868292158158462671321977718958805590916449314674033846138239259480854900921999136185221444863355639159442752053341217921276964119101793829349793752117204774987846929897630740835951981474516148290874500396970374929646868819519675463631485890392262462323906448731935468482498624521533147684684867890144616400210580020504761688088608687435995890561831634969312632515217321031716542720754010612623316807300394947073504453451436723702194546226687283473161246958009863908846960697768777788491632621732432330238749832445541503701095325213408111304532828831048254525892467690871896283125163264398387183340546425971400607287291687182013185931101872916666840969128819413377677059130362153

--Info: Calculate the Encrypted Inner-Data v
 v: 189366226192951467869869105948506565808518051775774403500527670100978826171789280068158246659162334147199550551300867670555793506789401343025897984896140517553602608179423887332073678113554515316582026769367978744917072307549076193244441919147501688987645422195972750771722537411744316151191312627439732286213547948983398844324637587346843632126377290115235551976550845092251971690251917502334057723677787525210857761578739437484558683015870068014228719383243420938043888723387505277135464518264738043976065799201912779694935325914411640340930267331894258420455606731261105658453311865399329413649320629206228567660983821320615639200651303549837374066492029667327835933942609873630830037798269551916536906114616232231899829571919714694904780375306734858360073410853333056957308092334737919825274412587669802510453164074068378464085834136364549149715457349608006823681748358148416160909926911519413091056699909516495295931015037712489533718310977635645872954574038913693024825476989554602050187399823697748236419970271642049726029706054258728092525599012521697632613961203382541163395653266359244666281040833823700147277894697953194104758612370160384028728812497696344525843831893758708707682394435580905182926483126320897607701422058

--Info: User 0 calculate Zero-Knowledge in Signning round FOUR

--Info: User 1 calculate Zero-Knowledge in Signning round FOUR

--Info: User 2 calculate Zero-Knowledge in Signning round FOUR

--Info: User 3 calculate Zero-Knowledge in Signning round FOUR

--Info: Calculate the Encrypted Inner-Data w
 w: 7586051401187218573721256437751971062004489865678537694982281664117025988752294332985846611737195343970919245051864516525210966962241844268735018226737730646175561800116694932632653090258713449035784808474631042287069112877554932592921670358654715787015924952641732922041787301067210589957987182848853004715850050709901618179103958044021389443150733519549545354564270133020112252095365910572574123978542911105890460045305446049152771892557795827691689405379262729156103523776352988817109754956373343364395600510768666186253859133843039990385072615575542973857927161765224034203380151278212103910193696660616738491755582508963186692067860834375572777904721729799526181982105752258684821745125317619024226768613152903218704887932899930845012103029086551930771999584214751132085472460119424969792048961093083744498695765329684620048986617208548734129657032226071604625988705463288530727074548440581113536377113206122543340941940147028942929632418963574902894377799965966344188220588474353432426887739763495936402302087955476426426723063944411012286769260453700175098998270994286584209978662261254093290456970308987754738317729538707110221156288665281441563727808646230849524427121836522350039210513570389178300251958124408885555041200

--Info: Calculate the Encrypted Inner-Data R
 R: (ce5d7391af386136030a2f4b02d59d9af38ed1cfc11ce35e609bdcd3f6790c8,b22ee081ee78ad46a43deebd18152397594cd7f7114dc8b33ffd6664a1c968ce,7829d8d76fec69f47ce443026ff075b468a5b37abe28411603861def288eb30d,0)


--Info: ECDSA Signature Verify Passed!
 (r,s)=(53b6dc870950ef02f1de894471280ea9a3732e937a2c2ab201cf60d558657da7,88b163bf83b017d20cd8b9a125571d46ee1fd9033535a8306ba12258d7f04b9) is a ValidSiganture!

8. Generate the FUSION DCRM signed transaction

##########################################################################################################################

Successfully generate the FUSION DCRM signed transaction: 0xf8668085e8d4a51000825208940520e8e5e08169c4dbc1580dc9bf56638532773a822710802ca053b6dc870950ef02f1de894471280ea9a3732e937a2c2ab201cf60d558657da7a0088b163bf83b017d20cd8b9a125571d46ee1fd9033535a8306ba12258d7f04b9

Please paste the FUSION DCRM signed transaction to the Step 3 (https://www.myetherwallet.com/#offline-transaction) and press the "SEND TRANSACTION" button.

##########################################################################################################################

9. Send DCRM signed transaction to Ethereum by myetherwallet

Please paste the FUSION DCRM signed transaction

0xf8668085e8d4a51000825208940520e8e5e08169c4dbc1580dc9bf56638532773a822710802ca053b6dc870950ef02f1de894471280ea9a3732e937a2c2ab201cf60d558657da7a0088b163bf83b017d20cd8b9a125571d46ee1fd9033535a8306ba12258d7f04b9

to the Step 3 in https://www.myetherwallet.com/#offline-transaction (No need to fill in step 1 and 2), then press the "SEND TRANSACTION" button.

Note: before send the signed transaction, you should set the myetherwallet to Network Rinkeby(etherscan.io)

10. Complete test and Check the transaction status by etherscan.io

Now, we can check the transaction and account status:

https://rinkeby.etherscan.io/tx/0xc4dad7897ca3f6bf9f84cf671ccfd104e4437f8070f49a7a260c3371371f857e

https://rinkeby.etherscan.io/address/0xb3537d0bbc44a368fc984e8d8e7e1d0ae4b0e43f

Note: This java version of the DCRM program simulates multiple node distributed generation key algorithms on a single machine, and the next go version program will be p2p distributed generation.