Skip to content

UoB COMSM0010 - Associated code for cloud nonce discovery system

Notifications You must be signed in to change notification settings

shawvey/Cloud-Nonce-Discovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

中文版项目介绍

Cloud Nonce Discovery System

Horizontal Scaling for an Embarrassingly Parallel Task: Blockchain Proof-of-Work in the Cloud

Deploy CND system

  1. Create a AWS account and paste your credentials from account details into the ~/.aws/credentials

    aws_access_key_id= Yourawsaccesskeyid
    aws_secret_access_key= Yourawssecretaccesskey
    aws_session_token= Yourawssessiontoken
  2. Create a new security group based on your current ip address and change the security group name of CND.py to your security group name:

     SecurityGroups= ['YourSecurityGroups']
    
  3. Create a S3 bucket to store log files

  4. Install Boto3 and Fabric

    pip install Boto3
    pip install Fabric
  5. Enter to the Fabric folder

  6. Run the following command:

    fab -f CND.py start:T=200,D=2,N=8 

Results

(base) vpn-user-246-228:fabric shawvey$ fab -f CND.py start:T=200,D=2,N=8
[3.83.191.153] Executing task 'RunInstances'
[100.24.5.46] Executing task 'RunInstances'
[18.207.211.76] Executing task 'RunInstances'
[52.201.233.152] Executing task 'RunInstances'
[34.203.218.191] Executing task 'RunInstances'
[100.26.104.84] Executing task 'RunInstances'
[3.84.45.62] Executing task 'RunInstances'
[52.91.85.180] Executing task 'RunInstances'
[100.26.104.84] put: PoW.py -> PoW.py
[52.91.85.180] put: PoW.py -> PoW.py
[52.201.233.152] put: PoW.py -> PoW.py
[18.207.211.76] put: PoW.py -> PoW.py
[100.24.5.46] put: PoW.py -> PoW.py
[3.84.45.62] put: PoW.py -> PoW.py
[34.203.218.191] put: PoW.py -> PoW.py
[100.26.104.84] run: python3 -c 'import PoW;PoW.goldennonce(2,5)'
[52.91.85.180] run: python3 -c 'import PoW;PoW.goldennonce(2,7)'
[3.83.191.153] put: PoW.py -> PoW.py
[52.201.233.152] run: python3 -c 'import PoW;PoW.goldennonce(2,3)'
[18.207.211.76] run: python3 -c 'import PoW;PoW.goldennonce(2,2)'
[100.24.5.46] run: python3 -c 'import PoW;PoW.goldennonce(2,1)'
[3.84.45.62] run: python3 -c 'import PoW;PoW.goldennonce(2,6)'
[34.203.218.191] run: python3 -c 'import PoW;PoW.goldennonce(2,4)'
[100.26.104.84] run: python3 -c 'import PoW;PoW.goldennonce(2,13)'
[52.91.85.180] run: python3 -c 'import PoW;PoW.goldennonce(2,15)'
[52.201.233.152] run: python3 -c 'import PoW;PoW.goldennonce(2,11)'
[3.83.191.153] run: python3 -c 'import PoW;PoW.goldennonce(2,0)'
[18.207.211.76] run: python3 -c 'import PoW;PoW.goldennonce(2,10)'
[100.24.5.46] run: python3 -c 'import PoW;PoW.goldennonce(2,9)'
[3.84.45.62] run: python3 -c 'import PoW;PoW.goldennonce(2,14)'
[34.203.218.191] run: python3 -c 'import PoW;PoW.goldennonce(2,12)'
[100.26.104.84] run: python3 -c 'import PoW;PoW.goldennonce(2,21)'
[52.91.85.180] run: python3 -c 'import PoW;PoW.goldennonce(2,23)'
[52.201.233.152] run: python3 -c 'import PoW;PoW.goldennonce(2,19)'
[18.207.211.76] run: python3 -c 'import PoW;PoW.goldennonce(2,18)'
[100.24.5.46] run: python3 -c 'import PoW;PoW.goldennonce(2,17)'
...............
[34.203.218.191] out: Lucky num is 116, its hash is 00a722b0e1eab12e68928824ce82e5bc7cec6740e6cd0d3ffbe63260badc53fa
[34.203.218.191] out: 

total runtime is 8.968298 seconds!
[34.203.218.191] download: /Users/shawvey/fabric/logs/Instance4.log <- /var/log/syslog

Warning: Local file /Users/shawvey/fabric/logs/Instance4.log already exists and is being overwritten.
...............
Done.

About

UoB COMSM0010 - Associated code for cloud nonce discovery system

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages