{"_id":"iexec-poco","_rev":"54-8ef544bad68b8d8b2c68db07a3e8fe6c","name":"iexec-poco","dist-tags":{"next":"3.0.31","latest":"5.0.0"},"versions":{"1.0.11":{"name":"iexec-poco","version":"1.0.11","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.11","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"1b0fc64b36c09194f7c47392b3baac68c36755dc","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.11.tgz","fileCount":140,"integrity":"sha512-mJAxOiM8+oTT6qci59MdUHQP8DqP9FhrMUzKTMzJ/gMVf9gNYCQS+0LOaHJSyEIJPCy5sCfVSmoVwhnDbuhcEw==","signatures":[{"sig":"MEUCIQDPREvTK7HL/2ak4mv4OeYrTgscxhz8tF4wcDlh4fCxdAIgFQOHpTuK67VfnjKBBXxtVXFgBB9rjNBnOjW/dUL5vbY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9596090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4vllCRA9TVsSAnZWagAAgywP/3hPlQ2BE4e+3Nu5yaq7\nZQXBTYq5ie0HUugoNSehYCZHDlvDj3aca3hPMpyDgNmM4rNbmnliOIycBMTk\nejEFyTeUhx10r1B+qneUL2kZDH8Iywu2N9HamGxnDcQimMJBO8ER0ApgdlJW\n4kyiwoDEEQZKOV3arb7WeawCpx2rtBJGcL/dnfr4UkwyR2fcPLf+QXZiUsh5\ngCilzNwVyg2N2FVqS35Q2y1fzFsS5NL4pkX0CZ+AQr1LZqd3UAhhczYAjSCo\ngLf92nseYEVwwU+EG0CytDBvrKnYHMpkrmtMnmH4DIac5W0E91qS1pNo5Ide\nt69yjNK3Ft1EJBdp0SoaGtggpTyTMqmOF2D+mm7THgbUZJ0xGMf3oI/iRl6t\nhV6JO2h5UeqYu8DdGl1dpVUyJRWG9pJ9UOABY8cYIsXQ6ariRvswXtFRNsbN\nw1suXyUPB0GJeWxxJV03WEHEwaqNWpoeExIpwUf+gTVbKmWIVsVcdZGwEDh/\n9a+PiNLv6rsksnaIXNL3gLmbVLfi82YCF3/lsTia3YJS4KFy+u7T8z3YGUzR\nhCab/TSAOOp3RS+PpLzBHqTNWPvFEELQajZde/Qy9dW0EILFwloCjQ6CG1M2\nRseuECcWZRtozRCep2c4r5NVwz5txojs8jLWHZiq1E4SpVaJMG66F8VtGtDd\nKVLu\r\n=qukb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"3d20c3319a6236371def2c6acbdfaff606f83d3a","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"8.4.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.11_1524824420450_0.8423747023894517","host":"s3://npm-registry-packages"}},"1.0.12":{"name":"iexec-poco","version":"1.0.12","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.12","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"19b3da35ba2c5645cc162906defae88028235551","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.12.tgz","fileCount":140,"integrity":"sha512-XmmdkqWQrwsIcc3V0SNH6AEZN/kEHVHdjTKX+geTFMjSLc3ARaFku2wpAFbJP4qvVMut7Laxuv9HLCeH+Ax9aQ==","signatures":[{"sig":"MEQCIAlUZtMRhbvbRb7rrBHXsKP1d3rh8uJ+grgZlQKl2R7eAiAdwQU8/+eUTR7T5uLTVaV5jmJ9TWd5UyqgRecJ0a+a6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9770706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5zwJCRA9TVsSAnZWagAA5uIP/37mjzsFgG/95UsSPqjl\nwNLofnWK8J3oiIsRkMaFUU3H/JLVHVmsmjkIVAQHDbnkEnwO3tWayUYGqiS4\nQgb6rTvgu8wZzl7CIEvk7/3Ufdd17RbW9QgIRh6iGru1yTDU3KMUH2tdZ15s\nHOl00jy+pWbMXII7zlBAp9tTvJjsM5xUgHb3sdBesVJ+zT5Y2AyOsgq36db7\ny2xa2MlcwI6LZ/TDWDeu3VJ/vK2C5kw5Db2l/8QS6xyFYM59ZRhV1n7Ylmge\nrERQXxngHsxm7V20hl2bDVffe83yHSEVywftQQockCgxeDiZFXlOdZw4YY67\ntqjO9Qo1AkrFVqOCFHjlaWItqh1x/LvOIoIPedWio8O0lVL74pOujzako+e9\naCJ8JHdgIKvXG/xJr3eE0zetr8bBEWiA8C1bzIyXqk3bn4WF71c92j5Z4etr\nCkwWGIAMxqw0tiZ2MR5cznn77Hv/mi0BtZwlNn7d62Ons1CX40lnxJUnInVv\nQUjnI/f4L8iuakzOQcwuPN4FtHw2/mqPwno5+iLRxOhY7dEHSZUcabPG/u6V\nLXsmALLVyDTFRkhIhBFRxARhtX7Khv605dGGeFTudypspDxkX0yyb8cy48sG\nO/ssk0lUe92ZzOToDez0gOkihDtVDcK1RqUzbXit1TFctJwQwU0/6/HSN37K\nawwF\r\n=3Wnl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"b372822f4b2df63146c4e554fcc4d5bf26cff5ed","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"8.4.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.12_1525103623736_0.5749249056486703","host":"s3://npm-registry-packages"}},"1.0.13":{"name":"iexec-poco","version":"1.0.13","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.13","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"f41100038d45e7bb0114056e9c6457fbe516ca0f","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.13.tgz","fileCount":140,"integrity":"sha512-rJhA81FCIInMFZARPC5/HnaHig3bsPSf6x+BWAVm1+ke29c0M9zVOcUVmF9K3jiEqX9MCViKsmZnZ2L/a0PiWw==","signatures":[{"sig":"MEYCIQC822C7mhrzHXB3waSHlK9MT61SF89EZf+K35DrrA89GQIhALHsRGno2ZBn7iw7uFkOsRSQEt+hVvOvoZU8s/cxaf5z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9770787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8vccCRA9TVsSAnZWagAAbO0P/1suhyKYcQl6ZDeYQU0k\nDQ+CMybfmzulLp5BvZmcHQyci7Xk9D6jpLRixfU2OI0UIrCdr4dDpgsv36M1\nlVqVJd4UEIs+9dOdpqTYg8Gj38knNFt+DYUp2I6Tdv5Qkl72EwNTQ2YoX8ZB\n5D4/5+ST25+6EsPzhAAqwGg0Z/wzmKEpBURAM82pb+z8qscJkCfLSVwhV+ts\nv5ADT4jku61oJEHvHZ0uA3Wxk/NAdUWqDE3AVIOKSjuV9hhdc33xWbbim7cC\nRI3U1+UL7ijJc12/PSACeQCbap3jxBPgJA9sHcsiIpeVukVFv/ohz8WsGvbp\n17okF9icZ0DYSIj+/+tf0o5NBzn3HswsnU0x+MGT+yyFR2vpW/L2yknpqtqr\nn2RGKjrl3q7iPtYaFbF37I+oyrLQWWZOeMnVYscGG5yVgMXIg849wSTuo4zZ\nYetvs+e31gNFfkwEaCBUno6O1RzNyU17w8PptTm06GZ7l2GNbZVlogtL5RX0\nJheiMS4jft9nl57mumM0WJmlhjNVT8jQcbp71K9FmZIZ9xtezre5OHDzhy1p\nFzikaHCxHzWBdfyzkUwpRe6azPNHfvTLXVCT/uyzx5He98ErKI96rUCwZszS\nLj3Z7xkmxSHaLV7wg1mOI2Z5SFh3SIw5JOH0ZjgNNF6QDwqAPhTTzCzMPz+9\ndtEd\r\n=1baM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"1b24ef29c2bc8493e3b9a821d51334c3135fe335","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"8.4.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.13_1525872411886_0.6400822377892721","host":"s3://npm-registry-packages"}},"1.0.14":{"name":"iexec-poco","version":"1.0.14","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.14","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"c9e95581f185f9523ae8b15ff30aaf6970721369","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.14.tgz","fileCount":140,"integrity":"sha512-fpiv0OxNcweJ1CTV5+BC2zOeQqlWjOvMa8BZhi+QG69PU7eVaWTCPZlL57m1DMKFQehzk/ROmSUmqKQxmBelBA==","signatures":[{"sig":"MEUCIBvydXmI+Ase7NltSWGuONb5TV1MPUE0Xr4YD1d5ZCz9AiEA1kcSgUYej5oFoNeC3wqB5ImqT0UnmCJUFu4Jr71BlDk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9770868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbA852CRA9TVsSAnZWagAAd5kP+QCakQjtxgS8NmBSXnV/\n0I/qKR5ZK4IoQ3SH8I9pJidCblvq4aeOOOM4w2qlhvljDGbP9DibcZ/5GjCS\nTILAO36h+R9orf0X6TlVJNNUGwr5sfZbYRKOmmsE5VZa3p0PH+b8i6wUd4oa\niwb6KgWD4nsNVtJ7r9+sYqvszY9d4zNVlKpjFkdCm+SJ1jzse19kSy3b+g0c\ng3SDmTBkq+4r45vrLzvo0ttI9hUvjgiheqjd9StPfmsbKeZZZ3VEk0+jf0kG\n6ZSi0NEffkgYqBRY6KnhMCaC0WqSjNMAmU16QaF4dNJBNRS0/N9bVEGxniIL\nmSHRk8nM/l3l4fLGKGSFSjKrlo/zlu1Svo5qYo6aDQEsRSlJUPmf9fREs6qK\n8quRgLygEtiNwG4uGc5uia+IU79zRa65kwAvOPJ7SCwKeMIAtO7poTW0a8aU\nwWqr876Y4bP3UBZRlXB10rKUd6ztcLYLBNthVk/t1kbMy+/DFXc0oXVJ6Duf\niQ6sy7JCMCGC8CHUKCApsP4iFGxf/uV3VTCIrKR4FOUmd+k2KYbPEvJhtyjo\nfw4mnGtLxVUVTQwJMKUdrgZaxg7jRfXghq6rzmcfMFHK4YDXFbjengUkNyFi\nCWMvycivRGB22hruGl+j4fKMLt8IWlbbWOPZks6iSmOK62gRYlVLIfHiqhTY\n1QB+\r\n=CoRz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"ec2c63e3076bf5ae11cff9371c8e5e07a53b0042","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.14_1526976117678_0.29780769930563755","host":"s3://npm-registry-packages"}},"1.0.15":{"name":"iexec-poco","version":"1.0.15","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.15","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"f77b6b78cf0a32b2e8c003f5a772b7a4120b37e0","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.15.tgz","fileCount":140,"integrity":"sha512-I6FvwKpg60F1inwt9ljtbnd4QHyZyy2QtDzTQXaGylhxm3aKYSJVz4YXCrNTqR+FBNfbqkG70rRlgKAEbYPzsA==","signatures":[{"sig":"MEUCIQCQQu4A1uzvqRbIEjoPQ7sXFNYyzULqlqDesSoCKp5qrwIgKvND2rlTgYZ2AwyQ2Tk3UmTzQz6853amX1NPHi/gGyk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9770868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbA+7VCRA9TVsSAnZWagAALvkQAJA5TSS/9kjrahq60gxL\njfWfl/NFh61Uoa0Y+1FhfZpoADppHKIHkXSSvanDZK45o1bYGRDDTXLQbHgI\nlbSU5kpAa2S8ZS944354Tlh5KmWI8UBSBSg6PmyB5YFrrm4pLKDOGGJG8VVr\ngSbDq6iv6zcyzePLX9u3F1YKmRav+cjXgh32zOGmeQawdwCA7im6L+jATXWy\nlOrv6Y0OzOv+jBwLqgI3idJTN3ial7gP/Wv41am1VbE//FP+ly+FWRV2N4IT\nrDTuHDbKOMwcl8LEd60MhqhE+wllMFA6XnO59FdcBU4yY6ExaXk0DWVh0tNw\n/p5V+cKnAsU4WMd9djsBIXnRtW0RYlxfmUBUgmAWUFk4plh2tHLHE0ByZ3CF\nMIXpserF7EpvKhJO6ehhsSJj9LwLiX2KIlliIPDxFSazV1DAStWnDnHfT94J\nnG2gFL2mZYNrp4sMW1NgbqP6RGqED4xo+/a5GmRGOEaWmc2uzfmHIw7vCLLu\nYp1WqeoGHWtVEMoIR7Zwx3tUp5P3FroyzNu4ka5OAFgyu67fTfBsyx8Jk0qm\n7XvFjAnvSeHocQZqymfTrjF1dD9mqPgVMsp/8BPyT/2AWk0ml2a2EvTqhsZu\nnY9IF0DgZe14/ECuXGkXYcVgUPaGIeY2ekJfFt84RyUDM+3nfo+t7w+blfSN\nx7qW\r\n=RrVi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"8a31ffb4358755b8248e93caf943aa14ac5c16f2","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.15_1526984403646_0.6552385185941918","host":"s3://npm-registry-packages"}},"1.0.16":{"name":"iexec-poco","version":"1.0.16","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.16","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"1c26f084b0e2b749f31335d333627bd30c554d00","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.16.tgz","fileCount":140,"integrity":"sha512-RonSoVymFtCddVLQmchmV3bNh816MahjU0D7QSsKQ6tAwTCDipy4GxsKfZLupSZn5yGiE312fWobnDs82MdL6g==","signatures":[{"sig":"MEQCIG3e5CavpwhRPH9BgrsNA1KlcUMOXlhmcHrVbFqRAoSwAiAanGz8XlUz+pL5zTU+jvCru598WjXs94snR9zvagccPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9770868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbA++OCRA9TVsSAnZWagAA1uQQAJbK9gvaoMnGT1lOKGwc\nXc/D4x2F3eMK4ICIgvGUidkQ+WXADcGidyaAeXbS4PcBXs5ByaoR/E/h7UMA\n02s2foaq0p/soq0xzeiPNG0i15pByDW7oUSgZ21rf+Xi59WFnfoa8DFl3WRi\nt6QBxcJEJErJ0k7vUUJ6ivR2T+Cjg4FLeOYCZyL+7c/x26pmyVkcfy37gcDZ\n0s3IiX+7bqKl5s77idymrFYHseEuNFHICVLxugs+Sz1hcyLwqhEp/lpSB5RZ\nunpkBDR/jmh3vJGd0WS1kEfCBYQMK4deTQnwNPJuoOjS7Ya8Zds8gIRmhqft\n/kgn7GGaw754Qcm68X31yvaEFcQLJSKUgGZOYavjsGzrflNgz703NNX+iSYj\nnzVeQa7Pfk8Rvj+VEZKQDf6j4jglqOuBcSERKilUTuvTZatw5Vn4SHN6f/ia\nTcueM77FqrVVmEH2JS/cVFxRmcB6kxPQqtJmHNo/rrOjqfoPdJyKBVywjMZF\ndMVAGS2wndjplx99gxp+OCKEh1j+jTxohnosTFE6QqC9CyKkZsKfRIHb9ldT\nTIU+fdvqC2KipSZgoAsgS83E4ZenhOXPUnSutZpZwR/slUH1JofHieoEzD8v\nll3Yw3lQKSC3J/a8xBxguQ+HSF0ZivXCcZvjsNf/lx6+hhQ/OkASuA4of8Mv\nonJA\r\n=YO7e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"8a31ffb4358755b8248e93caf943aa14ac5c16f2","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.16_1526984589141_0.38561533686941263","host":"s3://npm-registry-packages"}},"1.0.17":{"name":"iexec-poco","version":"1.0.17","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.17","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"f8e85869171fecb2725244ffaf9b7cc02bd9acef","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.17.tgz","fileCount":140,"integrity":"sha512-30Smh8ab1IbLB/Be8DKzwNH4u7yaDODQHsBDs+4hDhHGVaK2drGznHdRfCDcYlAqQs8bdZCkcdefG0/mAnFltw==","signatures":[{"sig":"MEUCIEmWTuQkID+Ab5NLWR3urOcjMUCkOGFjYpJi5Ynd3tn2AiEAiVRS2Lu6cYXQNzS7OREDf7qsbQyH7wfYdNLdnCrp8kQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9770868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbA+/TCRA9TVsSAnZWagAA+bQP+gNh9e5+SrhHgQ6dt1N/\nZ03JSZzrt3/TkIZmLRAEz1h0cyhevqCifvk+sUrID7PtbrTJO+jYZVZMZlCu\nQxnzzukEIvFFxjHN9OJMt81gfNkcL+rHfk2XyTN4rHoY6JIITEaQd468YbnC\nU4SiSkRlBkOV8RbxSqlmfOX8bdSpolg+wayo/0QtIRIVl0hycYKOsh8PQv6u\nuiBWJpxA3BHwjz0HxrHpzpxYci99BoYnAj2DtsNgWy+Mdb/HBv6UTxKP86pY\nu4p5MR50+GOUTvj/z5rM8WIBg3/gtLDNlvdMEKXuRt6pa4trOdDGplsf1wkt\nw8JPJgOloOp5KOLKKAG8ZnS9GKL7ZtbOXbqNWaw4AeSE0fB9jxcAIWFFUp82\n9JHl9vqBefi/p8AbaCb8AbZ5g/8r2GhjPySTaUmi2KcwrNK6laypPsyhVhWe\n/xZ/1p1XzL6Bmt28jepm9grS5kkN0FKO62tl3P4sosgiIvJB/RTruOu1e13z\nI4b7mIZDZVU7h3XPVyUGRkLEmnniNubC2+3WNGoYvxVa6XKM1tY2Tlvm/CXm\niZ58a8UG0psGrPnKly5nANkXzFnkvd1GB1JB7xrOpPJli0LMjS7HLyahUOdc\nMX0hkdFWdMy4vXxOzNcsjbn3QnRm1+4V1WYqYyg1weHstpaFsG4in29VcAmv\nvQ+S\r\n=ypPn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"8a31ffb4358755b8248e93caf943aa14ac5c16f2","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.17_1526984658640_0.8887851418320256","host":"s3://npm-registry-packages"}},"1.0.18":{"name":"iexec-poco","version":"1.0.18","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.0.18","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"eb251699896a3168675bc17982189f54ed1fe237","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.0.18.tgz","fileCount":140,"integrity":"sha512-qFFjaLt50IpSGe34JSEJnZ0m83Edb0PRw0JYThGV9QCLu/xr2eHZ8ONp7cXAEKG9T9hJHGa5muwEqYzV5+Zs6A==","signatures":[{"sig":"MEUCIQDpJzVoVGPRpjoYwx4rvt2jEvu/QJAyIehPuR2TZKlr4gIgEVWa1mmSR6/8MVvL5kt7+XRZ1pQn/fopECweAkhxB74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9770866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbA/JdCRA9TVsSAnZWagAAAX8QAITg/92vBrjJzYOmU/Hw\nQTSyBwK1bH3kBJUGzGh5BNSfVwnOU1+bLZfgIy7BWu79GILYsmSQsIv5CvTG\nNSSLDNEY29a/az9Z36FEG1OcHQ0pF2HOQzuD1N4nlu1VfyfCxZBU0TDCklI1\nVVOc27YePRo69ZZS9lBvZz6RQt/Tx8kJ0JUl2SM87kUZIEyBUNOboZPo2LTq\n0cHPKce3hjeg1aAFOcEB3njCd8GVX8zAajHglxlcplUcU7gXa9YZAPgAKOt0\n0Uctcez3P6LAHVAysRMWMxsOPj4VUoo+Fo2kEUE7+Rapc9zI7lq4qPEecMf6\nDfFeLE5KbbN9k5s27NjMxtEo3fNbVTudkfl+AtzBY637E+vRpS5bZgpFzSAR\nHn0Cjmi9FhLgt9AapygB15DU67QYYlTEBkLM/6yCREF5AKUGfIJAkn4VuSO0\nVRabHz2e3c6oPnfeGeZTq2u04Eh5puXxawYZB0JGLXahbH+vukSJEOr41ML0\nM8IvPYSViS3g21wcx3YgCEGMnrMpbWwfanAGym3/tYl2k730H+YiGym/WuiW\nHIfBju2o6PsP4i0BLMTtmJdr6rO1/JGvNUtYznFrlwTF0+YeeH9jM1ePuMiR\n3RhNcUyVRplx3IOoth+60MtfOcqvlXHbj+oeXBLfQsm4ayHRZKHJOH+nWoyp\nInFZ\r\n=T7Kk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"304b50b4ae2f58118d92341245d5ed87e881bcfd","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"^0.3.0","truffle":"4.1.7","bluebird":"3.5.1","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.0","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.0.18_1526985308813_0.9915371375287723","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"iexec-poco","version":"1.1.0","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.1.0","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"b4166fedb356f02fe9701f421b85fb39be1f65fc","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.1.0.tgz","fileCount":27,"integrity":"sha512-Vut20LS7MbzitLn2GIQte1b4Ajmv/mYvopoohC8xwebxyXJ6eyQoT56xLEfHq9U0mKNHY409p6AIePupuscRdw==","signatures":[{"sig":"MEQCIBV9WtrvHXKpqppv2ieYgK1z4WRF96flapktX+REvDrpAiBzfpZRNNSjzlhexuGzOfysWZVpHcEYNQcbbfaFOP30GA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7839537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbA/aOCRA9TVsSAnZWagAABmUQAJgzuX9SNiHPS9+PGBbb\ng6PNngI6JBgFQXPTlPUejn72TstniE8dCe9a+PDU1UUBq8+PASgAlgg1mufT\niu5kLt5qfljfFM6miciFFuPeVLd1L8F104JEz8C2msJWuxrwSkViOnX2Qq/H\nCnBBiDS6hB1orpV/QrM6ab4nFLaal7uy8BBsz3NEW6EWvFIMSrx3HSkKFZLe\nbKV/ZuN355WPy7E3ThqiY1IXQ7k0p7yyMB6HpDyExPY88pZDtIId4Wv/w79o\n4ItexQaScnO0N/b30xW8myZr/T+F1ZuyDfHjdBhgfxFUerBu4mrPp4qUmvhr\natCSjmgLXJrM7b1RkkFadmfmxbPYUARHTp67vZz76iHScYshXTnUJrRyy/yF\n45B1fsAbqtaHm8VfpJaIG/xQPLhyMC2E2Yszo60GWGHHI4qtWHKQK/IMVM5Z\nRmmsdFOmhHNXLPuNZtPQS/KwOt9EFQJPWjRQ9KJOiXxNGOHcFNe714MgbFhy\nNfgP7YxEeyen8N6Ru9u6//xyEK96MCkDs1Ha3s4MPd9MAd0xVlpf8tOz7pKP\nY3bIaugAyI1Hf4TtckMQHzv+HW8y5UVWG4/wguOyMyBZYKXx5fzjQaoV8QRU\nU4ZokejltfQogelZnhuj0o0bEIy17SjtdU6V35YINEAIPmvnltBwFjPzV5sP\nETgF\r\n=92fD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.6","lodash":"4.17.10","replace":"1.0.0","truffle":"4.1.9","bluebird":"3.5.1","coveralls":"3.0.1","solidity-sha3":"0.4.1","truffle-contract":"3.0.5","solidity-coverage":"0.5.2","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.5"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.1.0_1526986381498_0.23003634620696833","host":"s3://npm-registry-packages"}},"1.1.13":{"name":"iexec-poco","version":"1.1.13","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.1.13","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"a9008099243caad0c193c8bf3e66b09e6f7d8cbb","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.1.13.tgz","fileCount":145,"integrity":"sha512-p32Il+ucs9E/aeDFjcm43tQb928btMLQJPIR6aYHpqpellefDXtBFefB8Axecoaq+V9ictxOkQ20GS4PWc4LzQ==","signatures":[{"sig":"MEUCIAIqEyQKvs1H7E98CuY4eF5dRSh48i+aE6hc3279oDldAiEAoqrEc/QiRWUU/wK7IAhWSd/Av+rXVjw1n8Wj5JUZFN8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9737137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBXq8CRA9TVsSAnZWagAAUa4P/3g52G8eRLvRTokzlI8w\nhiXDq7IO6jwftnMXjnEvF80hTnfQzyrzwPeuVg6q3zU4EmRXLt66CJ+lLg69\nXl7t+XfBqoB1GTFU3LwdDyTEm4WTb4K51saL3zfrsM+H5+ffE9CTklggizdi\nM9dRJFlItx+gT24mVoeXSkJGGYGalsRBRWdZMeSRr+zRJzn7zgm8UJJmZ3Ro\nHHNIyLl9DHNFiH7+r4Tg+87/D8f3IhK0L7achXMB30a5NkLlXSJtSfHeX8Hl\nfk9NRYh+8WIG+z663xNaYdLgU75NypQjjRBX26zTdrpFUNZl5nMlpXAW6zL7\nMCn2HsqKKITMkPEcCm9XQec+tG2vi6SHQhNYBhrFf+57QHNI2WVsSePqgFuf\nQQhwbz9DXRPX3QnLeV53OfGR55uT60dYQPw1bVyHTi/GRg1pKWl3GQVlb0wi\nC9IXH3WIoK8TDaKkWjQmPpnxenCuFsBc++WjoWC7JafCPPM1EaNeOFORE3dJ\nfesUSJPR8dzix4U6kKiYXE1tJLE9vh6f6jxEZt3A5a8q5NC19fdt+yqO00HB\nWARjsZ48GaCL43Uu7XLoeNQuRydByJ9LqwtUAo5Cc/dyajvwS+uv5goLikbO\n3TmpuRAEGVzyqPsF6p5JTaoyscynR4aZVYsongW9fyyiD/7UA8Pr2QmM9DJ9\nIigh\r\n=bvXg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"cc0fe20f74c108057078be5e93b735ddef582d27","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.0.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-token":"github:iexecblockchaincomputing/rlc-token#v1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.2","lodash":"^4.17.5","replace":"^0.3.0","truffle":"4.1.5","bluebird":"3.5.0","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.4","solidity-coverage":"^0.4.12","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.1.13_1527085754319_0.6141711650496389","host":"s3://npm-registry-packages"}},"1.1.14":{"name":"iexec-poco","version":"1.1.14","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.1.14","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"6eecbcc53e6d2106d25a75305ea3913853efec17","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.1.14.tgz","fileCount":145,"integrity":"sha512-e/hmleSDjMM/471JJjh5Upt2bOBLdU9fITXN7heLyHT0jofYpAWxxVU10xfYWMpQ5ufI6I82VEq99foXmH4ERw==","signatures":[{"sig":"MEYCIQCKHcgbBPodgEDuZGqtpGj3waZbu2//zS3qg0BJOw7ZMQIhAOw4EJMxoviQJvrwfv6co4Wi4lWvFyarfI3tc02D74+N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10212935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbF9MmCRA9TVsSAnZWagAAoHYP/2/Cfj87AW7Lxk2Cgk25\n/KzUWL5lZLgWBxlf+EXXlKAX98XknDkOimYLL+QirF8K9LhIAgkgahtcrZVv\nRBU8vGn5UZHKwTrxIGaD9WYZF7mrVMiZCMCJaE65g4PRtAyFruQpviYcW7tu\n4kOb7GiPLbOROSH1NBavGda3n1Ts2O/2SHgkH34t5YagH/HO6Ktz6Wv2dQt4\nvF2lq02rz/4UEHxS5+jYcuCEQQiCcL3LnFxA05Igktp5Jr0c29tdMno50Bk4\nMnt6FqhDHNqbA91kkWf6ditfJzWITlrmiep8438np8lpVWpQG8tYq/ti4GO3\nWmLbHPmTqLrS+v6TuPjg6mWvjRhJZeYxQ3836CRV60MNetO1VMMl0suYrsJy\naYNLKt6hs9fmJsDjfO+GZ3bBmgMJvTGgvhLf5YmztPulNkeqJmRNt1LAVMrZ\nx5RjKbd8NQ6GxiDFJSyqZWUv6bTfFtpwA7SFj34vflAjx88dCuzssER4QPTT\nQoe+dWPoCJbti5ILiJRZed6SsKwWJTrgfhjzxU1NEUxo274YL19FseqVfkYe\nUukanvmtxZSOJMjsrhTIP4TOq4SHRgb8slLOkCWdgd3O3xefd6/66YYtSZwk\nzeER2tazRFL0hqt4060tzBtq8720qFsUhN/rXluMXqdq5fGT7ry0YJEdx1mC\n3+Cj\r\n=nXvh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"ece1829efc9734b40e3369d1b029e28503c37b31","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.1.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.2","lodash":"^4.17.5","replace":"^0.3.0","truffle":"4.1.5","bluebird":"3.5.0","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.4","solidity-coverage":"^0.4.12","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.1.14_1528288036565_0.44885527133396064","host":"s3://npm-registry-packages"}},"1.1.15":{"name":"iexec-poco","version":"1.1.15","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.1.15","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"b54c288c008630760c82dacd707de79af7a70259","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.1.15.tgz","fileCount":145,"integrity":"sha512-f7yaCTHGOAllK5l+4139+PtHpB9bGHf4KTFWVPN4iH+VyZ9djBXdgtRiBY8K+ZO23UNkCMwNBs1dNFPnA/lUjA==","signatures":[{"sig":"MEUCIQDh3y8sCxWJkddPuy9+bkL6I9cO9fpGFp98WtpU7kY3OAIgShPns2NCJAtMHZVBu+mixEe+ru/FsTW0McW1Zm5dbLk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9737134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbF9e/CRA9TVsSAnZWagAAVIgQAKSvM+Hxf3Q8AZ05Q4oq\nsKi2mA3iETbhJBXjVyUZvS7y0eIcI4zlAETokyGW0qiNCqv5qLLMFjSM4JGv\na2fL4cd4UIjDAouQHy5GtJ5y1z6cxPwiNIlbUSy/i7IKl3yAMlLrQHACTbD+\nR+EaP2wTfimAtfAp0H79Z2+p0lMMln4Ykjq0HWo/rJ0iLzQ8Xz/+KBb5TyTs\nECv+YJ4Mw194io8mqsGp3Wow4lazHu0jHU8PU+KyaEheEY/L+uNqkNqcDqbC\nD+YRcblFUykp/rkZKlEwHNnDtw+5FnayRqhKx7T++7/GXfQ8E27V/aOjVWYw\nvSDBHxmLWQlAedinhwIiF43JYHbTDAWMol5C2Huz+4jyy2QfUhF8wS1y6zJs\nPSfpH4PiFyHwhzbNysXZBnjLnwW6lnnm3Sr3Oev9+aPmYGMYYWk7BauDhkc2\nF87u7J+XIJQYunoe72z/525z0KJUEZsIhZ0VVLvt5j68xSp8Fnw2GXn2xAgk\nps+UCx6uHiC2QowjvfhKdctjXuTIhluObJC/flqmgwMHJ4Yox4KBR66oozaT\nSJeC1R/0mNK/p1oqj96KDg8pZWBgLZ2VX8lx2g4hb6mvW/o7PgReGcyU4TKx\nuh+jbP0HIbjZOet9Ut11K6de+5nFZ1B2GLgl87YFvVd4clT/989Zk/P2LM+G\nqckr\r\n=FSWF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"b0abbb4f5e15c59de1dd04d46690c905645d3639","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.1.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.2","lodash":"^4.17.5","replace":"^0.3.0","truffle":"4.1.5","bluebird":"3.5.0","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.4","solidity-coverage":"^0.4.12","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.1.15_1528289214995_0.006280478088726449","host":"s3://npm-registry-packages"}},"1.1.16":{"name":"iexec-poco","version":"1.1.16","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.1.16","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"abaee8ad07ec95fff9fc1e997198a759ed9a0354","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.1.16.tgz","fileCount":145,"integrity":"sha512-VmwPjunV6IQZvh6MgTNqfIvD3acmEyiGoaoGcLm7hHBMpEXV9ZMN6Hqd8Xwy4yfmZpAXMSHLZGY4pGGa1UIaeg==","signatures":[{"sig":"MEUCIDUM3YOLkPgSIiOpALxdx36BJSOWb9KYcUtbmEaCdmC7AiEA0tVSpDm9+C3neraEDeDIqbK84URoLK/lidg50mLrWng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9746018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTI9ZCRA9TVsSAnZWagAA2KYQAIVwoVwDifxd5d1wmenr\naP3xvP/gDyM2/K5sd7JdcCIuDQJmmCUWsuwyC0TB6pD3RAyAcShq6Q7/dpFL\nsT08+vRjeOps3ceHDev0QMSEf0B4r2/gStBR4bj2ZRbYHuOXp8+7iufny7Kx\nO/GP0AqmoazIjI/kHkVtIS1dgYEIhbHzQsA5zeqRNCpHwgsPKETcHTgYXlds\nRJjMaPOsuHrssua77ecrEzY6dODFw7CVCzFVzr4aDT0O8VqXJsQrC6xmZMaa\n0/7N7kH2XJp3J/W3pFaFSTIvIQVBine379mYyjwz1bQcT7jOGTC9FFKT2pXZ\nQuEt2HkgFTTt0bGAq8Y/r7pD+B2R1p/9pJR8Ue8N1gBQsPk5S6yyxoTZzRdT\n+IToTZ+UbV6NcViDPHiUVDUAWsxx7cjS2G8HEfTHyz6Y+euGpv740MReJ+jY\npUQzCtZK8OnDcksHDBsaIDVei/my20qFea93ORASViUKJC1qncYRH0aZudU1\n31BCxC6f3l+TN3ZdOeIezUwD4N7MtamV+y8VGsp9My7DUcxnawtz2ckCwubU\ngg+hdXT5UPheFJ+SKfnxtpng9vMNKfCsLxAX0NUPxC0p62TKYqS2IqkUb7a6\nvqAb6h9ggurBOuh7IAQNIHKToHdTNpu4R2Qu5HN7NNYdw269rAwn2M5Qjc3R\n57tr\r\n=dM6W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"61ffa332f593e2e462c31be0784500640700ebb0","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.1.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.2","lodash":"^4.17.5","replace":"^0.3.0","truffle":"4.1.5","bluebird":"3.5.0","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.4","solidity-coverage":"^0.4.12","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.1.16_1531744089442_0.8372772946557019","host":"s3://npm-registry-packages"}},"1.1.17":{"name":"iexec-poco","version":"1.1.17","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@1.1.17","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo.git/issues"},"dist":{"shasum":"718c2af7d2a27cba283678e699ba51e3d773c7f6","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-1.1.17.tgz","fileCount":145,"integrity":"sha512-zlzIz/Nsv73gvC39qCZyOe4LcQH1r6W0TEQBdC4IF6THPqFtwzD3/I0hcUEHjgiQh/b2rNoSqbq5Q0tJUZOqLQ==","signatures":[{"sig":"MEYCIQC5sr9JDS+e/xvt4uWRhEAff/3e/4UDFqBuzap8/NpzTwIhAMRbu5QRRkTtWHkdU+jAeSCV5F5gClOlGTNRw31low68","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9746232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTLZOCRA9TVsSAnZWagAAu/EQAJ57iBux5PMjI58EEkEf\nEgk7jeFTba6/sErBZH/RyPS91RMTOsfR6WVfjrJsBuCgj+Rnti2X1kf4aO42\nIpFQvJ+kssBwC9ujKT3WpBZsRgh0aq8f6o1oF3brpcJ1/sqs9dw9QdF/hIZu\nkxBRCjNavbiY6zv1Skwvcs457BWW9C966NDSUBVfs+D27o/Jsl6VxCvFChlK\nvWH/73AiTlfpYk2I91HXWZb7RKRVlc1/d8Y4LMTxsgZloEBYuPjRBKUENT0B\nb93Hjixg8gk5BKBJY3wJhzdEwBbSxnTVAgVxhYEs1NGzOgv2iysGd8tbrp0O\nBH7qxzd2b1jzwZnuSs5cWdSM1WtUpsvTD8kf9CwoqnLLMkb/atMsOX8AhECx\na4pxN48vVcsvuQmn83y/mvEHTrLakaclu60tCZ2PZUBukF2kd/btTx9CsQUO\nifFKfICqth0i5hgKFSol8J80pZXb5oKaIxy+fPRZlYPhX511llckl2GUnuoG\n31A0Tu9CiisShftTLD2/Zs33NzNUDybExPKv8WAtcCYpP3CN7CHY0i0Yrhnp\nGHcvx5sZiF9DC7znaJcuiMJPlxepNOhxV+zSwaRR6ojb7q/Z+9aT5aSgiUkg\nKz42HB7OnOAeMJHUCcj5DhHxZUZUB1ba6QhLGxHV5Z+ksDOPsp5VWgTnl9E1\n4TBR\r\n=LAqF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"1963d404407a4adcdab364bfe64ad3563a87531c","scripts":{"test":"sleep 5 && ./node_modules/.bin/truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo.git","type":"git"},"_npmVersion":"6.1.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"rlc-faucet-contract":"1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"bn":"^1.0.1","web3":"0.20.2","lodash":"^4.17.5","replace":"^0.3.0","truffle":"4.1.5","bluebird":"3.5.0","coveralls":"^3.0.0","solidity-sha3":"0.4.1","truffle-contract":"3.0.4","solidity-coverage":"^0.4.12","ethereumjs-testrpc":"6.0.3","truffle-hdwallet-provider":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_1.1.17_1531754062038_0.051855658474133426","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"iexec-poco","version":"3.0.1","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.1","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"7f98ab122fe027a3b4203f9b96822576e788bf96","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.1.tgz","fileCount":39,"integrity":"sha512-ap9IlWVf3KrHH4vkiLjwdlqqEytXZR+gmBFQA2QXaeJ4ftkTGste/FjEeOrFuY2wu3FJFAXjj0ysbK98BfycpA==","signatures":[{"sig":"MEQCIE+nLLNPJ0tVyc/Ft4UnqxmrGC3hpiL4YHzGkFu47JD4AiBgVipkGM2cCAYPN6JAeBSsn9vk0ln5uMe9bk9H7+kEzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7tXdCRA9TVsSAnZWagAAO24P/jZIbzTHHg7VuU0gP+uP\nhPQGmMzQjWa3uApuPxEuSEA+osj82TbO03BSQ4BoEnb06JBBKjUIrzb6eEmU\nBY+mVzGBpWeAq1/R39Jg2qfMTb8bdYHJGT5WKMCIANv1+mkGr18jzuIqureE\npst6uSaKU/jbW7RGa+9REIfVu3Niw6T6kWRREU5M5NclpgfuxZo2pPXZvHYe\nrtBYpCFHhwVH5ObZZklprYc4D4PW1HCE5V+cUsqh2nhEdRW7AMkciZf1ws4o\ne5YZ65B8al/1K7L2fJavyfuvFlRpIYBrVVr1b2k3/4xgEkeVpK7X7yU98Zwf\nK+LfDvd1aHauXlH9YTrvZG44gqSe56FfSOjAJGaSHK04+29zO41gRIBIxh4V\necYoipX/QHCWSrAWX/wkhsKjL2ozoElgEkCmcWRH63ubtirjYNKqnKIvjFkQ\nEEibZw52Jh75I0l7PNdotjpEbZEnTBkOtxypFxT4rhRpT97Lpm56/l4IHVSf\nN91U82QFzZmU1j2BLjBquwHwHXGhXGBM2VZZMXhSO+01ZcHxfsM/M6ww6LJQ\nRJlxAUSuc31zzQxPCgM9cPHRq16NvnP5snLbnsv7sy6Kt+6R3UCWqD6D7jqx\nK0STylN1BXn7zqew9Cfh1npN5pPypvHPgzSF6MQxn9oeePEYEFh6YK5vbO49\nzGiU\r\n=HXZd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","gitHead":"b2f0c93c276b7f280594c9c7457b03192c5a3432","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.4.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{"bn":"^1.0.1","chai":"^4.2.0","web3":"^1.0.0-beta.36","ethers":"^3.0.29","lodash":"^4.17.11","replace":"^0.3.0","bluebird":"^3.5.3","coveralls":"^3.0.1","solidity-sha3":"^0.4.1","ethereumjs-abi":"^0.6.5","ethereumjs-util":"^5.2.0","truffle-contract":"^3.0.4","ethereumjs-testrpc":"^6.0.3","rlc-faucet-contract":"1.0.8","typedarray-to-buffer":"^3.1.5","truffle-hdwallet-provider":"^0.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"solidity-coverage":"^0.5.11"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.1_1542378973065_0.7477977860716214","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"iexec-poco","version":"3.0.2","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.2","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"ddf2cbfb94d74d449d0c00cc963d58ee04b7baf5","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.2.tgz","fileCount":39,"integrity":"sha512-1cyJA/cxtI0wuVoIZiTkGC6//lNfotyG/EkmsaMds/VzjP8M56/pPLHe62ZwoU6VJiYe5cPJRiTJp4cPFQK5VQ==","signatures":[{"sig":"MEYCIQCusjyeBOh6C7o4pjHNXMDN2tETTFgP5mLv6Ts0BZLX5wIhAIVfmk7+l/KDy2UryXMTowmH3xCkHbNWgJF1CDYos17v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8od2CRA9TVsSAnZWagAA6CgP/ihn/EyDLVsNBlW3ZrAB\nLBeb1K49ihTqyNeJ9byKOFFawW7N8GnhBxWuYJiwYfIWpLw9rzFuthuLwbEE\n9RMF4JLqajCRjpoxsg+bSO2ZE5KTOrBkjmcPevL2x3s382ZABGEI7VzXVUyM\n6RNgmHQEyPV7X8QsJXgVfzHMCuF0z525j+kDkKJ5FhPZ9wLfF+icxoXXpgtr\nY6BVW66t6xVSO8LAw/PzYpKCw8n/0sR6dbeHq51PLJS0FNPvCny7buOHLuvB\nWrLA44DnZGAF/Vz04glbEyTBAlSDx+hj5xe9/bARetfmfiydxeESg+MXDE1t\nAHCDqbCY23ER+DlQJVmVABPlR2AV9AivfQu2UKyMmikv0naW8+/FUIsMkhTI\nSP+AGsRcbmA3KNh9fyAye4a43f6FUgbnmeHHIAw1eRTKcdE8HfJczpWiHydS\nBjkatVCEhDf+tMqxef8dPLM6nQ3wkSfS5pDR8EeGNtafdLEvTcMBGCqY+72m\nO/MFTBHwZWxWQ4LT9kLSeX/n2oDxVO+aPjXeYuRxGYMs13vrO8cZ7a4iv3ET\nglRLq83vyzWX1HNiUwR3XG5e2aSOh6LUtOFvnczE91LzmmEgWnirKa2rRZHM\nogq6kXUw5xmQk4vD5XZP0juJy4r1tqksDxRfvweHxMzp+dYYF1YYQe9PPDki\nMrmo\r\n=g4qN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","gitHead":"8ed9586b8516241baeb217002640d5e370b5343f","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.4.1","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"10.1.0","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.2_1542621045397_0.26101038020400047","host":"s3://npm-registry-packages"}},"3.0.4":{"name":"iexec-poco","version":"3.0.4","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.4","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"ebcf5e5fffc30d7a4b2a45e32dd21273dac925c7","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.4.tgz","fileCount":39,"integrity":"sha512-e02ApoS2OwoHreYG/tGGi4Xkfg0cvzOUl7XA66yIy3ojDuiXlA7wL0u99ghYa52703GRmX51KMzU9m86TCPL7g==","signatures":[{"sig":"MEYCIQCoWTGBAIL7m5Qw6QxupIDKNc1ftaC80bhCfreu0yOacgIhAMh+59OEwj1Z0a5Vti2AkSjk//xbKEDnhrdSi6WNUeld","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7845257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8uUkCRA9TVsSAnZWagAAKQcP/3bm0cpq6PhKRXYgJPJM\nF4ClsEkmyMBUqnwouLXzvWlUBN+EF75TDRwsMcnBBMXicNXBrz18dZC6AupH\nZ+Pyqbv/QZjhnwUQTIUQiX2BnpOebFAbqXFA40lC/n5NjhHodUj2p8RRYZ7a\nN7RcEc8MeEJBF+cOkmLTlVtFnA+R8Ggf8iVttswwNraBzz1QJb1OLmuDOTHX\nEy26PYfa20HdSffja9QE4uIEIkp2gkKbZwfRqIa4hK5vwMNeieCDmip5bTDP\nXD2osFrVJj+ktEBDn5TwzNeQBC1yQSj8cv3Bm5DJvBrtC5gIOglH3TOcQJFn\nRejDv+CstWYh7d1xCt/PsZ+JqCvBu4goMcusPIobIBwW/7t6rrigUItP099L\nDGVu47x8UC8xIKxL5bIJ3efRp8i+0YrxRuWGLvItGqFY6sIqjzf+1wb3tNln\nM+B5ThZKXEjStD8icKlCYW4dNOG6Lws01qXYlwdpk0QCuIvAT1ZHOC2rsjQ0\nlrxPZH0ifhgGdjMZmRcA/yjMJyxB5TaHEy4ODPgjwBITlvUzNuQqwc+6kj40\n2dRUKSyv9+hbT5qoGlWiJLdI1R0hftVOf/7SxpTjmkM7kW9/YBWD0Vs4D9QB\nSQJDZKDd5xLeq8/1KJGMzENl0V4YHapDnkXa3dAPdZCYvJGQQZ70K5KwVybU\nN4lY\r\n=nxxa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"ebcf5e5fffc30d7a4b2a45e32dd21273dac925c7","gitHead":"4b6fe1188c5748da998f0251fd2f6dc03fb55033","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"truffle":"5.0.0-next.16","ganache-cli":"6.1.8","rlc-faucet-contract":"1.0.8"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.4_1542645027914_0.5199899722302024","host":"s3://npm-registry-packages"}},"3.0.6":{"name":"iexec-poco","version":"3.0.6","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.6","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"6d44d74804b6c822dd38ef7576ed161c124bc632","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.6.tgz","fileCount":39,"integrity":"sha512-7uf6G0SymiOWCFYls2wU8fQjdYLP7mdTu4sytzn/OzyxXPr3jrUJjutaw1qun/KyscRmHb6Akqtic9ppc3yY2A==","signatures":[{"sig":"MEQCIAOPg+HV1cSd0/KEkinQHZiQku55DZh/377cFsva3+oOAiB8z0ky0T++xp0wwfBDbjhVF1b39JVcZ20kjFYFFedTmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8007711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb998WCRA9TVsSAnZWagAAEqcQAIEyZCrL+dqFPcWczzSm\nU1ZEkkcdSyKBsAZB7qyYjJTqI1J5pAFkEerennA50AqT0wuePJtUJhW7781r\nR/ZvnH25VoIO5N5BlDusrhkUgoGXuxxQUzmB9zwgRlqLAvSofaXmQ1hjzA3w\n6u0CAOq/B80ZjeNz2i+1PTaonH5mle/v80BIlVst7czMQ7Am8XovHVtnZdmA\nyUc+3WB6+TjWVgcvysI7rPz+jqYBGRN6L/IQ76iJsBrDfAtwc/fgnCaqIa/w\nXNWEwlxhH4pcZuMErhNpUD04bP5DNOu+RRhN0boFDXJ157ynpT1vRXy6pG+4\nndUf3fTEpO+5PLhQYgkNsz/RRFX8vIJusMqtEgFAB+B+HpZBy3hkr0LNbmBF\nPDSu6nPf2CPb3Klsv8aaMqMcnY6raoGE1XTmC3cjf7jb2RX+Kai3cIQvJQxU\nF0ApR7SQfF3egihFzmZITvu4gfONmIzXzotCn0TA+XN/yP2d6bWdyR7PHZJD\nQwFw5ivtyORWM4hs/1nOjI+j0Ji/k3ESGlCzrO+7hfrEt8GrholPOEGBwPgK\nxqc1ebpRArPuoCukkcM3nCopozCnrKP/bUU/aXln7fpT/S6acvXByhe6i837\nZ7TcPliLvcyouxSwlS95N+be1pVqkMnGQXYpW/57X+De+ZY1CWYSqUkCgkQr\nx+KL\r\n=17Qs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"6d44d74804b6c822dd38ef7576ed161c124bc632","gitHead":"be9d1b48b86e26a387a8d732a827a4c4f6c41bfa","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"husky":"^1.1.4","truffle":"5.0.0-next.16","ganache-cli":"6.1.8","rlc-faucet-contract":"1.0.8"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.6_1542971157585_0.03679725404332279","host":"s3://npm-registry-packages"}},"3.0.7":{"name":"iexec-poco","version":"3.0.7","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.7","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"b83402fd8d01d09e0dacf76a5e9b3840a338b860","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.7.tgz","fileCount":39,"integrity":"sha512-FOwcNfdA8fj2ZVn/xsfwhy2rduX4Dn6fnLnZoS6bMjP0yLij1P6Esoaa6uqZ+UMJYbtnjn660FMVxhc6ubCOxw==","signatures":[{"sig":"MEUCIQDTu4I3reXABt0p0p7OMHL/B8TRWXPVC2MEdKOmJSo4oAIgVf4QpPn+3hIcgEDxmu2Vv5cMyTgxHdr0M4ypF+M6ciY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7940671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+AawCRA9TVsSAnZWagAAZv8P/AqNT6N0UgD2RYVaHhe5\nNMalWIzweXmjPCUpAroDcx8aCeIVx36XWfba3A9cuDCQtD6MZk1HUsX9FFC5\n9jR8iFGWzj6s2jpy1piItn0lufYoy4uGqWtdLaUlilKDPFW8DpeNMVpeS+9Y\n6xqx+eRSLO7NCLa28KH5uOudEAI2p+biJZmzlY/7d5BEkYeXlwqbWrzecJOw\nLLaBZV1LRnpXTbu406/77iX9KAvUH1ZbJL823qLWfq77JVUBoe+bw9KGTHqF\n3Tdazz+OCWDwqmaqGbVFgG1feiKb9mBTXy7qW+ahvEXC2jNcHpviK4xJ34JV\nkVusJ1CB1MKo0qckfwZEg2x/gfVGRS/7HdNTK/4Grm9AnZobD90lfX81AVhG\noJAyqNmi1czzcbK4hevQbJBG3CKEPsFJ4N879UnX5rn/nLtd1pC1XmLCEjIG\nAnsOb6mShGebm4DDPzkAm2uxyZcBvD3lOJU6FXQQfS3uotxXhBcT9Ij7KIhf\nAmHfMyyBVZY7avwrCtXxnrKfhG+sy6Pv/wtRHzGTTtigtqKtswLHTj09cetX\nJOO4AL/dnqiXkud3eDTmhYDQELzzfGz3ish5mkUyjsykgCZTleCRKyc5v1ew\nC0hRtyNd8kKu3JXORIZ1bH7tuoUB6/C7jq7ZXJnW0w90OUJRKr/eMVMybiZF\nqWsl\r\n=+o3i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"b83402fd8d01d09e0dacf76a5e9b3840a338b860","gitHead":"a19737dfdb9e7ec58905e4be63bbefe12288350f","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"husky":"^1.1.4","truffle":"5.0.0-next.16","ganache-cli":"6.1.8","rlc-faucet-contract":"1.0.8"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.7_1542981295578_0.46143808598130986","host":"s3://npm-registry-packages"}},"3.0.10":{"name":"iexec-poco","version":"3.0.10","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.10","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"215a484f5a6a630d9c45fa83102f39231b95ad39","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.10.tgz","fileCount":39,"integrity":"sha512-6VQvCPcKMh08p0+m0BKWYhnELD69gvSxytA62TBt/b2Ouz4/DkdCYZQeMoAauxDEHWvGUu6ikqUBD+FGaVlJ7g==","signatures":[{"sig":"MEYCIQCiwknnY5fipqxdYPhcsZ7b57nf4Z3p6YDP2L9rqd+l+gIhAN00lmQMjTihhx2ZCtMtBE5nQwwWvF1DAqjfUbz0thFr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7702083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCR26CRA9TVsSAnZWagAAG3UQAJSaGLYMqHHGmuIwSx7F\nAvQkPB4pZrRg4QS5cjgPO1PBONlJKXhtPeLBhuInnhUeFs/i3VQQhsGzhWpz\nQArm5L+qE+WK4J37mFLbvKOFSaxn4g+7PsfK8MZsI19oc5LIPBKgQTqT3Tc0\nBoa7cIws0Xrq7z3tQvZY80qVbhN8eTDATBj1BzJ+VMbl5lXsi3q1CxZs/EKC\nzWZdsRqfeTRr2QuPoW9yz7XADheFimO5ktW79MgGmauzmzJmdz2YjsjY/Fm3\nSOd+T8uTczpath5F+7UDWMHVM96b9pSkj5bubFvcap6SKj1yTGCaiMZiUpdG\nuoxCEw1GY7gO+zal5UWUUIIQtVBpb+ms2l93zGZMTLDH5CDqvLFyyJenByYG\noU3tYvICJv0uJ9mFNJuHVaMk8+byZc54NFAKWeyesn5F+XMXdcdOHcNFPLfe\nSQLK9ttmVGP/LprEPaiHhGrOTacvmouLnSMGVnCF3/Q/lsSEcNoCbQLPzdSt\nRDAhJ2p3d0WOaDHx4pufCa0U/hq5o7yvEZDxUY4ORwVWiddIKt1dwgzAvYe3\nF4ExUxubLV8MDgPDM+kkl5jcqVGJItL12g1ZfrlJaybD2TrSvyc8b6eWdzG2\ng39N2DSyQuuDgafg3zXua/xXkgR07N3oxOs/qVblu7cvT6EG+l4wXCRFwl4v\nlrnv\r\n=aTXM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"215a484f5a6a630d9c45fa83102f39231b95ad39","gitHead":"10240a097a85e4acab23c4167918147acd096ebf","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0-beta.2","ganache-cli":"6.1.8","rlc-faucet-contract":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.10_1544101306152_0.011463490447455538","host":"s3://npm-registry-packages"}},"3.0.11":{"name":"iexec-poco","version":"3.0.11","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.11","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"45c195bd486ba5de7c81d1dceed1c72ad562d6f7","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.11.tgz","fileCount":39,"integrity":"sha512-PzRc3ffG/0vKeV+4DAIhre+qfL+lbFjElUdpQ5lpSn9utUcC+gxtXhX54SoYv+auTYhYhLzRQwLOO2xKbK3pDw==","signatures":[{"sig":"MEQCIBB9A6GfDlgmBQTCJYstt98T+up/4eIitZbe9llm4PB/AiA29rFU7C0aF0XscphH8eoxcyW8tmDcsAOJNGz0CZhuJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7702083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCSMmCRA9TVsSAnZWagAAP3EP/06kEx8Oqfm/5uKrJ5vd\n1Hl+gBOYCto5EczEXP9jJXlCvZEHXC+g2v4ENMBCmUO0KA9UmsQwN8j5GZdB\nicAbzxXvj39Tyy18odZGaBA+icc72eRPCMCsohxQFVaxKv1A6KL1TYQowSRK\nsGEP1NYZ/+NSphZNm5X/jBu/kwLi+3XR6h4mqiTWcOPtfAfBKPXTwB3Br6zF\nZPM3RWd/kbScJQxK8WXOirlo9l4bNHZyisOZWxESC+fX6HNABwhw9Is9Tvl7\ng6j+2OkdNUk1q2wKEX/mrs2BOqvKY8CG2bEgO1jNvhmDnrjafOq+J8pB5AYi\nv09wIZSIdbXFEcSbYs8/2MOMGSVI20FSD2ifg9SsLsHQJ0E0MfBiV0YhGyGF\nJFRNtgeK0szMdxr64LwuqpZgDZVLFs1iiwf9browbzZpU9yy/IknhSRg7yKl\nc8Hu1mdATXM/J6Dd8DgoFEzVjltHDqLtjR6RWbLNv10pjYgDinUyhzh9odaa\nr1tvQirHUJlT6ithigtUQbAGdbw6AzQDvHiiGIo09pexdAB1bGqCIfnGl3at\nRM6is50Cs8+LWQdnTw0uMl+ekrd/hy0Px9KMoZ+Ua0tQpHaUa+YgAuwpzpeR\nCnrivV7d6ELaRrzkQHVDF1q2I4z7+KHAnmyAEErulmjs1nBWBTCKPGOwwjVR\nDDax\r\n=04uM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"45c195bd486ba5de7c81d1dceed1c72ad562d6f7","gitHead":"5f175ae018ba13929794d976331c1bad6a67d904","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0-beta.2","ganache-cli":"6.1.8","rlc-faucet-contract":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.11_1544102693254_0.8507130094207054","host":"s3://npm-registry-packages"}},"3.0.12":{"name":"iexec-poco","version":"3.0.12","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.12","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"8a2d6067e315a20d652099c5667db30cd66193d5","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.12.tgz","fileCount":39,"integrity":"sha512-1keONaYAwohXTCTe+0po9a4e8et5UQSr7WNOVpMHCqJoiwjtkVrbssjgi18OTS7HNnorNDaAWi7Ya/KrKif8+A==","signatures":[{"sig":"MEUCIQDtgxyn0ggEHBtHUp0EiTcQAKo+gQ8NEnvL42uJ9eT4XgIgO272WR0gyRfbLfrj9ApImDtbWSDsWe4pi+b10bM1Tdg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7702083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCSnTCRA9TVsSAnZWagAArgUP/iX11bIa99cDArEqnCD5\nUV7y3uNHuOOMBDSZGFeE9x4TR4az8xc1abX05gA8SnznlHRNe3Ig+2Qupr6+\nkLRCeBgQf8KV291Dz+IUi2w3JPgQgeOtgjtAVm7rzpGvu4PIzqPytKh1LLOO\nbLIhz4d3ZGGdOEIw1EZwhM3kd/yTAVpg636JdOvYA8CdZBewH2TJk82Ss+i9\n5h1RI4WEo36yOoidN3jgZ2Zi53viXl7L7rQbnNumZjwvJE2FZcOEXTYrPQ55\nP3qleEvVD5lCssfHvIEbkGWyngQxwT7zO3kLMBqP30qGqHnULxSb7vNn1h4N\ncNOFMQHUAqVE/HRsycTh4zj7OHDZJSMjwLOOjChIYJ2SPiFtz/1dmjWtM1tc\n3SiaL4w2+4mZprUid5l7zNVnk2Xk9hqeA2fCYXnf4JK/o660cZiVd7qG54Yp\n651vo+/mARzheeHFIgKCXPR7lyo34iVQ1o50zHXDDxmxjZ5nuVMvQ7FeeRS3\ncibWc62iP0/EfldL4EIfSkxvgpQ0X/aULPbigHIUwplnQPZUFsLWzTWx8lkS\nbvoM1ZCqTBpjyS18hOv/2FtkHWqAJLPnu0n2N7Xcjm3GYN0mepgKGeB74fng\nTLh8zSq5v84Wl8WTISKfxgBgGcRHmdJsX7dOSuWO+T8KFKm6O4QPRz9e+6HZ\nN/oR\r\n=kntO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"8a2d6067e315a20d652099c5667db30cd66193d5","gitHead":"bb41f00ba01c76d8fd8f287cfa906e835e242984","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0-beta.2","ganache-cli":"6.1.8","rlc-faucet-contract":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.12_1544104402780_0.9428976639951361","host":"s3://npm-registry-packages"}},"3.0.15":{"name":"iexec-poco","version":"3.0.15","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.15","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"838f43951a69df3f416513de9f5622997da1b34f","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.15.tgz","fileCount":40,"integrity":"sha512-+KajhPvKh/ONlDRKk21dbg9r/ORKvw79i4dkE82oE57jiXssmd/u1kVCPECQM+M8dsp0RYz7KmIo7/oDUm634Q==","signatures":[{"sig":"MEYCIQDXisZt4gWtigoBRY8VEJowSCTbtZz8VJEQ8/fxGMR6IgIhAIf7WX2b0StV5z1z2JdRX0erHtg+9RjvGzBNlgbGct0o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7786978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGmX3CRA9TVsSAnZWagAA3l0P/RYlT3QenBPCryGLjmSr\n8siv4UNKshLzoE4Ki7TxPlGkBxsNYEth7QaBzOPZ5OgmtO/PStQOKPolvtsl\nrxWDVwjfW7pi2hYP6m7HXq2gWCB7GDMLPS9/3Ihpdd11TMtYvjkZIxIsM6pN\nBhCA7ytZuS0e1tbW+xKWR0oS7QfVD3EyKhcleeiCJymFQGK/MI/54zQupcje\nL9Kv6ftG66thHu3LUHdWaC+z1zb4ilxd0/RCWlvrc9c+/72IGaJM95x3PY9F\n7Rc7KpoXCmC8AzY4f3ZLxX6g6usQfURX7vOPRCoAhKEosHTLJWgK8/YYXn7G\ndCcAJLA7ZzOy5LhNO22XPIh3BH6HjvEiRKK8kXvzgi7ET/XN6d8n5ov48y6/\ngffU29z0n3EAThXly/yQclNtsF7nmvucph/KENv2oJM3n6UsYHULHJf3Ldx0\nrQ3b7iKmAu0tGC/P84k2kuFpLRVb4KorOYmVms/JJfM9KWHYe+ELTY8br0SE\nxqTb2JKygPVE3aMNliy2FMmiJBi/K5h8q4PdBPZymQjX5hLfwQVxVuGLvmJj\nypfWBcy9b65obhjEHKa086Bg2n8CuMSvPoc02APdeZN0ByR1uACGBebvkA62\nKXTCMIfen2wL2Z8lD+cjcknpCc2ABKis46c3/jZutzyxkLzK7eY/0eIuWwqA\nFnWP\r\n=+Fr6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"838f43951a69df3f416513de9f5622997da1b34f","gitHead":"6026d074d03d9fa3fe5e110bd8466804c9432c03","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0","ganache-cli":"^6.2.4","rlc-faucet-contract":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.15_1545233911120_0.13546927792185182","host":"s3://npm-registry-packages"}},"3.0.16":{"name":"iexec-poco","version":"3.0.16","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.16","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"484ac3b2005b4ab443b5f2e06edae07cd0f1303d","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.16.tgz","fileCount":40,"integrity":"sha512-wNpqqVfVicd1WJGTKsmwSX4R6OWP6ezwzUIg8P8YiaiyjgUFAxWs5a6P59EMfypqFDm3tO7mTnp6Vh0rKVwchA==","signatures":[{"sig":"MEUCIEXWikehXsf+E3u5BxhPypsFYC2vrApA5SYp+ClEnL1WAiEA9bJNk4Ng+eGwlQ1T6EvFsWMXQsTq8lOnUUtf1ItOns8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7800856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHOFjCRA9TVsSAnZWagAAO2gP/AwvsV3dOtGZfQLrfdFe\ncpgiAL1BCjbDWsS9wXOD+VZQNfFQOucdO2nukLTST/U1Pnslp36BCpEgLLNO\np42oUSWFjBB7CGu2RbLqHbLXGc0Pc2ICHmxkEe3+jXPu1iS9Gw8SRjlYij0i\nimIQ1u0i+v66vvr5iOEEdjQ5IYY/39JFcHeg/klWRoc1dcHstzFV8pKCPdkz\n1MGeqEIIA3tjIIC7u5CpC20/JQZicqMfAhPAEbNugPGk4pM8JwXk4C1QjlV7\nCnDE4LMp8g/5tMGEy9jBedZdwzg+FVxquC/t5dVC6AIVSK/uJrq3It5fMwu/\nRuMUreMNwTXFz4cJkiKQIia2Xs/AVSHfywSXKAuUGiVUwFm0oa8sYV+pxmVn\nc8DOPa2VlTozKpTrsn+i4lIrYX+GrlJ8FSGwRznK2fisZeK/kHGVJ/6Nb8vL\nEvir4YNKbkQMxrMdZePSi+hpQPnOHed19AA9IetKILbhv3UwJZRxn59mbH/4\ndbedBM8KtTkHEim0F4ZNaAI35CMzS8rgeQMRtNMv0mtSkdG9PTB1zcf5X8v4\nMFINr7c8/LfgwTEulJGbpIYzm3chtkBXto6k/+XNi/yRv+C07EfvUzqlo+oI\nwCg+OpGnGPxX0xuigmaXDgo0eB/C7FA+VEjvxHKyJBIUKJ6E+bMrL1DarsBy\n3QKt\r\n=rVum\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"484ac3b2005b4ab443b5f2e06edae07cd0f1303d","gitHead":"a7e63c88c42604d18c2f250d279f6de977c95a29","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0","ganache-cli":"^6.2.4","rlc-faucet-contract":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.16_1545396578693_0.1772055870350817","host":"s3://npm-registry-packages"}},"3.0.17":{"name":"iexec-poco","version":"3.0.17","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.17","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"c2af31386bd5513ec0bd184996cdbe76e5888dab","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.17.tgz","fileCount":40,"integrity":"sha512-JnAVPF0ChXFvs4Otb885FUuUZkb9m135EoCKwfwVWvNVauiVCSu+Wv8sarGI4jjb427aaW5+oyPvfytXTDVznA==","signatures":[{"sig":"MEUCIASkWwCt2nCecJ1TT2G5xhoCOebGVApH0TrVcJCVXZHfAiEAy0EWPLBm+QociztCuW0CTUuWf92ffXWUN0RiP1PWjJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7783371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLhVTCRA9TVsSAnZWagAAdJUQAIOAMciQZ96/dRlmzcEI\nDjrtDF+9HkX5f9jOBEeCMKeQJD238auHV5+U/REJbi5U+IBwp7Cf9h2FwlyY\ngb6FRREw+zj2TfLANiAbOhW3m5MpPEmu4LukOkVdJcZXO5F5cNDJLRp9npED\n4Fxxo0KT1Yqg7IMnZ/wAKqwndSNdJcQq8mmmX+nBQ/CTxMB4SifkxDwvZAtv\nmdorjZawOUM7v+6rGddCwaydBazXYqMKbpKDPdwbVWcsMFrNePtNEX8zWZPp\nF5qujZ+WWr3SxjNhRNCVFXvSUKOtxp3UgxOr1qDluonjOiCWyjSwsGsSAQvZ\nEGdbHgiMgSGnlpxtybAWMCp79cBTk3Xig386sY90sHygea0a6Tvmgf5fKdAL\nbWWDtfAd/51hr9MRnlMQ0I136zIck4CIyEPYUiRHWCVl5//UoCvk7hDo1Lg3\nmC3VkRnMUhX99mrIdeXQ1mESVUOeEQUNWa7Cb33iOm72rdTQuAImQvi0ryvd\noqrx3QPkLH6n/QLp9N1svyF6UTSZL6jPNXwq94cAfnIQCBbvOEnVu2s5lrcu\nlisW1t1ObcZpFzv+7PirnxwC3oz2/qytCZ2MpFmzxeZL+9u1jTWkcq9TVZu4\nrJty8glOBZ59cIXEyqjvj+3+Q4Z4EACiNyHhIs33EMA/g8auOh1TZi8Kw200\nIcER\r\n=NOW2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"c2af31386bd5513ec0bd184996cdbe76e5888dab","gitHead":"872fd77f6d8cc70074c241bd479c6a333f4307a2","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0","ganache-cli":"^6.2.4","rlc-faucet-contract":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.17_1546523986577_0.854533226690668","host":"s3://npm-registry-packages"}},"3.0.18":{"name":"iexec-poco","version":"3.0.18","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.18","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"c481f0247178b9c5c0aae87ecb3013b9336aa1d2","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.18.tgz","fileCount":36,"integrity":"sha512-hhlAxHdl1jTplKi1RsvQM1lbAw6aQFB8Fgow59AIo/NQaI9xaj9p7QGuMlJjUXBesCaQrb0yfLcB4ULJM6EudA==","signatures":[{"sig":"MEUCIQCcd3uQXCUtNaiN3KcHHzgIeI9NFqhkEa3LmqNmKamZJwIgNcJ+lD/CEofgJ41A0igCTo342i6tcH3eUaxZBo4GOlE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7653941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRZ3HCRA9TVsSAnZWagAA/s8P/AzRWfGOVjeC4CTD1yTk\n2NolR15t6zEVn+/THd/AYltE6qIx91Lp31/8Ar3wFJQNUFY1QHBf6m65vqVj\nfIREirPxP6EmqJqRk5S2W9yYpEMnRhYtRWtPMpsL4zcfCuGBegXrb4N9yOeT\n8K/bWUooHPPBGINlW8qcHCj/tjUomouQRPK3wFC04LVqZNTqv31BK+uWlVnn\n4KlPeGjS2OsFv4j7IYBmZS38KZFzCzffmiuewhuhEzl/HKQGelNSGJHqbD1u\nYuatrCFfMBaH2QIIYej9/0pP4jg+4LMQ7+tGO57p1ehbOko76XF5dlb1/7/s\n+h0gr0IpNGvYSBEX3jlU+xMY82a/qDhWbkyrg8itks0YhX6rsVv55+BGXTDX\nqxoaITsia2w7XhZNMNGJVMmzfhHTGE6Ud3Dl52GbmAkhyiZAaqPvJgmaNjPT\nEdOl5H8iSeUh+5GA3ufpzMbW59+IAfvL6CzvfXulS0Bq/fGYXaSu2ZjaMy1/\n2/R5Z5TfES+sI/OyORtqgoLbyCg9AqHoaq5cS9J5BCvjHYD5QQ7yuJL5a4+Z\n4CyXxv7Nd9lMJTyB3MRZ0AofWq9dRdBv/f+Kk+6/PcZauxXVbX+jTFC6VYwW\nhJQlKdphDQ22tHnmwy60NcdM2y9khjqtdF5tZWdsBXb4GWo/MqK9astNLbze\nHGoe\r\n=/DtE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"c481f0247178b9c5c0aae87ecb3013b9336aa1d2","gitHead":"96c530a7763a5bfc45218bd9f6138e5de6def6ec","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0","multiaddr":"^6.0.3","ganache-cli":"^6.2.4","rlc-faucet-contract":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.18_1548066247210_0.11481112049329534","host":"s3://npm-registry-packages"}},"3.0.19":{"name":"iexec-poco","version":"3.0.19","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.19","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"3f129ed5fad380fec4668f472f272a056c63ef8a","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.19.tgz","fileCount":36,"integrity":"sha512-uLuHH2/ef1z49D63s7sKhA4fvVS7wlLT/gotENWgWwNP2qZ5BHFhOVvWT+MSwfNWLW6siAVSOSXMxWRDNDdIiQ==","signatures":[{"sig":"MEQCIBqLrG7RoQAjRiwu4AaCZlwM7ZVkQCOC1m41frwlx9+aAiA5KYfRBLOSwo3VxkRZKial1AZ8scjGuyjpA1vSF95BAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7653830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSH6ICRA9TVsSAnZWagAAgfQP/RjtvtdlW67Ay/wZQ5Iw\nq1wrkLqN+GNMY6UU9rApDIH9/7AanIa8DtGh+/zgkb3e24DMFMH1kXweelF/\nWdlVIJyQ7X9NDZNXdFQKQN+XyppZqGUQLT3xlYCfauOUxu+pwL08zaVfb2Yi\nd60xiB71xgsjmGRBdywYvueoDlc7lWMSxeEIURPTjSr0quMecFO+/VYzcAnO\n9+RwYxYjFAQlhyS4lupx5k7lYvk4/ANDZ13S+PJMgm0idIsLAAUme8xyNCr4\nRt/yAeUfY77tFGvOUb3mhzzEHr0JN3EGJh8tutesk+W0V/2iy21mcn9+9YUA\nrCuaFEDClXExxKw3EioNP/8thAcfktx7/kQur2xy7hW8EVNfPuR2oQoivxgs\nV0hlOAReGIUCcuIR3znwUILnIs9xs5MctEfb5QNYreMskzHS5MKR1D0xQOzv\nMK+6LdHWDYRNTcL3bkiMMcwO5cOxvCiT03TyFGmBGY+04sImxSsYRACynIL/\noI07W7euom+ezVyLsdncrgAlfTviE7dBmY5s5g6vvzmsLAP9wuH57j+TEfJc\niOzwLz3ZO5vGkdpi1N4PBCM7UwVqaqCXI6I3SGReAkLYLlyA8U8EWSKdcVLD\n4RhADFbTM1n7zElbQ42/JjirsQmwogP39pAc8B4dfJ6R4wjuAAMAq9SgYTMp\nQZh7\r\n=aGwz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"3f129ed5fad380fec4668f472f272a056c63ef8a","gitHead":"c3c3a80f228070f2d40d2d9301009176565323f2","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.1.4","truffle":"^5.0.0","multiaddr":"^6.0.3","ganache-cli":"^6.2.4","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.19_1548254855677_0.5669831291251475","host":"s3://npm-registry-packages"}},"3.0.20":{"name":"iexec-poco","version":"3.0.20","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.20","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"1f07f5f3107e3970d1c38861509c42480731d1d6","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.20.tgz","fileCount":36,"integrity":"sha512-pACjkoLqnuNI2J6SWEcLgnjbgLVzuoACuYweWJSUTQXKLjTr1AxykWa2Pg795dynSz2IH6MPlSegQtmH/zl2bg==","signatures":[{"sig":"MEUCIDZ1iWnuTijCUXIYbIAtqOGw6JA5MlQeEnDRLc96iuVzAiEAz396HRWYWP+KFgX/sVvhHIeO0GjWS+2jG9uU3AJhC0g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7716280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSLb4CRA9TVsSAnZWagAAzw0P/iKxoAhi2CM66bHE8ruq\nRERPfOSYxfE5LfYLQ2/HrrSkkLlvuIdPuxvaGiME1vx0MIgXUvC0SZ/XkdyG\nDjSC15Izp23jVsPfEhuul0rbIBKDtDNtA0M/D7PAz6anoMbRmNlBcrPYfrmL\nIhBPUtq1fISIWXSIlFnIHCUc8IpJks8XkfUcL14QY5HDDbnzhYQgY1arVZ7S\nqU9r6/OoQI7ueXhIbj9yN0GTrcdYQ+oKu/RvYXG10UPHJf+qE7/vBXcwTbh7\n4Q1cq6WMdXk8BpvpfrGXFjgnAzrkWmtyBN2QAAJzPUfRX6rxcSqDkwLhwdoL\nr1G+nQYTjXDK+/MVvTEzjuT2/jefwUBA4gmKq2Fh/OpPomksaWN2y6hYEgrl\nS9mXNA7t7SHUmfFssSMnO/JUm6gdRuZWx78xHXIx9rdVNJCCkZxRumyAJBfJ\ntoTcBguLQf7WuTrZy2QP2VE6Lur4wS7Gr61IsejeRbMH+CRDUoZ9J+dxXjfD\nym4BQaN07kL82tR44tPr1x9+n/bP8VukOQvGa6FYGk0Ydy2aSgfvm20emGi9\nXN8S8CCOKZ5y5ayMNEf2rQWDyCbQH2k24j+KoJEaficmmE+Vf1bS8BHymwBL\ngLbV6fg+amUOQ05pDKKkhxXSGxH/8UqfrGhd13NRiPq8I0zLqm9TwUbsuTH1\n6ASj\r\n=xa+2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"1f07f5f3107e3970d1c38861509c42480731d1d6","gitHead":"d5cb667088f21a86d4bd1121d4354d554654c016","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.3.1","truffle":"^5.0.2","multiaddr":"^6.0.3","ganache-cli":"^6.2.5","iexec-solidity":"0.0.3","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.20_1548269304075_0.8654671775113656","host":"s3://npm-registry-packages"}},"3.0.21":{"name":"iexec-poco","version":"3.0.21","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.21","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"3cd092c337c0e033c3b4a60b13cd568a53fb4870","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.21.tgz","fileCount":36,"integrity":"sha512-079tEAPz5X8ABxRvOtK2Xi0FyZAqpKTyVFo+dfQYYfpcNSotidPuAi4iN6muBAmydPxoV9+4Bmz6VbTeu82zgw==","signatures":[{"sig":"MEQCID3eWWmD0ftf/CmhqSA9giayp9y+UH8MTTsxZaX7LIjGAiAVZXKfgZaSCWLH2tTG/ASN7WnKmfgQQEFrP3X7u5mW0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7755891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcTvFyCRA9TVsSAnZWagAAFjoP/0I8moUYw6iQg3GIlV/v\nekxwyHIKbOymK/dP4zpirJW96ZEiIldJnTPrJA+Ngwo5nWPs4b6R3iHa1KgK\n+xgm/JdVpCE/oOpXw3hUV0mUGfBd/vg4FfVPWMoAjARDTylyjNXZcEGQGGPB\n1LeioZIEMGN8+CF1Ip9ya53w5VMkNwgG2oY0A52vMpEWGASIHje99ubCRq0i\niYbodMBYtY15LYzflcn0U0FSHL4PIVafNshgo2ZIcpkt1x5t0kp4oYVSVqLO\npzc2NdbK0FLN4QViHg5gJKHphGfNqkTr7qATgtnapQmiLp0AHJhn+kgblpk7\n8HjOkWNFmuZ7a2M6Z/xK2UzJAWQ2HwMGIk/Q6hBRSrn+5I9v8CjCjjqTv1Ui\nrxuOOx5u/H1yIirEGvIS+/Dj6UcUh6ABNUbvN2V8yrZ8KDjh78q78ST022Qs\n+uxRvAk+muwJwVu3oXURpLUlsweYG3C/uchBnJR1lnYWlUEXTYMV4QxXMn1Y\nCgzqwzXBBshThP/h6OO9v57VtUZd0wDl1fG8Mr8jgEfjVPkWrafnSGZejkxw\n1fTHY8v97nQTzlPHZyzlU6gMezRtdJbNx6KzDscRN4TmOah/HqEaJIbxqx7n\nGSgh/rZB1vGLhbLIGOSx9ScQUFcywZk9AdyJgDRGpttetLlvY/k6QOyiOO1Z\nRqVW\r\n=afGs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n\n# PoCo UML\n\n\n- [Contracts MCD](./uml/ContractV2.pdf)\n\n- [Contracts and Actors Architecture](./uml/ArchitectureV2.pdf)\n\n- [Nominal ask workflow sequence](./uml/nominalAskWorkflow.pdf)\n\n\n# Actors :\n- (w) = an account with a wallet key pair\n- (s) = a smart contract created by (w)\n- (p) = application to start ( like java prog) on the responsability of (w) when used\n- (r) = a repository on the responsability of (w)\n\n## Actor : Marketplace Creator :\ncreate [IexecHub](./contracts/IexecHub.sol) smart contract. IexecHub is composed of [WorkerPoolHub](./contracts/WorkerPoolHub.sol),[DatasetHub](./contracts/DatasetHub.sol),[AppHub](./contracts/AppHub.sol),[Marketplace](./contracts/Marketplace.sol) Once IexecHub smart contract is created by Marketplace Creator, IexecHub and Marketplace can be used by the others actors scheduler, workers, iExecCloudUser :\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">0_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td>truffle cli</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,\n            <a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a>,\n            <a href=\"./contracts/WorkerPoolHub.sol\" target=\"_blank\">WorkerPoolHub</a>,\n            <a href=\"./contracts/DatasetHub.sol\" target=\"_blank\">DatasetHub</a>,\n            <a href=\"./contracts/AppHub.sol\" target=\"_blank\">AppHub</a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : iExecCloudUser\n- iExecCloudUser = U(w)\n- U(s) =  a [WorkOrder](./contracts/WorkOrder.sol) smart contract owned by U(w)\n\n\n## Actor : Scheduler :\n- ScheduleProvider = S(w)\n- S(s) =  a [WorkerPool](./contracts/WorkerPool.sol) smart contract owned by S(w)\n- S(p) = iexec-scheduler = application that schedule a worker pool activity  on the responsability of S(w). (works, tasks, datas for result in xtremweb)\n- S(r) = ResultRepository = provide the work result for U(w) on the responsability of S(w)\n\n\n\nblockchain interaction :\n\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler (cli web3j)</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">10_finalizeWork.js</a></td>\n            <td>finalizeWork</td>\n            <td>WorkerPool</td>\n            <td>ScheduleProvider</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : Worker :\n- W(w) = RessourceProvider =  RessourceProvider wallet\n- W(p) = iexec-worker = xtremweb worker application today\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n        <tr>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>RessourceProvider</td>\n            <td>iexec-worker</td>\n        </tr>\n    </tbody>\n</table>\n\n\n\n## Actor : App Provider\n- A(w) = AppProvider = app Provider wallet\n- A(s) = [App](./contracts/App.sol) = app smart contract created by A(w) with the app characteristics\n- A(r) = AppRepository = provide app reference on the responsability of A(w). . (apps, datas for apps in xtremweb, docker hub for docker app etc ... ) for W(p) usage\n\nblockchain interaction :\n<table>\n    <thead>\n        <tr>\n            <th>Sequence Diagram</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor</th>\n            <th align=\"right\">through Program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td></td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td>iexec-sdk</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n    </tbody>\n</table>\n\n## Actor : Dataset Provider\n- D(w) = DatasetProvider = dataset Provider wallet\n- D(s) = [Dataset](./contracts/Dataset.sol) = app smart contract created by D(w) with the dataset characteristics\n- D(r) = DatasetRepository = provide dataset reference on the responsability of D(w) for W(p) usage\n\n\nOptional: usage not yet implemented in V2\n\n##  Ask Nominal Use Case :\n<table>\n    <thead>\n        <tr>\n            <th>Phase</th>\n            <th>Truffle Test</th>\n            <th>Fonction</th>\n            <th align=\"center\">on Contract</th>\n            <th align=\"right\">by Actor through program</th>\n            <th align=\"center\">Contract created</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>A - Initialization Markeplace</td>\n            <td><a href=\"./test/00_base.js\" target=\"_blank\">./test/00_base.js</a></td>\n            <td></td>\n            <td></td>\n            <td>Marketplace Creator</td>\n            <td><a href=\"./contracts/IexecHub.sol\" target=\"_blank\">IexecHub</a>,<a href=\"./contracts/Marketplace.sol\" target=\"_blank\">Marketplace</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization WorkerPool</td>\n            <td><a href=\"./test/01_workerPoolCreation.js\" target=\"_blank\">./test/01_workerPoolCreation.js</a></td>\n            <td>createWorkerPool</td>\n            <td>IexecHub</td>\n            <td>iexec-scheduler</td>\n            <td><a href=\"./contracts/WorkerPool.sol\" target=\"_blank\">WorkerPool</a></td>\n        </tr>\n        <tr>\n            <td>A - Initialization Worker in WorkerPool</td>\n            <td><a href=\"./test/02_workerPoolSubscription.js\" target=\"_blank\">./test/02_workerPoolSubscription.js</a></td>\n            <td>subscribeToPool</td>\n            <td>IexecHub</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>A - Initialization App</td>\n            <td><a href=\"./test/03_appCreation.js\" target=\"_blank\">./test/03_appCreation.js</a></td>\n            <td>createApp</td>\n            <td>IexecHub</td>\n            <td>appProvider</td>\n            <td><a href=\"./contracts/App.sol\" target=\"_blank\">App</a></td>\n        </tr>\n        <tr>\n            <td>B - Market Matching</td>\n            <td><a href=\"./test/04_createMarketOrderAsk.js\" target=\"_blank\">./test/04_createMarketOrderAsk.js</a></td>\n            <td>createMarketOrder</td>\n            <td>Marketplace</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>B + C - Market Matching+Trigger WorkOrder</td>\n            <td><a href=\"./test/05_buyForWorkOrder.js\" target=\"_blank\">./test/05_buyForWorkOrder.js</a></td>\n            <td>buyForWorkOrder</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td><a href=\"./contracts/WorkOrder.sol\" target=\"_blank\">WorkOrder</a></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/06_allowWorkerToContribute.js\" target=\"_blank\">./test/06_allowWorkerToContribute.js</a></td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/07_workerContribute.js\" target=\"_blank\">./test/07_workerContribute.js</a></td>\n            <td>contribute</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/08_revealConsensus.js\" target=\"_blank\">./test/08_revealConsensus.js</a></td>\n            <td>revealConsensus</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/09_revealContribution.js\" target=\"_blank\">./test/09_revealContribution.js</a></td>\n            <td>reveal</td>\n            <td>WorkerPool</td>\n            <td>iexec-worker</td>\n            <td></td>\n        </tr>\n        <tr>\n            <td>D - POCO</td>\n            <td><a href=\"./test/10_finalizeWork.js\" target=\"_blank\">./test/10_finalizeWork.js</a></td>\n            <td>finalizedWork</td>\n            <td>WorkerPool</td>\n            <td>iexec-scheduler</td>\n            <td></td>\n        </tr>\n    </tbody>\n</table>\n\n\n#  WorkOrderStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>ACTIVE</td>\n            <td>acceptWorkOrder</td>\n            <td>IexecHub</td>\n            <td>scheduler</td>\n            <td>WorkOrder accepted received by the scheduler</td>\n        </tr>\n        <tr>\n            <td>REVEALING</td>\n            <td>revealConsensus</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>scheduler call revealConsensus. Workers can now call reveal function on WorkOrderPool </td>\n        </tr>\n        <tr>\n            <td>CLAIMED</td>\n            <td>claimFailedConsensus</td>\n            <td>IexecHub</td>\n            <td>iExecCloudUser</td>\n            <td>if a WordeORder is in ACTIVE or REVEALING for too long, iExecCloudUser can get a refund by calling claimFailedConsensus</td>\n        </tr>\n        <tr>\n            <td>COMPLETED</td>\n            <td>finalizedWork</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Consensus reached, at least one worker has reveal and reveal period ended or all workers (with positive contributions) have revealed, scheduler can call finalizedWork function. This call distributeRewards and set result and status in WorkOrder</td>\n        </tr>\n    </tbody>\n</table>\n\n#  ContributionStatusEnum\n<table>\n    <thead>\n        <tr>\n            <th>Status</th>\n            <th>status after function call</th>\n            <th>on contract</th>\n            <th>by Actor</th>\n            <th>Description</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>AUTHORIZED</td>\n            <td>allowWorkerToContribute</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>Scheduler has commited to the WorkOrder (ACTIVE) and workers can contribute when called in.</td>\n        </tr>\n        <tr>\n            <td>CONTRIBUTED</td>\n            <td>contribute</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>A Worker has contribute to a WorkOrder. his resultHash, resultSign are stored. his stake is locked too</td>\n        </tr>\n        <tr>\n            <td>PROVED</td>\n            <td>reveal</td>\n            <td>WorkOrderPool</td>\n            <td>worker</td>\n            <td>After scheduler has call revealConsensus, worker can call reveal function. If their revelation is correct. Contribution status is set to PROVED => POCO => ProofOfContribution </td>\n        </tr>\n        <tr>\n            <td>REJECTED</td>\n            <td>reopen</td>\n            <td>WorkOrderPool</td>\n            <td>scheduler</td>\n            <td>If NO worker has revealed, scheduler call reopen function and all previous contribution are tag REJECTED  in order to reopen a new allowWorkerToContribute round</td>\n        </tr>\n    </tbody>\n</table>\n\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\nInstall the latest testrpc\n```\nnpm install -g ethereumjs-testrpc\n\n```\nstart your testrpc with\n```\ntestrpc\n```\nYou must see somting like this atb the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/00_base.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n\n### choice 1 or 2 then launch nominal workflow tests :\n\n```\n./node_modules/.bin/truffle test test/*\n```\n\n### choice 1 or 2 then launch by contract/by fonctions tests :\n\n```\n./node_modules/.bin/truffle test test/\"contract to test\"/function to test\"\n```\n\n## how to launch solidity-coverage analyse\n\n```\nnpm run coverage\n```\nor\n```\n./node_modules/.bin/solidity-coverage\n```\n\n\n```\ncoverage : 12/04/2018\n\n180 passing (12m)\n1 pending\n\n-----------------------------|----------|----------|----------|----------|----------------|\nFile                         |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-----------------------------|----------|----------|----------|----------|----------------|\ncontracts/                  |      100 |    75.16 |      100 |      100 |                |\nApp.sol                    |      100 |       50 |      100 |      100 |                |\nAppHub.sol                 |      100 |      100 |      100 |      100 |                |\nDataset.sol                |      100 |       50 |      100 |      100 |                |\nDatasetHub.sol             |      100 |      100 |      100 |      100 |                |\nIexecAPI.sol               |      100 |       50 |      100 |      100 |                |\nIexecCallbackInterface.sol |      100 |      100 |      100 |      100 |                |\nIexecHub.sol               |      100 |    70.54 |      100 |      100 |                |\nIexecHubAccessor.sol       |      100 |       75 |      100 |      100 |                |\nIexecHubInterface.sol      |      100 |      100 |      100 |      100 |                |\nIexecLib.sol               |      100 |      100 |      100 |      100 |                |\nMarketplace.sol            |      100 |    88.89 |      100 |      100 |                |\nMarketplaceAccessor.sol    |      100 |       50 |      100 |      100 |                |\nMarketplaceInterface.sol   |      100 |      100 |      100 |      100 |                |\nOwnableOZ.sol              |      100 |       75 |      100 |      100 |                |\nSafeMathOZ.sol             |      100 |       75 |      100 |      100 |                |\nTestSha.sol                |      100 |      100 |      100 |      100 |                |\nWorkOrder.sol              |      100 |       60 |      100 |      100 |                |\nWorkerPool.sol             |      100 |    82.69 |      100 |      100 |                |\nWorkerPoolHub.sol          |      100 |       75 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\nAll files                    |      100 |    75.16 |      100 |      100 |                |\n-----------------------------|----------|----------|----------|----------|----------------|\n```\n## Oyente analyse see [here](./oyente)\n","_shasum":"3cd092c337c0e033c3b4a60b13cd568a53fb4870","gitHead":"4f1ad6f4a73a7c00966c6bb56678d4453ac26114","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.3.1","truffle":"^5.0.2","multiaddr":"^6.0.3","ganache-cli":"^6.2.5","iexec-solidity":"0.0.3","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.21_1548677489467_0.06900590729922351","host":"s3://npm-registry-packages"}},"3.0.22":{"name":"iexec-poco","version":"3.0.22","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.22","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"1a32e8a9bc9a58038eab5255e064418c46cfcc6a","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.22.tgz","fileCount":32,"integrity":"sha512-i6xpZ0DbRVLzqMvbPQtCc87/iKbi98eJ+GMPEaakhTl4Acz+/aJk9GVlat//Eq41dMWvbZJ7LcTRDZp5ry+K4g==","signatures":[{"sig":"MEQCIFVSihkKuu/cz55QgbMYHZMe8j56iny3udOq4bm/FyyaAiAX/sXcoiAkovo4UVwgXtHAc6QlP7Mf7hf2DWYsuOla6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7302527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbAU+CRA9TVsSAnZWagAAVcgP/iRFDOv/cD8ttinmnhn2\nbMxUVGnimsDY9gMeJaWuX3qhk8RCqPI0ZJqSSmjcwEvZM3Sbi4+dO4huy8Lq\naH0/htzbbQLX7SQ35NocDHrjR8xRkRm75/iCZjFw2yKSMruslep4BnjX1Py7\n68kpoZdTX6OjTK8BPhCp2r4y8Ge59zAaGZPfxImq0bksq8kdpYQkiP2fji6/\n5vvBf5CDxA1RlZSbCDUEA9pP9JMpjQ7j0W5pcu1kRYab8okZusBsTucAvaGl\nVIDrsKNrWLkaKF/MtoSESR/RK9Z8JoyU16/GhtwJN0PWOixiEaX3tXpoJb7v\nwTe9m6w2eegX1YwPEt7M4RxUzC/1dhxl04I8nFeerGTGTUGVceMkc8T2oZBp\nrCqkQvmBq4yfKBqHulloz8oVVlGi/zauPuOPVxVtk1r5qYjM7rS79tEhzwd4\nncXq2ximCIXSjHgLTbY8zlWGZNGKt7ihuUzhXlLsA0nO3IdL+EnmGQqfpjms\nG2guADkyJpP2nY6pGQLgVa6fpZ1cUtqvxvyRC5G9P5NuHW7EUqSnKobp0wBk\nhgGbxvM1BFXGYgrjyxeQ5mKg3+oJPASzKNOE+PsVi8sWco+2+6QEwCgoG2Z4\n5v0LSED6aEOCCZCvRcP2LzGEiTnIGqKEx50toBCLPoGnpQT1CKRy+P0lFv25\ndpLl\r\n=lYbZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","_shasum":"1a32e8a9bc9a58038eab5255e064418c46cfcc6a","gitHead":"649dd0e6eab01bccd0dfbb54a753398ca963f172","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.3.1","truffle":"^5.0.2","multiaddr":"^6.0.3","ganache-cli":"^6.2.5","iexec-solidity":"0.0.3","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.22_1550583101529_0.9663868115232597","host":"s3://npm-registry-packages"}},"3.0.23":{"name":"iexec-poco","version":"3.0.23","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.23","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"a0945232e3bcdc581105fb19ff51c4d026f73b8e","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.23.tgz","fileCount":60,"integrity":"sha512-/r6PJu2qssRKb3IqdFLZcOLMRJKOEa1kB6m1LQYPX+Kw8qTGWvM++tZ97hB3C6X7J1GfNaAbI4D+WNKhrS3LxA==","signatures":[{"sig":"MEYCIQCpkTq7plCjuxV8upvsWlyV+lvuKtSzffRJXIQY0Umv8AIhAJdCz9JODDCMk1cEtV5qQURABfd1GVlCtB6twLQ9h/mr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7435874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcd+6bCRA9TVsSAnZWagAAkwwP/jbZMoIOYNOkXQuEsTap\n5u+YJW0y+OzMsrGpUyEwtg9XBC/z4CeBzAK5QbN+EhuisS2ixI3qg1RecUza\nAwYK9j75hVKpy8JbK11BNhiP3vRuoXheAwspEW3IZzjEbO8hwpyed8t8NQyg\nJMJTP9RiETHjmuu7t0VxUsLFszsdrDDDWRCKFqo2ZD74obBK2+osSBhjwe+l\nQQGNrkmmQKaqiHhpNBCjFE1PbfPE3yrt5JL2cng+9V+GCfgOYIwjsENGY1yM\nOUWQ2QDrWRKDJ4lmEiNzgkDVU8wivOSFymzZgTW80bCacdLIxAYql8NZsHuc\nY6jRBjjqkFRNmxQip2DOec6XWWaV109LhwND/WMlTvyTjoPqSY0dfc8zJKl+\nxFUAPjwOsP0BNThf/aOI42EbO179rzKeFGdhAiQz8kSSyg/4DOriWmrGU97c\nryL0fYzR0puL4w938TUhdr1GSQ7ODjsh87wvEop2l+jilUMFia4+kC8Bu+k5\nsEjNA8R/NkEXUPL/LCFZfe+qd4dVhgATGdq5xi1+ZGVAs206eezeKKh4pKsh\n4bUaGHifQhu66rpeK8yffu84WuuF02Dji9DECzgkM0VtTCQC0Ycbai7zBl3W\nypmr6+hLADmsN1W9xj3Gewi+uCtfQh43ZaMvJnqHgAnt7+M9yjxqSIawTaWi\ntNA6\r\n=UIub\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","_shasum":"a0945232e3bcdc581105fb19ff51c4d026f73b8e","gitHead":"3d23a2bc9d92b3208381fd697e29a6ffcd273a85","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.2","multiaddr":"^6.0.3","ganache-cli":"^6.2.5","iexec-solidity":"0.0.3","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.23_1551363738665_0.17139372979693923","host":"s3://npm-registry-packages"}},"3.0.25":{"name":"iexec-poco","version":"3.0.25","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.25","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"d889e0ff0fa733450d98fce712e2e57ecbe3ab23","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.25.tgz","fileCount":64,"integrity":"sha512-ipWtojgPnCbUHf7YIUOO7z6N8LBI5rO5cylbda2rtsXY/AnVTBQ6tOVP5Z690Xv7/tUhX+VjQjmAuHnSURNj4Q==","signatures":[{"sig":"MEUCIBk8N88dhTzObkihTeM3BMtj3XBQ3thXA3DJ7SdRfmHtAiEArcKRe5d8eFdjFInenBDsEy30zpjCh6VKs1dGY30ApnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7601391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchnVzCRA9TVsSAnZWagAA3OsP/RP9hR7cmjVf3GIzhbyt\nbmXbgT6iQPDlKfQ7jlV4Dcrw+cFxEk6vAPpAqB4LvZe2k3VTM8IPwVomsDNK\nEYEKiqoXiZBgOXNQglD+sQwdWYFFdAOi4UetynYIb27sQ2+5HG078XjZYseY\n6cuS7em+8WWvlKaHeRUEMU7+HBEVQbSJUg1PMqcwQbMHrgnRbVdrW8qdTLEP\nUID7B87BHk1fuV6QNbIe1L/5Y/eyaYk3BsC5iX3mkHZ3+XlTJqQmHXY9BQa1\nlgLzXmS+vv1X/pk1FG5Vm4YWXLvMatBgHvwm3B445ozuXLjtw43d9mj/VWUS\nVs5736JkpFBHOKlNYS8ztEEEY9ctzRPxI2FIqFRgKppxIRAwucSTTwRJXn+v\nnnCwoYJxqkQoxdMuYBdraK6cfDU0KzebyFYR379QZz55EStoFAi/7CvDQMUB\nCJchMM0xWiUi01wiRCXfLdhOmF7G1EmnlzscWgvijBDTZ+RC3kUwyLV4Dkh9\n7YBm86zKdo3zbM6EuUAap9Sgak0YwFheUN/Ge5JrBCmVdCsPffeHlJhCQ3QX\nbPiEKPLApsCqjcugDgUKUo6lBqkThjmR34o0C5Ax/VAYo3YprNeh6+kUqlxc\nhSV4KJzc2mRrUALyfRAR1ybB0pi0mxpxNOWUGfrZM9RrOOqg13YwcZchLgDL\npegE\r\n=Qkjq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","_shasum":"d889e0ff0fa733450d98fce712e2e57ecbe3ab23","gitHead":"e9acf25a3478ddef6fe3d77f52b2119e5e60f144","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{"openzeppelin-solidity":"^2.1.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.7","multiaddr":"^6.0.6","ganache-cli":"^6.4.1","iexec-solidity":"^0.0.6","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.25_1552315762420_0.4472902848739235","host":"s3://npm-registry-packages"}},"3.0.26":{"name":"iexec-poco","version":"3.0.26","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.26","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"b1a30ed342105cc4ff52bfde67f3274fef45a8b0","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.26.tgz","fileCount":62,"integrity":"sha512-N7UmFpK2P7fw1/17WxebyjmKloqce+/lmzug3c+1w5v1jKvgf34qEiWKzzEYEXbPEt2e6kqHqJ79Y6gNXXxJng==","signatures":[{"sig":"MEUCIQD5HZypq39CwslmYU8quLObL1kmtRr6CGbIhPcsVb16KwIgSPjl+boAM9grwB1R/Zbw2IAnMZYfREXsvqvZp4Y+Wpk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7536841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch60DCRA9TVsSAnZWagAAq70P/2fTfx8Dj/4jOEYFr0Fv\nvgcdw7E3cTQETgiQKfYbJSG81LR59ig+LBVorTzr85VgWkH94uodyb01GNxb\nsHpxvQmYUh3SPmGhhvuPhd4Abl+QDOtZOLuXmDrLxr3H/t3jFe8LDzosQWp6\nhLF5hiSaXOdezONLi++4G91zDM5oo7Ex6EriyKALljEdh12uDdhzwyXBaPVM\nr52Tb9IbSOv5gNE2T2ogmqocx1mDz2WYGVY/xMimsFqvxpFL7r6wKW/EVgyj\nEGkqDSrYkJr0E+cuzatqQzAtGNKjDqgN8L6e+bqYWwMrGbWOIfri7UrNzACh\nPq82BAa0QEW5ZF3RZqqYJ/I61ND1ORALW3Ww9cUmeiWEho30WjrfHmlv5Jzx\neb0Dhnkwik2To5cYnpanEeW/gPq4vXCqVDkZVoQPg3Glxp/HDMSHKc5mrsIt\nBcgGyarDToskgyEXttlx+MeDqLOovMEud8/yWvvjoDz7D35UnoIVITAKSD0O\nJIjkdM4XuqQTFRf/L53s867JFZo7WYuma0msPL10Pq7SBf27xkP63tuslWq+\nyc7KzdGKesqK+RF5BTwTY2yjmIm4iuhMi0DRSf8TIuWWQbjhMkPg0ZrCVMBJ\n2fTw5x7SERvnsZEzjABDyzAW4b0EslTF52wy9Jxu4pKaO8+exos+UzfI87en\nBxEQ\r\n=aQQ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","_from":".","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","_shasum":"b1a30ed342105cc4ff52bfde67f3274fef45a8b0","gitHead":"e775a9f70683fc97a127f93d53bf04e6ac416b94","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"sulliwane","email":"sulliwane@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"3.10.10","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"6.10.3","dependencies":{"openzeppelin-solidity":"^2.1.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.7","multiaddr":"^6.0.6","ganache-cli":"^6.4.1","iexec-solidity":"^0.0.6","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.26_1552395523142_0.22233857402117874","host":"s3://npm-registry-packages"}},"3.0.28":{"name":"iexec-poco","version":"3.0.28","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.28","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"3d43133f3a3e93d70316afd2f576dba7c87d1623","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.28.tgz","fileCount":25,"integrity":"sha512-Nb+nUHWwOUcluX/v7FQK0Jd1s5VcWCIxPjss2T5i7WJIe/4aqH0/hWsWJfcbmT7pf9IgxiV5fWnsCK2Ce6zC6Q==","signatures":[{"sig":"MEQCIHUnyGu01ZNVoFTEAMnyJiZA/BVWAeiDg+vWLBwE2s5RAiAWgBfPIipvpeW2HBIWRb25cZauVup6aqJLN6ADYBKoJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":85463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctwP3CRA9TVsSAnZWagAAm/YQAINlR2Wl3AbCCxiKiN/V\n+haOxnoAatJhTBtumc9fHAtMqYTNOTKuqNAwTYTjiFv/+iF8Ajhgc6xJGkez\ni2RdA3cx4pCVM4rCmD1mRkUDyEtrroSVGtoloo1bfY+s7DI3hpur2k1EzkrA\nF9mSI9oXK/7ikytFLBMDG+0qdZlLjTV74y1tntwGELmxNcc20G4QqZ9PhfGo\nK2rMMQj4yTVHa1mnmqpriTX5WN6DCEM5XdnZj/HFCZDFodRgyd20AXY5fmCB\nadM+KoNU2eo7jbkt01LZSaW4/dXkK2eaXG4bmRNCIKJYsvZlXNanksrikjfz\nsqqN+O+ES7CAAtkSJre49yTO9ylfFa3k3/e8HQxG+P5GJfAU04MbneE0Xhg7\nip8ME3fN0ffCOCcKOolXzwWm8IMSeRXQ23tBf5lb1AihaNn5ig/cmSg1k03B\nys0KcWro+gGjNB9T3G3C3Hi/biKT2fWBYWOt7zW4rMRCeuAv+14MayQD8+ob\nhIGu2C6/ISGMgcnIdgIlbGcvVrQuXzQ5t5hD1i/fmE5Dp77IJBKW83pLCB4A\n5M3fU2JiXIxaeoEjmXOQeGumV9rIirSOPVwLM8X4bodDGzCa80CcpaP31jmZ\nYrVc1j2sIuzB9O9qEqOtMi9VLjG4aZwOytQq/v+l6eJgfXznsp+pklYDfUd0\nIRwM\r\n=TUlh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","gitHead":"5f642f5ec22a6c61d43d6920f669a9367312f968","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.7.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.13.0","dependencies":{"openzeppelin-solidity":"^2.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.12","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","ethereumjs-util":"^5.2.0","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"^1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.28_1555497974541_0.6559787199924958","host":"s3://npm-registry-packages"}},"3.0.29":{"name":"iexec-poco","version":"3.0.29","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.29","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"e6c9c6d9c369f39cffd0b67c56b262892326e148","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.29.tgz","fileCount":83,"integrity":"sha512-90xn8ofDaCr2msuUTe8w7Q1LkbxnQ2OA52t9wL9xbs+5VVuQRV2LxGTuLMtJb2191A2d4nB5mbZBJQhxpTVAzg==","signatures":[{"sig":"MEUCIHLq6OhlI9hYykd5750evPacXHrdr8SGJXZeKm/k9bFyAiEAzFutq9MwWWisqh+tkQJICeFjePjNim6CR0iHNNt/7J8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8521910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctzuMCRA9TVsSAnZWagAAgI0P/1+ZQmxNf08pqefknqx1\nob9i3Vis/QNTM8jArg6sDHRWW/VyaWOjZgqUzCFuSYt7jJCt9AQcsyhZrM1l\nHC37Lz1PFbm1pB+mRLpJEtRPUbCzrXSIA9vQd9li+1PH1sIeDmPJ27QLV6oQ\nEGrLZMQFU7Rxep24icAk0MLYObk2VUfo9AEPuYVBiXrHzkmLGMSFwZhOu3rI\nO1nLNo+fn6OCuDdbePPEmqTz7HVhqr2pYryclU1JLsHgmGjn6YQz6NTc0glE\nADzhevVb0U3Dd063jnH/jLFA9jLWmKRPzDcJsq8amRVtk+i8Sz8Qrqiu67TH\nlJUu1JHFSSy1XpiUQvncZZdN2dmO0uDBtedPdp5hOSSTCaw5vJ7mma9x2sfa\nQwwUw+nHda7q+L6NtiTy7gUxnOhFGZGlWAkUJvkLcVOLPTTWuljRb1FBlVYS\nfHyAT2eeoCOWSOVynd12llXHlWz5Op6SnB2rzejHjI3RObJOJHT/e4deWb9H\nI9ZSHmiCsaVtTSCj5FwXBM2VUgh+ngkSfOFIVC4TlnaNX9OILkoWCuUR2w8/\nLwV7yjGlPXGuWuxcXeiQx0OAVNUbybiHrikg6hA7B1FuWGRnZRnZc8bMS+O6\nmjY7BkLQ0whNIYJ2OmIEwii7qN6U5+4FyASbZtMpT2+bhl0V9y44kuyCNgyB\nXKP3\r\n=4kz5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","gitHead":"31e44c2e3105e3718e5a31302013168c8c1f4e0b","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.7.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.13.0","dependencies":{"openzeppelin-solidity":"^2.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.12","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","rlc-faucet-contract":"^2.0.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"^1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.29_1555512203634_0.4979005568569439","host":"s3://npm-registry-packages"}},"3.0.30":{"name":"iexec-poco","version":"3.0.30","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.30","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"d1c802c6bb5dea9e3197236754cff3881a7bbba7","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.30.tgz","fileCount":83,"integrity":"sha512-LI15fn8zuJRgfojcVtk7M0HGeanI/5uCaYUHe645qTBG4KvG09saufzIJunf+U7FGlyNJhq7FdGSDhD32DGAYQ==","signatures":[{"sig":"MEUCIQDqmnbJilSCYWNH7XvFJWDKTJWiON1ehKIfQUjopv1svwIgGRAajcowatLAEpak7/BgF2iWJcVzJmT162h+g3x6lmo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8522309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuh4MCRA9TVsSAnZWagAASoEP/3qDcYQJ9HbRPwJAlgEA\nxzq0PCMVORuV+SHGSo49Q44nt7aPinezB2YmNIvynAV7UcuQOoT3h6F28O1b\njVSHQEQeskKZIdKwCx1rgLiGfMP0TDZ9q9M1VnxxUgW0v9xTMVRSIQWG3rjb\n1h8c0BsZMLSqsEwMgdRuZMRs5mtalUIOlimO2eE40UzNt+GDe27E8qKLv4zj\nc5NxunOw/aU8GcqtIEW6m2o2aGrJy6y9pN1tuwdHvVD6aCtWPtgDJqQ+nqw1\nLd8YO/biBqc8+zcLRq5bGAa+bY8Ix0t0FN3Mp0dv255gqKPqPrLvUyPgXrQd\nz5o51QlDbZf0xbCPAbZT+LfTaORctdqc8JaDvXw7gg3Y5eQsjhufrT6/HphK\nhoBRWxiRRAwl7iL66XUDvom09LD8Zy//b90MSqNZE8fJs9+BhdqWGv9fEDlh\nLbylRyCl3RlAaAnjrPvPkAFTrS2Ott/egf7exYVxnHL0/3gDUZk+qtJqVap7\nzm3GyITlTrIm6OHCpq0mpqzGfG5y1L9mkp5vxUcjjKHXeDop4CJH7gyEECu1\nDEr6tTZG/bPzEtXBJD/KUmGT5xx7W+OlOjCllf/PBtYmeO8LKc7ug6R3OijS\n2bpriAbDbWTDSAViISk2AGB3aGumwttIm222uRe9cExMY7lSWf7IaOG4vAfo\nv3Hq\r\n=Ury4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","gitHead":"d45a0c01c10a2002e116327a45ed53e57674d994","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.7.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.13.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.13","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","rlc-faucet-contract":"^2.0.0","openzeppelin-solidity":"^2.2.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.30_1555701259306_0.7199224383264531","host":"s3://npm-registry-packages"}},"3.0.31":{"name":"iexec-poco","version":"3.0.31","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.31","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"a18c97c2e920ae673f5f4eb30d35a3ada58154f0","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.31.tgz","fileCount":83,"integrity":"sha512-q4Ov0lIkv1yK+RwZuVRSku2siCnOhJyKQ9D1rO9mAJhHVGsZnmBD9Wr25e8Q2LAaFv5sOVLTM17lySe292ErZQ==","signatures":[{"sig":"MEUCIAaLPA04yahMKTXK5qllxoQIyJyKZh9QBVmTGyT4Z2tLAiEA46sj3ehZ4RzrGFDsiKJaoHIQrID0pEpaObEEQFaFZ+0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8536702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyqvYCRA9TVsSAnZWagAAKAUP+wVpBeYe2CuOZjolDAc9\nvrJl5YexyYvw7ToQWg/8b63vP0IiKI07Kx7eqJQ03H9a3J5nkmUtUaBgmQ0Q\nlRxFMS3vps4urL1Vjsvt87VMrTaBI1UVXxWQl/T4LmDwqZNUS4iB9qG/J3Mo\nmOmNQn8J/HKfuDPGu/Ll1oT6FDmd0xUjfjvtWPpHmzeerbbAYcQMmsLK6giL\nXscPJoeGI6bDbokT7mpUYqJM4NCk8p0AYPaMt3hdSoe+YFM9NXQC30arjHwR\nWpgArKtR4uPECKcI6moFki7DHe7djpHhPgogLAMGnGFpXWAK2Yv/vG9+8utU\nkrqk80kywH7RT9c7xvMz1dR6PGlWKnCmTNy9uGZja2MVh26eq6cMnRw1E9Do\npErL7eFC0HyfWAtQxxcIx5qh0tSKCewhoJGPFvpbFkPOCq7UIL8G57v1an9e\nstSnolVPD/1l5bWPnSfWhNprx05G5ODBnt9ISXYCCZ+htR90yrqvdVLZiUIr\nElQTdUlzJxojAnFURDiKfo4TJf068hkJ2b9uri0qV9QnP3FWwY0YVuiXQaxr\ns0XV5k6Ftr/5xRVoPn30m0jgxKkLxoyx/ePHQWNycwN82SzA97RcGgou73QA\nlxdooaUbCE06ttCqVNAUpvnw4wE8ccSlAJ2FG2BNarK+Dm27zdxqR/a2ZQNR\nPJfu\r\n=XFz+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","readme":"\n[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)\n\n\n#  Introduction to PoCo\n\n[PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n\n[PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n\n[PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n\n[PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n\n[PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n\n# PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n\n# Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/poco.html)\n\n# how to build\n\n```\nnpm install\n./node_modules/.bin/truffle compile\n```\n\n# how to migrate  \n\n### choice 1 :prepare ethereumjs simu\n\nstart ganache with\n```\n./ganache-custom\n```\nYou must see someting like this at the end of the log\n\n```\nListening on localhost:8545\n```\n\n\n### choice 2 : prepare Local geth node\n\nPull the the following docker image\n```\ndocker pull iexechub/iexec-geth-local\n```\nstart container\n```\ndocker run -d --name iexec-geth-local --entrypoint=./startupGeth.sh -p 8545:8545 iexechub/iexec-geth-local\n```\nwait to see in logs the word : LOCAL_GETH_WELL_INITIALIZED :\n```\ndocker logs -f iexec-geth-local\n```\nYour local geth network  is ready, you can launch your truffle action\n\n### choice 1 or 2 then : it will deploy smart contracts according to the [2_deploy_contracts.js](./migrations/2_deploy_contracts.js) content.\n\n```\n./node_modules/.bin/truffle migrate\n```\n\n# how to test\n\n### choice 1 or 2 then launch one test :\n\n```\n./node_modules/.bin/truffle test test/000_fullchain.js\n```\n### choice 1 or 2 then launch ALL tests :\n\n```\n./node_modules/.bin/truffle test\n```\n","gitHead":"d0294f9f0f0b0998f7b60dd2146904486627efa2","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.7.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.13.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"5.0.13","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","rlc-faucet-contract":"^2.0.0","openzeppelin-solidity":"^2.2.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"1.0.6"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.31_1556786135093_0.588699922745413","host":"s3://npm-registry-packages"}},"3.0.32":{"name":"iexec-poco","version":"3.0.32","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.32","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"2e9b826d50e1f2d5f1d0a973c15570c96de0a9bd","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.32.tgz","fileCount":84,"integrity":"sha512-YRloLcrc95QCrd6U3ElCokaaXibsyBwb2RnnJWjKpsLdsnS0U5/HM0BimUPG0jCzld/8dXN8ZGvv35KYaWFXYA==","signatures":[{"sig":"MEQCICgdSnF6PnEoAbax8K4EIjR4AqgYg8Heuc2f/R38o5wqAiAlolXJEs22yJjGaf0YKHWk5KDnVIX51MNriZ0euuLTdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8618719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyxpKCRA9TVsSAnZWagAACfIP/j9ZM08f0ar0Vn8C+DOP\n01MDS+7dpLRdz+SerzWf38LxcMDBbHQrtSp/unMJhap19NM68qVn6yygZ87K\n+ZqPm0xEDXLZgR1D3hjt3EMgZ4JmwNX+lRHPMqMcHKgC81tj2344e0A6Tawv\nyUsR37Givqk3Qq3e5MZfOOACtoSVMMPRC7bwKA4YGa2V1pF6xx3umhPGs0UX\ncuE7e/OuDNQjbVBmq5Q8vM1QafsLY0Xbrs17QhH2OSefFU+OdZXEwOFtXxoY\nAwpoykNUfIgQWKzgKOx9l78BVReB0dpklRxh2V3NE1/MFmbDREwWXSf2l4mP\no26fIfHmrbiFC7iLc5v3Ny8ung+cuICzKTNNcJ2xQYkhrpRhCjLALq+wmWxj\nUb3ek4aucr3DtHnf/1swA/lwCI8XrzaodfzOyuoWidG9vazk8vM45K4tgxgO\nW2cTVlj/CgD87YOVWFGbWw5mjOcl8tsGn/OKOAvVAAZOEFsoxAUFDQUbBLrR\nkxCOEuR/tM1/KRrQ1AdfPd3mBIQD3/Ykd/FxmFKEjOw1Tr7mKzpHfqIuG+x+\nCKLjiGTHHoBJixbcfSiliYqdMqu7RzzCV20zFZsFAzXm+cAkAqP2Ct3j3XuT\neavweUNo+0yf4aPY7Cw3cG7bmuW1pt598mK64YlptOQpehfimNxhq9UGeoTt\nRVRe\r\n=L4sR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"c8dea588a73c6252e8f291851609b1a144cd5e15","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.9.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.12.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"5.0.13","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","ethereumjs-util":"^5.2.0","rlc-faucet-contract":"^2.0.0","openzeppelin-solidity":"^2.2.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"1.0.6"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.32_1556814409961_0.17236485139500446","host":"s3://npm-registry-packages"}},"3.0.33":{"name":"iexec-poco","version":"3.0.33","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.33","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"2f986b50e63e1273c9d6d6176c403c77e2408360","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.33.tgz","fileCount":54,"integrity":"sha512-LBEvtPmEpuOkz2gZGy5mMDqH1rVQEiP9Lt/enXF24sBB7XuEa5MdFBPvm3RHJQ4LwPWU4hI7REBMtfZLtZin7A==","signatures":[{"sig":"MEUCIBzAojC1YsX0/slfP2X3VmC2v7IKMliQPeQpSJPfSR7hAiEAh/r3pOG67Xi1mABTObUlPeyfZk+48afs/biibaO3cbA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":321519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczEpVCRA9TVsSAnZWagAANwMQAJeblcvq9wMZ/i7iK2sH\nIH9B23+OVTINSmj28xRwJngqqu5Ng+ScRfSR37XzKLlBrAeaM9APBfyyknrJ\n6kxrc54P2NRON6gvksWGJglqYO5TOjhW8H7Hn+ScYkDooPq7EvzRup95VLIO\nNnythLhGKkdu/v81+DyMu14EtCXQkoOROZDzZwt0YVnq739GjFSOXuJkD/2L\n3Vqzy9TELey1F5IA1mEJpHFoc1vxoUzScVWxSNrFSsYRbQk7tomDTh02sTFB\n5KcU+Q4A7Lo1FaeFoOMrU4SulzLcgPGdHGra6UbDITOb9VcowbX0tkLwNqgk\nhyYqLtoLewXcu4X7Q42v8VsYQ8MbJwKRpjZywruhcVvJrOha7ysGpqU2sZvg\nMHlHQTyQJaB1IOu6eJkjahLmJrdttt2FgR9ZBCfd2jNGlPl1hBSjoFbn6akc\nnX8BkK+n2IZTEjTOXh0BrqZGSs0NeHYTI/dVFwh06sv8vsz/xYZZiOSKkd2p\nsnrCR27lYJ4+vcek97FB6BNSWc9TJ2Vxtuqqg4z5F1w4l83d8NraTozNubpm\nnWyYTyR7Ef486bEfyHwI3yGSQoQP0neMgj53RCFFPMt6JPxhO7GO0xhhkKTU\nashx4f3VA0tM75gb2mCXRqzq1obF0OMwd3p3ieMXVyuUydFSaSAK4Yyyud5A\nYSlr\r\n=ZTPc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"e32c380eb9918640da03d5a05c675b3682971cb4","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.9.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.12.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"5.0.13","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","ethereumjs-util":"^5.2.0","rlc-faucet-contract":"^2.0.0","openzeppelin-solidity":"^2.2.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"1.0.6"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.33_1556892244766_0.4558358838087979","host":"s3://npm-registry-packages"}},"3.0.34":{"name":"iexec-poco","version":"3.0.34","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.34","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"dc0c8a49d1ce923e9ffe695d2876be50af2d3adf","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.34.tgz","fileCount":54,"integrity":"sha512-Y0JNGey92sD74rcoDhwC6WvY5gfD7qCe2C+glTDHB20rBu923sqJgRuKl/U7hKXh0ApKcFr1Bh5+DPRTecIUPw==","signatures":[{"sig":"MEUCIQCtIxk6DVUHBrpdzzxVOED++wNwOsVnMRnraXNV964tgQIgMKXYY9c5aMQCDjDgWtIdaei+HVllXaQDjdqga+2l+YQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":321544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcz/grCRA9TVsSAnZWagAAVksP/R+oCWxyPACJS0MsnZp+\nWPLRQ0UAJUKv11NnJ3s0AGk3SaoKmGkK7PTNtMx/rrLd8TwNY6aVOSNL1u9X\nqm3cO1cqlJAMzNV4mH2g7pyY273ETcsbH3TflIoJ1QAscL/rjbaZG9l2NJli\nBkzcjR8mx7e4tLANKZKjPpOF9gnhsuYfyBsDn6kMyX+4uTJ/nA9T8VfZAt0Y\n3NKjDDSHqqEEK9hRFjOqgYcenHK6Qg0DqRQLR2LUaq7AGQIzFi45zaZzfRnT\nKmx48XvunBVzwz8Xx0N7VKAXXyQmVHAqikkiTnPDLwwvYvlM9i92O/McdOrd\nxKhlFw25ANWVRNF4vfLbvv2stnhBo0nPLSlYTB3v5NXWM176xev9tNPw0+zQ\n7Ji1kJjLJMm1Ye8CCQivFsT7JsLiDRl3vaO5IKcne1vwl/t6QbYbcePatO7k\nF042EWS41OdXxfvnLfnyMQWtZfpe94DAMZjvgqH5eqaduBmoSljLoR5j3zic\nvqFLM2A8XnKGEY4avk5VsDw3y/6BOCJQC4jCntk13eRjleyadBzbpgO6bSk6\nZc4YouzFU1PQmEOa82W3oziU/W/nLXhaDAhc/hqETyaGDrcIsr1jPbcUzdBR\nBbDtVDIQEyYXBDoFbO7jglC0Tm6yN5FJyuEA5y+H9x3Itn6x6U3uAvF0Y/Ft\nbMNW\r\n=F2Ev\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"d99a9a92e705204c3a706df264c292d5908f124c","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.9.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.12.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.15","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","ethereumjs-util":"^5.2.0","rlc-faucet-contract":"^2.0.0","openzeppelin-solidity":"^2.2.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"^1.0.7"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.34_1557133354795_0.8277462835854623","host":"s3://npm-registry-packages"}},"3.0.35":{"name":"iexec-poco","version":"3.0.35","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@3.0.35","maintainers":[{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"dcd4c5b5722cbef21214b0370ac219a9a8c654a5","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-3.0.35.tgz","fileCount":82,"integrity":"sha512-caYMItGul3OW7bSlitR+HzJufnDtHyy8etIWKfXFMVz9Q/N7CFahLB3rJxMZVrv+V1gsRD4uS1HOCQCfo5hS1Q==","signatures":[{"sig":"MEUCIEEBix1JWhTDb/XF1b+uwiwTBFUDuvem21HqzHwwMOnlAiEAk8XiKXzVlD7G2CbhF3ZkKoAAKR8R+c6L1RsYAaPBTiw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":616433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0/1bCRA9TVsSAnZWagAAJ+cP/0DoiONS92Bz51RuiBUs\nd4duQ6Iyj+0tWF8BtlN7QrSh4rENwXv5v4NScs7O3HXKgNYC1nEVCYwVAicP\nfU7KfEMltPSJhTDSTUf7UrRG33O0Kvd89XEc2ApKWCyF2tbyKFQU+25C98T0\nAZqJpb4Fl3j/L/CtyXf2L55O3jOjkv0tia+K8vZ9PrAAcWHh5DdmYFC9xuMU\nBV577/sp/LKCIJAbp7x2qtOC12K3yR9ctwdviu9qgVgziqeHFAZE8AdhFPpI\nMcwM5hBKa6BO8h7H0KbrMamqjrtQ3mXYQsg4GkXkQGCwrs6w2Ry4XWRDZstl\nFhZu8rQf+8Z4rjY1cls7SwqSwSDqKRUemIGj4Hiqaa7XbGvXNqEnsQWS70VC\nZLO1fM1k2b/WR94Z29DbKG5v+jTV2yz3RxsYh3A1zsqUAoz1sTp67J5Api3l\nExSjIMyCSXGRPT7wKyl/wwQcRD6JfLN82cvuYFMeeEsS+0BStkR4dyNepocO\nOSylg39qEFh+DgoFubmWJoRrYshOtORG6b8l4sv7MfmBCQLRkDLS5OX96PUF\niOaUv/4ivTMTgdiKtUzP76mvvEVn9TRBwm9eiNpHjfVtvrn8mizIMGXJrtzc\nTML3sSgr7CnbzTuS0GkUgJKxMtsOsT36nGSyz234B9zL4kJKqowndxcgfGiY\nMjOS\r\n=NhaY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"dc6ef27883744930d5b1c145ca7240f4ece1f217","scripts":{"test":"truffle test","pretest":"testrpc > /dev/null &","coverage":"solidity-coverage","posttest":"kill $(ps aux | grep testrpc |grep node|awk '{print $2}')"},"_npmUser":{"name":"iexecteam","email":"dev@iex.ec"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.9.0","description":"[![Build Status](https://drone.iex.ec//api/badges/iExecBlockchainComputing/PoCo/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo)","directories":{},"_nodeVersion":"11.12.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","bn.js":"4.11.8","husky":"^1.3.1","jq.node":"2.1.2","truffle":"^5.0.15","multiaddr":"^6.0.6","ganache-cli":"^6.4.3","iexec-solidity":"^0.0.6","ethereumjs-util":"^5.2.0","rlc-faucet-contract":"^2.0.0","openzeppelin-solidity":"^2.2.0","openzeppelin-test-helpers":"^0.1.5","truffle-hdwallet-provider":"^1.0.7"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_3.0.35_1557396827219_0.68250639524713","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"iexec-poco","version":"5.0.0","author":{"name":"iExec"},"license":"ISC","_id":"iexec-poco@5.0.0","maintainers":[{"name":"amxx","email":"hadrien.croubois@gmail.com"},{"name":"iexecteam","email":"dev@iex.ec"},{"name":"sulliwane","email":"sulliwane@gmail.com"}],"homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"dist":{"shasum":"5c17b20a7d6d3b617150934e28cb007aedcf187b","tarball":"https://registry.npmjs.org/iexec-poco/-/iexec-poco-5.0.0.tgz","fileCount":250,"integrity":"sha512-L5hLMD/bwnUZtAuc9inMjy7ymLFlhcenw6313XgbrQ7HN/kXiAqTyq0bK4ndIJMrRJSvSVPCs8akxrOWvL/ceA==","signatures":[{"sig":"MEUCIQC8w8OyWWLEGOfJoQtOi2C+W7h0zXzs1KZ/DlRwL89//AIgGAGt8FY9DdEf1kba/V/ypbXh4hH6vOAxIJiitcVW7Vw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22967222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen/qTCRA9TVsSAnZWagAAvgAP/1IkcuTS3h7RI6XnN9ru\nY0aw9EWbyqzLlTjNTZVaAjtpjaarpOAMGNYrOT/PUpp8SFNFaXOxqrsTy4Zd\n3Dq7G85iONvCMdwYWXTmb6mNG05uKiPm2BAHw6vEYxvBHNpdEa0Lzs/0i20d\nQlZvHPAHRzhTw4Gk8JdvANAtxfzp6ru48FlkK1uMvYa1zrXBhYIOUt10jZNh\nw89/B0IK5G1tg80rDVKwrllG3xU1KI9lPwkb/5qRaW/8DDyTSy2I3d1z1H8/\nGpMimGfyV2/qAaxTejB4Ca3aFD5kSZTKuhbULtl0gEwlpKprh+Jtl158wds1\n28lbMY3+nOGTXrFvAVEWT0j8gfx6CywL7hPmN6FfYuRzfQNc8PAEeOskeoA8\nasZgZ/UDqP/mfDs8yJurQxA6PaAHoQUHU4a0x0sQdkCG8qeaKRP/7MSWfJ3w\n8RO4rTRgseC9Z1NOqC7m2Kj/Xezp0+VpDG/UxQq6aX3BHcVXrbIggh4cA9bO\nQaW54lSbiCFmkwDrYjZxEN+3GhdXN/aGu7MV+1qfKDbRb6UGGtmVZJ672n+7\nneFkls4M5LsRRwrkw/oELvG9sUyUkwZSZshY5lD3/PCWQdXD0VY0F7tX8JHM\nlhsu6QfBch2GWfxgDA6Q/W8Ii9x8XWvSgxxSnaEaieOu9LAFtPE2l+5Wz9cT\nLj62\r\n=WYf1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"truffle.js","gitHead":"e9321bee1b88ef274bd95dc84e17e7cd6ae9e1f3","scripts":{"test":"truffle test","build":"truffle compile","verify":"truffle run verify","migrate":"truffle migrate","autotest":"./autotest.sh","coverage":"truffle run coverage"},"_npmUser":{"name":"amxx","email":"hadrien.croubois@gmail.com"},"deprecated":"Package no longer maintained. Please use @iexec/poco instead","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"_npmVersion":"6.14.4","description":"[![Build Status](https://drone.iex.ec/api/badges/iExecBlockchainComputing/PoCo-dev/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo-dev)","directories":{},"_nodeVersion":"10.16.3","dependencies":{"@ensdomains/ens":"0.4.4","@iexec/solidity":"0.1.0-beta.13","@iexec/interface":"3.0.35-8","rlc-faucet-contract":"1.0.9","@ensdomains/resolver":"0.2.4","@openzeppelin/contracts":"3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","husky":"4.2.5","ethers":"4.0.46","truffle":"5.1.22","ganache-cli":"6.9.1","eth-sig-util":"2.5.3","ethereumjs-util":"6.2.0","truffle-security":"1.7.1","solidity-coverage":"0.7.4","@openzeppelin/test-helpers":"0.5.5","@truffle/hdwallet-provider":"1.0.34"},"_npmOperationalInternal":{"tmp":"tmp/iexec-poco_5.0.0_1587542674360_0.05904240923391346","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-04-27T10:20:20.449Z","modified":"2025-06-16T11:13:17.087Z","1.0.11":"2018-04-27T10:20:20.698Z","1.0.12":"2018-04-30T15:53:43.869Z","1.0.13":"2018-05-09T13:26:52.050Z","1.0.14":"2018-05-22T08:01:57.805Z","1.0.15":"2018-05-22T10:20:04.972Z","1.0.16":"2018-05-22T10:23:09.320Z","1.0.17":"2018-05-22T10:24:18.845Z","1.0.18":"2018-05-22T10:35:09.103Z","1.1.0":"2018-05-22T10:53:01.614Z","1.1.13":"2018-05-23T14:29:15.383Z","1.1.14":"2018-06-06T12:27:16.638Z","1.1.15":"2018-06-06T12:46:55.223Z","1.1.16":"2018-07-16T12:28:09.638Z","1.1.17":"2018-07-16T15:14:22.330Z","3.0.1":"2018-11-16T14:36:13.388Z","3.0.2":"2018-11-19T09:50:45.572Z","3.0.4":"2018-11-19T16:30:28.151Z","3.0.6":"2018-11-23T11:05:57.994Z","3.0.7":"2018-11-23T13:54:55.793Z","3.0.10":"2018-12-06T13:01:46.463Z","3.0.11":"2018-12-06T13:24:53.592Z","3.0.12":"2018-12-06T13:53:22.979Z","3.0.15":"2018-12-19T15:38:31.291Z","3.0.16":"2018-12-21T12:49:39.305Z","3.0.17":"2019-01-03T13:59:46.833Z","3.0.18":"2019-01-21T10:24:07.394Z","3.0.19":"2019-01-23T14:47:35.848Z","3.0.20":"2019-01-23T18:48:24.284Z","3.0.21":"2019-01-28T12:11:29.606Z","3.0.22":"2019-02-19T13:31:41.729Z","3.0.23":"2019-02-28T14:22:18.929Z","3.0.25":"2019-03-11T14:49:22.610Z","3.0.26":"2019-03-12T12:58:43.286Z","3.0.28":"2019-04-17T10:46:14.691Z","3.0.29":"2019-04-17T14:43:23.843Z","3.0.30":"2019-04-19T19:14:19.519Z","3.0.31":"2019-05-02T08:35:35.298Z","3.0.32":"2019-05-02T16:26:50.148Z","3.0.33":"2019-05-03T14:04:05.038Z","3.0.34":"2019-05-06T09:02:34.991Z","3.0.35":"2019-05-09T10:13:47.375Z","5.0.0":"2020-04-22T08:04:34.817Z"},"bugs":{"url":"https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues"},"author":{"name":"iExec"},"license":"ISC","homepage":"https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme","repository":{"url":"git+https://github.com/iExecBlockchainComputing/PoCo-dev.git","type":"git"},"description":"[![Build Status](https://drone.iex.ec/api/badges/iExecBlockchainComputing/PoCo-dev/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo-dev)","maintainers":[{"email":"pierre.jeanjacquot@iex.ec","name":"iexecteam"},{"email":"infra@iex.ec","name":"iexec-infra"}],"readme":"\n[![Build Status](https://drone.iex.ec/api/badges/iExecBlockchainComputing/PoCo-dev/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo-dev)\n\n\n# Introduction\n\nThis repository contains the smart contract implementation of iExec's PoCo protocole.\n\n## Related articles on medium\n\n- [PoCo Series #1 — About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c)\n- [PoCo Series #2 — On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd)\n- [PoCo Series #3 — PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126)\n- [PoCo Series #4 — Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa)\n- [PoCo Series #5 — Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8)\n- [PoCo Series #6 — Smart Contract Upgradeability and Governance](https://medium.com/iex-ec/poco-series-6-smart-contract-upgradeability-and-governance-68d2cdecd120)\n- [PoCo Series #8 — Future-proofing iExec - Smart Contract Interoperability and Modularity](https://medium.com/iex-ec/poco-series-8-future-proofing-iexec-smart-contract-interoperability-and-modularity-37a3d3613f11)\n\n## PoCo UML\n\n- [Contracts and Actors Architecture](./uml/architecture-ODB.png)\n- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png)\n- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png)\n\n## Documentation\n\n- [Full PoCo documentaion](https://docs.iex.ec/key-concepts/proof-of-contribution)\n\n# How to?\n\n## Configure a deployment\n\nStarting from version 5, the PoCo uses a modular design based on [ERC1538](https://github.com/ethereum/EIPs/issues/1538). The migration scripts and tests will use different modules and deployment process depending on the required configuration. In particular, the configuration can use a [create2 factory](https://github.com/iExecBlockchainComputing/iexec-solidity/blob/master/contracts/Factory/GenericFactory.sol) for the deployment, and enable native token or ERC20 token based escrow depending on the targeted blockchain. This means that the codebase is the same on public blockchains (ERC20 based RLC) and dedicated sidechains (Native token based RLC).\n\nThe configuration file is located in `./config/config.json`.\n\nIt contains:\n- A list of categories created during the deployment process. Additional categories can be created by the contract administrator using the `createCategory` function.\n- For each chainid, a quick configuration:\n\t- **\"asset\":** can be \"Token\" or \"Native\", select which escrow to use.\n\t- **\"token\":** the address of the token to use. If asset is set to token, and no token address is provided, a mock will be deployed on the fly.\n\t- **\"v3\":** a list of ressources from a previous (v3) deployment. This allows previous ressources to be automatically available. It also enables score transfer from v3 to v5. [optional]\n\t- **\"v5\":** deployment parameters for the new version. If usefactory is set to true, and no salt is provided, a random salt will be used.\n\nIf you want to deploy the iExec PoCo V5 smart contracts on a new blockchain, the recommanded process is to:\n\n0. Edit the `./config/config.json` file as follows:\n1. Create a new entry under \"chains\" with your chainid;\n2. Set the asset type depending on your blockchain;\n3. If you are using `\"asset\": \"Token\"`, provide the address of the token you want to use;\n4. Unless you know what you are doing, leave all `\"v3\"` ressources to `Null`;\n5. Use the factory with the same salt as the other blockchains, and use the same wallet as previous deployments to have the same deployment address on this new blockchain.\n\n\n## Build\n\nThe PoCo smart contracts are in the `./contracts` folder. Json artefacts, containing the contracts bytecode and ABI can be found in the `./build` folder. In case you need to regenerate them, you can use the following command:\n```\nnpm install\nnpm run build\n```\n\n## Test\n\n### Automatic testing\n\nThe PoCo smart contracts come with a test suite in the `./test` folder. You can startup a sandbox blockchain and run the tests using the following command:\n\n```\nnpm install\nnpm run autotest fast\n```\n\nAdditionnaly, you can produce a coverage report using the following command:\n```\nnpm run coverage\n```\n\nThe automatic testing command uses a `ganache-cli` blockchain instance to run the tests. You can also use your own blockchain endpoint to run these tests.\n\n### Testing on a custom blockchain\n\n1. Start your blockchain. You can either use ganache with the following command:\n```\nganache-cli <any additional arguments>\n```\nor run any other blockchain client.\n2. **[Optional]** If your blockchain listen to a port that is not 8545, or if the blockchain is on a different node, update the `./truffle.js` configuration accordingly (see the documentation [here](https://www.trufflesuite.com/docs/truffle/reference/configuration)).\n3. Run the tests using:\n```\nnpm run test\n```\nor\n```\ntruffle test\n```\n\n## Deploy\n\nYou can deploy the smart contracts according to the [3_deploy_contracts.js](./migrations/3_deploy_contracts.js) content. This will automatically save the addresses of the deployed artefacts to the `./build` folder.\n\nTo do so:\n\n1. Make sure you followed the \"Configure a deployment\" section;\n2. Enter your targeted blockchain parameters in `truffle.js` configuration file;\n3. Run the deployment using:\n```\nnpm run migrate -- --network <your network name>\n```\n","readmeFilename":"README.md"}