-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bigdipper): add Big Dipper config
- Loading branch information
1 parent
f5b0e14
commit f98ff43
Showing
7 changed files
with
169 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TODO: Write better instructions | ||
|
||
```sh | ||
git clone https://github.com/agoric-labs/big_dipper | ||
cd big_dipper | ||
./build.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,20 @@ | ||
[Unit] | ||
Description=Big Dipper Agoric Explorer | ||
Requires=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
Environment=BIND_IP=127.0.0.1 | ||
Environment=PORT=5000 | ||
Environment=ROOT_URL=https://explorer-testnet.agoric.com/ | ||
WorkingDirectory=/home/bigdipper | ||
Restart=on-failure | ||
User=bigdipper | ||
Group=bigdipper | ||
PermissionsStartOnly=true | ||
ExecStart=/home/bigdipper/ag-bigdipper.sh | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
KillSignal=SIGTERM | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,20 @@ | ||
#! /bin/bash | ||
# bigdipper.sh - Run Agoric Big Dipper Explorer | ||
set -e | ||
ncf=`curl -Ss https://testnet.agoric.com/network-config` | ||
l=`echo "$ncf" | jq '.rpcAddrs | length'` | ||
eval rp=`echo "$ncf" | jq ".rpcAddrs[$(( RANDOM % l ))]"` | ||
eval cn=`echo "$ncf" | jq '.chainName'` | ||
|
||
case $cn in | ||
testnet-1.16.8) db=meteor ;; | ||
*) db=`echo "$cn" | sed -e 's/\./-/g'` ;; | ||
esac | ||
|
||
export MONGO_URL=mongodb://localhost:27017/"$db" | ||
|
||
test -d "portal-$cn" && ln -sfT "portal-$cn" portal | ||
cd portal | ||
export METEOR_SETTINGS=`sed -e "s/@CHAIN_NAME@/$cn/; s/@RPC@/$rp/" settings.json` | ||
exec /usr/bin/node main.js | ||
exit $? |
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,17 @@ | ||
[Unit] | ||
Description=Agoric Light Client Daemon | ||
Requires=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
WorkingDirectory=/home/bigdipper | ||
Restart=on-failure | ||
User=bigdipper | ||
Group=bigdipper | ||
PermissionsStartOnly=true | ||
ExecStart=/home/bigdipper/ag-lcd.sh | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
KillSignal=SIGTERM | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,10 @@ | ||
#! /bin/bash | ||
# ag-lcd.sh - run an Agoric Light Client Daemon | ||
set -e | ||
PATH=$PATH:/usr/local/bin | ||
ncf=`curl -Ss https://testnet.agoric.com/network-config` | ||
l=`echo "$ncf" | jq '.rpcAddrs | length'` | ||
eval rp=`echo "$ncf" | jq ".rpcAddrs[$(( RANDOM % l ))]"` | ||
eval cn=`echo "$ncf" | jq '.chainName'` | ||
exec ag-cosmos-helper rest-server --node="tcp://$rp" --chain-id="$cn" | ||
exit $? |
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,52 @@ | ||
# this section is needed to proxy web-socket connections | ||
map $http_upgrade $connection_upgrade { | ||
default upgrade; | ||
'' close; | ||
} | ||
# HTTP | ||
server { | ||
listen 80; | ||
return 301 https://$host$request_uri; | ||
} | ||
server { | ||
# listen 80 default_server; | ||
# listen [::]:80 default_server ipv6only=on; | ||
listen 443; | ||
server_name _; # explorer.testnet.agoric.com; | ||
|
||
ssl on; | ||
ssl_certificate /etc/ssl/explorer.testnet.agoric.com.pem; | ||
ssl_certificate_key /etc/ssl/explorer.testnet.agoric.com.key; | ||
ssl_session_cache builtin:1000 shared:SSL:10m; | ||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; | ||
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; | ||
ssl_prefer_server_ciphers on; | ||
|
||
|
||
location = /favicon.ico { | ||
root /home/bigdipper/portal/programs/web.browser/app; | ||
access_log off; | ||
} | ||
|
||
location ~* "^/[a-z0-9]{40}\.(css|js)$" { | ||
#gzip_static on; | ||
root /home/bigdipper/portal/programs/web.browser; | ||
access_log off; | ||
} | ||
|
||
location ~ "^/packages" { | ||
root /home/bigdipper/portal/programs/web.browser; | ||
access_log off; | ||
} | ||
|
||
# pass requests to Meteor | ||
location / { | ||
proxy_pass http://127.0.0.1:5000; | ||
proxy_http_version 1.1; | ||
proxy_ssl_server_name on; | ||
proxy_set_header Upgrade $http_upgrade; #for websockets | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header X-Forwarded-For $remote_addr; | ||
proxy_set_header Host $host; | ||
} | ||
} |
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,43 @@ | ||
{ | ||
"public":{ | ||
"chainName": "Agoric Testnet", | ||
"chainId": "@CHAIN_NAME@", | ||
"gtm": "{Add your Google Tag Manager ID here}", | ||
"slashingWindow": 10000, | ||
"uptimeWindow": 250, | ||
"initialPageSize": 30, | ||
"bech32PrefixAccAddr": "cosmos", | ||
"bech32PrefixAccPub": "cosmospub", | ||
"bech32PrefixValAddr": "cosmosvaloper", | ||
"bech32PrefixValPub": "cosmosvaloperpub", | ||
"bech32PrefixConsAddr": "cosmosvalcons", | ||
"bech32PrefixConsPub": "cosmosvalconspub", | ||
"stakingDenom": "stake", | ||
"stakingDenomPlural": "stakes", | ||
"mintingDenom": null, | ||
"stakingFraction": 1000000, | ||
"powerReduction": 0, | ||
"gasPrice": 0.00, | ||
"coingeckoId": null | ||
}, | ||
"genesisFile": "https://testnet.agoric.com/genesis.json", | ||
"remote":{ | ||
"rpc":"http://@RPC@", | ||
"lcd":"http://127.0.0.1:1317" | ||
}, | ||
"debug": { | ||
"startTimer": true, | ||
"readGenesis": true | ||
}, | ||
"params":{ | ||
"startHeight": 0, | ||
"defaultBlockTime": 5000, | ||
"blockInterval": 15000, | ||
"consensusInterval": 1000, | ||
"statusInterval":7500, | ||
"signingInfoInterval": 1800000, | ||
"proposalInterval": -1, | ||
"missedBlocksInterval": 60000, | ||
"delegationInterval": 900000 | ||
} | ||
} |