Guest User

Untitled

a guest
Jul 5th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. def filechain():
  2. blockchainGrowthPerYear = 110 * 1024 * 1024 * 1024 # bytes
  3. blockTime = 600 # seconds
  4. hashSize = 224 / 8 # bytes
  5.  
  6. blocksPerYear = 365 * 24 * 60 * 60 / blockTime
  7. blockSize = blockchainGrowthPerYear / blocksPerYear
  8.  
  9. dataSize = blockSize / 2 # size of file chunk (blockSize / 2 maximizes motivated storage capacity)
  10.  
  11. movieSize = 8 * 1024 * 1024 * 1024 # assume the typical file is a 8GB movie
  12. nHashes = movieSize / dataSize
  13.  
  14. hashPercentage = 0.5 # assume half of blockspace is occupied by money transfer transactions
  15. nMoviesPerBlock = hashPercentage * (blockSize - dataSize) / (hashSize * nHashes + 72 + 4 + 256) # signature, miner fee, additional info
  16. yearlyCapacity = nMoviesPerBlock * movieSize * blocksPerYear
  17. traffic = yearlyCapacity / blocksPerYear / blockTime / 1024 / 1024
  18.  
  19. numPoolMachines = 10000 # community pool size
  20.  
  21. totalTokenCost = 40000000 # assume that all datachain tokens are valued at 40 mio USD by the market
  22. rewardPercentage = 0.00000078125 / 2 # blockReward/totalTokenCost, the value is assumed to be roughly equal to bitcoin
  23. terabyteCostPerYear = 5 # cost of storing 1TB of data per year, in USD
  24.  
  25. yearlyCapacityStorageCost = terabyteCostPerYear * yearlyCapacity / 1024 / 1024 / 1024 / 1024
  26. numMinedBlocksToBreakEven = yearlyCapacityStorageCost / (totalTokenCost * rewardPercentage)
  27.  
  28. print "yearly capacity storage cost (USD):", yearlyCapacityStorageCost
  29. print "hashpower percentage to breakeven on storage (%):", 100.0 * numMinedBlocksToBreakEven / blocksPerYear
  30. print "movies per block:", nMoviesPerBlock
  31. print "storage per pool machine (GB):", yearlyCapacity / numPoolMachines / 1024 / 1024 / 1024
  32. print "traffic per second (MB/s):", traffic
  33. print "capacity per block (GB)", yearlyCapacity / blocksPerYear / 1024 / 1024 / 1024
  34. print "block size (MB):", float(blockSize) / 1024 / 1024
  35. print "yearly capacity (PB):", yearlyCapacity / 1024 / 1024 / 1024 / 1024 / 1024
  36. print "movies stored per year:", yearlyCapacity / movieSize
  37.  
  38. filechain()
Advertisement
Add Comment
Please, Sign In to add comment