-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
318 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
mobilecoind/clients/python/blockchain_explorer/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
grpcio-tools==1.24.1 | ||
qrcode==6.1 | ||
halo==0.0.29 | ||
flask==1.1.2 |
36 changes: 36 additions & 0 deletions
36
mobilecoind/clients/python/blockchain_explorer/start_webserver.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
|
||
# setup mob_client | ||
cd ../mob_client | ||
pip3 install -r requirements.txt | ||
./compile_proto.sh | ||
|
||
cd ../blockchain_explorer | ||
|
||
# install mobilecoind | ||
if [ ! -d "./mobilecoin-testnet-linux" ] | ||
then | ||
echo "Installing mobilecoind binary." | ||
curl -L https://github.com/mobilecoinofficial/mobilecoin/releases/latest/download/mobilecoin-testnet-linux.tar.gz --output latest.tar.gz | ||
tar -zxvf ./latest.tar.gz | ||
rm ./latest.tar.gz | ||
fi | ||
|
||
# kill old mobilecoind processes | ||
ps -ef | grep mobilecoind | grep -v grep | awk '{print $2}' | xargs kill | ||
|
||
# run mobilecoind | ||
./mobilecoin-testnet-linux/bin/mobilecoind \ | ||
--ledger-db /tmp/ledger-db \ | ||
--poll-interval 10 \ | ||
--peer mc://node1.test.mobilecoin.com/ \ | ||
--peer mc://node2.test.mobilecoin.com/ \ | ||
--tx-source-url https://s3-us-west-1.amazonaws.com/mobilecoin.chain/node1.test.mobilecoin.com/ \ | ||
--tx-source-url https://s3-us-west-1.amazonaws.com/mobilecoin.chain/node2.test.mobilecoin.com/ \ | ||
--mobilecoind-db /tmp/transaction-db \ | ||
--service-port 4444 \ | ||
--watcher-db /tmp/watcher-db & | ||
|
||
# run the blockchain explorer flask site | ||
pip3 install -r requirements.txt | ||
python3 ./blockchain_explorer.py |
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
grpcio-tools==1.24.1 | ||
qrcode==6.1 | ||
halo==0.0.29 | ||
flask==1.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,6 @@ | ||
### PizzaMOB Leaderboard | ||
|
||
To run: | ||
Run the included script (with your master key passed in as an argument) to launch the server at http://localhost:5000 | ||
|
||
1. Start mobilecoind | ||
`start_webserver.sh ENTROPY` | ||
|
||
```sh | ||
RUST_BACKTRACE=full RUST_LOG=trace,mc_watcher=error,mc_ledger_sync=error,mc_connection=error,hyper=error,reqwest=error,mio=error,rustls=error,want=error \ | ||
SGX_MODE=HW IAS_MODE=PROD CONSENSUS_ENCLAVE_CSS=$(pwd)/consensus-enclave.css \ | ||
cargo run --release -p mc-mobilecoind -- \ | ||
--peer mc://node1.test.mobilecoin.com:443/ \ | ||
--peer mc://node2.test.mobilecoin.com:443/ \ | ||
--tx-source-url https://s3-us-west-1.amazonaws.com/mobilecoin.chain/node1.test.mobilecoin.com/ \ | ||
--tx-source-url https://s3-us-west-1.amazonaws.com/mobilecoin.chain/node2.test.mobilecoin.com/ \ | ||
--poll-interval 10 \ | ||
--mobilecoind-db /tmp/testnet-transaction-db \ | ||
--ledger-db /tmp/testnet-ledger-db \ | ||
--service-port 4444 | ||
``` | ||
|
||
1. Start the leaderboard, default host:port on `localhost:5000` | ||
|
||
```sh | ||
pip3 install -r requirements.txt | ||
./compile_proto.sh | ||
python3 pizzamob_leaderboard.py --entropy 1234567812345678123456781234567812345678123456781234567812345678 | ||
``` |
15 changes: 0 additions & 15 deletions
15
mobilecoind/clients/python/pizzamob_leaderboard/compile_proto.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
mobilecoind/clients/python/pizzamob_leaderboard/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
grpcio-tools==1.24.1 | ||
qrcode==6.1 | ||
halo==0.0.29 | ||
flask==1.1.2 | ||
tinydb==4.1.1 |
36 changes: 36 additions & 0 deletions
36
mobilecoind/clients/python/pizzamob_leaderboard/start_webserver.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
|
||
# setup mob_client | ||
cd ../mob_client | ||
pip3 install -r requirements.txt | ||
./compile_proto.sh | ||
|
||
cd ../pizzamob_leaderboard | ||
|
||
# install mobilecoind | ||
if [ ! -d "./mobilecoin-testnet-linux" ] | ||
then | ||
echo "Installing mobilecoind binary." | ||
curl -L https://github.com/mobilecoinofficial/mobilecoin/releases/latest/download/mobilecoin-testnet-linux.tar.gz --output latest.tar.gz | ||
tar -zxvf ./latest.tar.gz | ||
rm ./latest.tar.gz | ||
fi | ||
|
||
# kill old mobilecoind processes | ||
ps -ef | grep mobilecoind | grep -v grep | awk '{print $2}' | xargs kill | ||
|
||
# run mobilecoind | ||
./mobilecoin-testnet-linux/bin/mobilecoind \ | ||
--ledger-db /tmp/ledger-db \ | ||
--poll-interval 10 \ | ||
--peer mc://node1.test.mobilecoin.com/ \ | ||
--peer mc://node2.test.mobilecoin.com/ \ | ||
--tx-source-url https://s3-us-west-1.amazonaws.com/mobilecoin.chain/node1.test.mobilecoin.com/ \ | ||
--tx-source-url https://s3-us-west-1.amazonaws.com/mobilecoin.chain/node2.test.mobilecoin.com/ \ | ||
--mobilecoind-db /tmp/transaction-db \ | ||
--service-port 4444 \ | ||
--watcher-db /tmp/watcher-db & | ||
|
||
# run the pizzamob_leaderboard flask site | ||
pip3 install -r requirements.txt | ||
python3 ./pizzamob_leaderboard.py --entropy $1 |
51 changes: 51 additions & 0 deletions
51
mobilecoind/clients/python/pizzamob_leaderboard/static/css/lofi.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
body { | ||
font-family: monospace; | ||
background-color: #222; | ||
color: #00FF00; | ||
font-size: 1.1vw; | ||
} | ||
|
||
a { | ||
color: #00FF00; | ||
text-decoration: none; | ||
margin: 0px; | ||
padding: 0px; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
height: 100%; | ||
background-color: #222; | ||
justify-content: center; | ||
} | ||
|
||
.center { | ||
width:80ch; | ||
border: solid #eee 1px; | ||
padding: 40px; | ||
overflow-x: hidden; | ||
background-color: #000; | ||
} | ||
|
||
.row { | ||
height:1.8vw; | ||
display:table; | ||
white-space: pre; | ||
} | ||
|
||
|
||
input, input:focus { | ||
border: none; | ||
background-color: black; | ||
color:#00FF00; | ||
font-family:monospace; | ||
font-size:1.0vw; | ||
width:70ch; | ||
outline:none; | ||
} | ||
|
||
.hidden { | ||
position: absolute; | ||
top: -5000px; | ||
left: -5000px; | ||
} |
Binary file not shown.
Oops, something went wrong.