Paper: http://fc20.ifca.ai/wtsc/WTSC2020/WTSC20_paper_10.pdf
- Install Nodejs from https://nodejs.org/en/
- Open terminal
- Install Truffle Framework:
npm install -g truffle
- Install Ganache-cli:
npm install -g ganache-cli
- Clone this repository and change directory to its path
- Install the required packages
npm i
- Edit the file
node_modules\elliptic\lib\elliptic\curves.js
- Paste the following code at the end
defineCurve('bn256', { type: 'short', prime: null, p: '30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47', a: '0', b: '3', n: '30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001', hash: hash.sha256, gRed: false, g: [ '2bd3e6d0f3b142924f5ca7b49ce5b9d54c4703d7ae5648e61d02268b1a0a9fb7', '21611ce0a6af85915e2f1d70300909ce2e49dfad4a4619c8390cae66cefdb204' ] });
- Check the test code in the file
test\completeTest.js
- Run the local Ethereum node:
ganache-cli -a 42
where 42 is the number of available accounts - Run the command
truffle test
to view the result and the gas cost of each transaction