Skip to content
/ OBFP Public

Smart contracts based on Solidity for OBFP

Notifications You must be signed in to change notification settings

colyn91/OBFP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

1. Environment

(1) Cloud storage testing tool

COSBench (https://github.com/intel-cloud/cosbench), which is required to run the file of obfp-config.xml

(2) Smart contract deployment tool

Remix: http://remix.ethereum.org

Compiler: 0.4.19+commit.c4cbbb05

Language: Solidity

EVM Version: compiler default Jvascript VM

Featured Plugins:

  1. Pipeline
  2. Debugger
  3. Deploy & Run Transactions
  4. Solidity Compilier
  5. Solidity Static Analysis
  6. Solidity Unit Testing

Gas limit: 10000000

===================================================================================================================

2. Steps

  1. Open: http://remix.ethereum.org
  2. File explorer: OBPay.sol and alt_bn128.sol
  3. Choose: Environment(Solidity), Compiler (0.4.19+commit.c4cbbb05), EVM Version (0.4.19+commit.c4cbbb05)
  4. Compile
  5. Deploy
  6. Invoke

===================================================================================================================

3. Related Test data and results

Address user: 0xca35b7d915458ef540ade6068dfe2f44e8fa733c (balance: 100 eth)

worker: 0x14723a09acff6d2a60dcdf7aa4aff308fddc160c (balance: 100 eth)

The duration time is: 10 minutes

When k = 60

Task:

f_des: "f(x) = H(R^H(b^x))" h_s: 0xa71d052937ac1198871ccaa56e0a219f57240aecd196671520caa1778eb98abf P_des: "E:/Test/OBPay/data.txt" R_val: 0xf99b9a52279057c71ac238f3e5c04d984cd1532ce064d4035d529c0d00f2a7ea b_val: 0x2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064d4035d529c0d00f T_val: ["0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064","0xd4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d984cd1532ce064"]

P2_val: ["0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f","0xd74aa56af3ebcd3de232531d395940fc88ac8d91d5e13c2d05a08b8d72958c3f"]

PW: ["0x8821c26f739214811870fa1b7c4700f2"]

hash: ["0x10b23d1e1e6881ff7fae736fbdb1eaf6de14e0b2ea3dbadfec36ba8aaa60cb43", "0x254b821f48622deb93cc6ab9af5084e3204e7591fe136a355abb944371220c94"]

Key: 0xdd870fa1b7c4700f2bd7f44238821c26

r: 0x984cd1532ce064d4035d529c0d00f2a7eaf99b9a52279057c71ac238f3e5c04d

Commitment: ["0x22b23d1e1e6881ff7fae736fbdb1eaf6de14e0b2ea3dbadfec36ba8aaa60cb43", "0x014b821f48622deb93cc6ab9af5084e3204e7591fe136a355abb944371220c94"]

Ciphertext: 0x55a6cdcec456648e33a70e5944c51cd4

pi_c ["0x6ba8a22b23d81ff7fae736fbdb1eaf6de14e0b2ea3dbadfec3aa60cb431e1e68", "0x371220c014b821f48622deb94494b93cc6ab9af5084e3204e7591fe136a355ab"]

scid: 0x0971b5d216af52c411c9016bbc63665b4e6f2542

Deploy transaction cost: 2733220 gas execution cost: 2007688 gas

submitTask transaction cost: 6145165 gas execution cost: 5856437 gas

getTask transaction cost: 75796 gas execution cost: 53116 gas

submitCM transaction cost: 1820193 gas execution cost: 1692601 gas

getCM transaction cost: 48804 gas execution cost: 26124 gas

payRequest transaction cost: 24731 gas execution cost: 2051 gas

submitProof transaction cost: 203836 gas execution cost: 177892 gas

getProof transaction cost: 25514 gas execution cost: 2834 gas

submitCP transaction cost: 425445 gas execution cost: 416613 gas

About

Smart contracts based on Solidity for OBFP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published