Skip to content

Commit f98ff43

Browse files
committed
feat(bigdipper): add Big Dipper config
1 parent f5b0e14 commit f98ff43

File tree

7 files changed

+169
-0
lines changed

7 files changed

+169
-0
lines changed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
TODO: Write better instructions
2+
3+
```sh
4+
git clone https://github.com/agoric-labs/big_dipper
5+
cd big_dipper
6+
./build.sh
7+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[Unit]
2+
Description=Big Dipper Agoric Explorer
3+
Requires=network-online.target
4+
After=network-online.target
5+
6+
[Service]
7+
Environment=BIND_IP=127.0.0.1
8+
Environment=PORT=5000
9+
Environment=ROOT_URL=https://explorer-testnet.agoric.com/
10+
WorkingDirectory=/home/bigdipper
11+
Restart=on-failure
12+
User=bigdipper
13+
Group=bigdipper
14+
PermissionsStartOnly=true
15+
ExecStart=/home/bigdipper/ag-bigdipper.sh
16+
ExecReload=/bin/kill -HUP $MAINPID
17+
KillSignal=SIGTERM
18+
19+
[Install]
20+
WantedBy=multi-user.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /bin/bash
2+
# bigdipper.sh - Run Agoric Big Dipper Explorer
3+
set -e
4+
ncf=`curl -Ss https://testnet.agoric.com/network-config`
5+
l=`echo "$ncf" | jq '.rpcAddrs | length'`
6+
eval rp=`echo "$ncf" | jq ".rpcAddrs[$(( RANDOM % l ))]"`
7+
eval cn=`echo "$ncf" | jq '.chainName'`
8+
9+
case $cn in
10+
testnet-1.16.8) db=meteor ;;
11+
*) db=`echo "$cn" | sed -e 's/\./-/g'` ;;
12+
esac
13+
14+
export MONGO_URL=mongodb://localhost:27017/"$db"
15+
16+
test -d "portal-$cn" && ln -sfT "portal-$cn" portal
17+
cd portal
18+
export METEOR_SETTINGS=`sed -e "s/@CHAIN_NAME@/$cn/; s/@RPC@/$rp/" settings.json`
19+
exec /usr/bin/node main.js
20+
exit $?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[Unit]
2+
Description=Agoric Light Client Daemon
3+
Requires=network-online.target
4+
After=network-online.target
5+
6+
[Service]
7+
WorkingDirectory=/home/bigdipper
8+
Restart=on-failure
9+
User=bigdipper
10+
Group=bigdipper
11+
PermissionsStartOnly=true
12+
ExecStart=/home/bigdipper/ag-lcd.sh
13+
ExecReload=/bin/kill -HUP $MAINPID
14+
KillSignal=SIGTERM
15+
16+
[Install]
17+
WantedBy=multi-user.target
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /bin/bash
2+
# ag-lcd.sh - run an Agoric Light Client Daemon
3+
set -e
4+
PATH=$PATH:/usr/local/bin
5+
ncf=`curl -Ss https://testnet.agoric.com/network-config`
6+
l=`echo "$ncf" | jq '.rpcAddrs | length'`
7+
eval rp=`echo "$ncf" | jq ".rpcAddrs[$(( RANDOM % l ))]"`
8+
eval cn=`echo "$ncf" | jq '.chainName'`
9+
exec ag-cosmos-helper rest-server --node="tcp://$rp" --chain-id="$cn"
10+
exit $?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# this section is needed to proxy web-socket connections
2+
map $http_upgrade $connection_upgrade {
3+
default upgrade;
4+
'' close;
5+
}
6+
# HTTP
7+
server {
8+
listen 80;
9+
return 301 https://$host$request_uri;
10+
}
11+
server {
12+
# listen 80 default_server;
13+
# listen [::]:80 default_server ipv6only=on;
14+
listen 443;
15+
server_name _; # explorer.testnet.agoric.com;
16+
17+
ssl on;
18+
ssl_certificate /etc/ssl/explorer.testnet.agoric.com.pem;
19+
ssl_certificate_key /etc/ssl/explorer.testnet.agoric.com.key;
20+
ssl_session_cache builtin:1000 shared:SSL:10m;
21+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
22+
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
23+
ssl_prefer_server_ciphers on;
24+
25+
26+
location = /favicon.ico {
27+
root /home/bigdipper/portal/programs/web.browser/app;
28+
access_log off;
29+
}
30+
31+
location ~* "^/[a-z0-9]{40}\.(css|js)$" {
32+
#gzip_static on;
33+
root /home/bigdipper/portal/programs/web.browser;
34+
access_log off;
35+
}
36+
37+
location ~ "^/packages" {
38+
root /home/bigdipper/portal/programs/web.browser;
39+
access_log off;
40+
}
41+
42+
# pass requests to Meteor
43+
location / {
44+
proxy_pass http://127.0.0.1:5000;
45+
proxy_http_version 1.1;
46+
proxy_ssl_server_name on;
47+
proxy_set_header Upgrade $http_upgrade; #for websockets
48+
proxy_set_header Connection $connection_upgrade;
49+
proxy_set_header X-Forwarded-For $remote_addr;
50+
proxy_set_header Host $host;
51+
}
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"public":{
3+
"chainName": "Agoric Testnet",
4+
"chainId": "@CHAIN_NAME@",
5+
"gtm": "{Add your Google Tag Manager ID here}",
6+
"slashingWindow": 10000,
7+
"uptimeWindow": 250,
8+
"initialPageSize": 30,
9+
"bech32PrefixAccAddr": "cosmos",
10+
"bech32PrefixAccPub": "cosmospub",
11+
"bech32PrefixValAddr": "cosmosvaloper",
12+
"bech32PrefixValPub": "cosmosvaloperpub",
13+
"bech32PrefixConsAddr": "cosmosvalcons",
14+
"bech32PrefixConsPub": "cosmosvalconspub",
15+
"stakingDenom": "stake",
16+
"stakingDenomPlural": "stakes",
17+
"mintingDenom": null,
18+
"stakingFraction": 1000000,
19+
"powerReduction": 0,
20+
"gasPrice": 0.00,
21+
"coingeckoId": null
22+
},
23+
"genesisFile": "https://testnet.agoric.com/genesis.json",
24+
"remote":{
25+
"rpc":"http://@RPC@",
26+
"lcd":"http://127.0.0.1:1317"
27+
},
28+
"debug": {
29+
"startTimer": true,
30+
"readGenesis": true
31+
},
32+
"params":{
33+
"startHeight": 0,
34+
"defaultBlockTime": 5000,
35+
"blockInterval": 15000,
36+
"consensusInterval": 1000,
37+
"statusInterval":7500,
38+
"signingInfoInterval": 1800000,
39+
"proposalInterval": -1,
40+
"missedBlocksInterval": 60000,
41+
"delegationInterval": 900000
42+
}
43+
}

0 commit comments

Comments
 (0)