Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
645 commits
Select commit Hold shift + click to select a range
c3e50e5
Check #744
harish551 Jul 26, 2021
9cf68d3
Check #745
harish551 Jul 26, 2021
baad065
Check #746
harish551 Jul 26, 2021
7cef8a3
Check #747
harish551 Jul 26, 2021
3845a4d
Check #748
harish551 Jul 26, 2021
4e0fb5d
Check #749
harish551 Jul 26, 2021
59e6932
Check #750
harish551 Jul 26, 2021
77693d5
Check #751
harish551 Jul 26, 2021
23d5f65
Check #751
harish551 Jul 26, 2021
da31c27
Check #752
harish551 Jul 26, 2021
dd3059a
Check #753
harish551 Jul 26, 2021
bbee884
Check #754
harish551 Jul 26, 2021
0ecdf91
Check #756
harish551 Jul 26, 2021
3538981
Check #758
harish551 Jul 26, 2021
02b2226
Check #759
harish551 Jul 26, 2021
2439d83
Check #167
harish551 Jul 26, 2021
04b36ba
Check #757
harish551 Jul 26, 2021
d1ae6f4
Check #750
harish551 Jul 26, 2021
e037e9f
Check #157
harish551 Jul 26, 2021
442b9c9
Check #135
harish551 Jul 26, 2021
4278da6
Check #267
harish551 Jul 26, 2021
e126133
Check #495
harish551 Jul 26, 2021
204bf88
Check #131
harish551 Jul 26, 2021
de3c124
Updated README.md
svabhishek Jul 26, 2021
3ba5fe1
Check #146
harish551 Jul 27, 2021
3990798
Check #283
harish551 Jul 27, 2021
edcc890
Check #383
harish551 Jul 27, 2021
5fc4e1e
Check #760
harish551 Jul 27, 2021
bdea281
Check #761
harish551 Jul 27, 2021
49225cc
Check #762
harish551 Jul 27, 2021
8d96747
Check #763
harish551 Jul 27, 2021
3d2844d
Check #764
harish551 Jul 27, 2021
98daa7e
Check #765
harish551 Jul 27, 2021
a32226a
Check #766
harish551 Jul 27, 2021
ed70d81
Check #767
harish551 Jul 27, 2021
447318e
Check #768
harish551 Jul 27, 2021
a12acbe
Check #770
harish551 Jul 27, 2021
7bd89b9
Check #771
harish551 Jul 27, 2021
578dcbc
Check #772
harish551 Jul 27, 2021
9e7e12c
Check #774
harish551 Jul 27, 2021
8e70351
Check #775
harish551 Jul 27, 2021
8b9025b
Check #776
harish551 Jul 27, 2021
7fb5070
Check #777
harish551 Jul 27, 2021
9a8fe79
Check #778
harish551 Jul 27, 2021
78de189
Check #779
harish551 Jul 27, 2021
60d6229
Check #781
harish551 Jul 27, 2021
1401585
Check #782
harish551 Jul 27, 2021
067b8ab
Check #783
harish551 Jul 27, 2021
dbd2b72
Check #784
harish551 Jul 27, 2021
d101f32
Check #785
harish551 Jul 27, 2021
c94e870
Check #786
harish551 Jul 27, 2021
bd67939
Check #787
harish551 Jul 27, 2021
d7c97da
Check #788
harish551 Jul 27, 2021
1717ace
Check #789
harish551 Jul 27, 2021
eaaf953
Check #790
harish551 Jul 27, 2021
1bc61ae
Check #791
harish551 Jul 27, 2021
20d44e2
Check #792
harish551 Jul 27, 2021
5a6ead5
Check #793
harish551 Jul 27, 2021
0c09e3e
Check #794
harish551 Jul 27, 2021
0871e30
Check #795
harish551 Jul 27, 2021
93cdbb9
Check #796
harish551 Jul 27, 2021
4c53b8e
Check #797
harish551 Jul 27, 2021
f6b1a43
Check #798
harish551 Jul 27, 2021
6523d0b
Check #799
harish551 Jul 27, 2021
ce5a743
Check #800
harish551 Jul 27, 2021
a6407a5
Check #900
harish551 Jul 27, 2021
bf83a49
Check #901
harish551 Jul 27, 2021
065975d
Check #902
harish551 Jul 27, 2021
270010e
Check #903
harish551 Jul 27, 2021
67ddae2
Check #904
harish551 Jul 27, 2021
2396a66
Check #905
harish551 Jul 27, 2021
8c11322
Check #906
harish551 Jul 27, 2021
6f19544
Check #907
harish551 Jul 27, 2021
2ffb3df
Check #908
harish551 Jul 27, 2021
0b4397b
Check #909
harish551 Jul 27, 2021
6642b59
Check #910
harish551 Jul 27, 2021
c10804a
Check #911
harish551 Jul 27, 2021
dfdf8c0
Check #912
harish551 Jul 27, 2021
468753f
Check #913
harish551 Jul 27, 2021
c9e372e
Check #914
harish551 Jul 27, 2021
bf2e30e
Check #915
harish551 Jul 27, 2021
2900efb
Check #916
harish551 Jul 27, 2021
8a9e41b
Check #918
harish551 Jul 27, 2021
e468922
Check #919
harish551 Jul 27, 2021
0976c1d
Check #920
harish551 Jul 27, 2021
5a644b1
Check #921
harish551 Jul 27, 2021
e8e5a7a
Check #922
harish551 Jul 27, 2021
4fab789
Check #923
harish551 Jul 27, 2021
73c8ccf
Check #924
harish551 Jul 27, 2021
4b5a702
Check #925
harish551 Jul 27, 2021
4acf392
Check #926
harish551 Jul 27, 2021
b1c666f
Check #927
harish551 Jul 27, 2021
a49f42f
Check #928
harish551 Jul 27, 2021
a2bbcd1
Check #929
harish551 Jul 27, 2021
ffe9545
Check #930
harish551 Jul 27, 2021
15570ea
Check #931
harish551 Jul 27, 2021
e4a4ee3
Check #932
harish551 Jul 27, 2021
578bb96
Check #933
harish551 Jul 27, 2021
6486158
Check #934
harish551 Jul 27, 2021
8bdc5f5
Check #935
harish551 Jul 27, 2021
b9e0816
Check #936
harish551 Jul 27, 2021
330fd7f
Check #937
harish551 Jul 27, 2021
f3c3160
Check #938
harish551 Jul 27, 2021
ca0f80f
Check #939
harish551 Jul 27, 2021
3c1ba3e
Check #940
harish551 Jul 27, 2021
31ea4ee
Check #941
harish551 Jul 27, 2021
9bbb475
Check #942
harish551 Jul 27, 2021
1a1f6f7
Check #943
harish551 Jul 27, 2021
8c67dd0
Check #944
harish551 Jul 27, 2021
c283f19
Check #945
harish551 Jul 27, 2021
6e9ffde
Check #946
harish551 Jul 27, 2021
7ced437
Check #947
harish551 Jul 27, 2021
4a3cc88
Check #948
harish551 Jul 27, 2021
b27ee11
Check #949
harish551 Jul 27, 2021
03af50f
Check #950
harish551 Jul 27, 2021
cb8d29c
Check #951
harish551 Jul 27, 2021
a546145
Check #952
harish551 Jul 27, 2021
fa94ae5
Check #954
harish551 Jul 27, 2021
318ae42
Check #955
harish551 Jul 27, 2021
4f5f776
Check #956
harish551 Jul 27, 2021
5f8792d
Check #957
harish551 Jul 27, 2021
a3bd92a
Merge branch 'OmniFlix:main' into test
harish551 Jul 27, 2021
a149ab7
Merge branch 'main' into test
harish551 Jul 27, 2021
ab153ec
Check #760
harish551 Jul 27, 2021
27abf0d
Merge branch 'test' of github.com:harish551/testnets into test
harish551 Jul 27, 2021
bf26b94
Check #760
harish551 Jul 27, 2021
daf234c
Check #760
harish551 Jul 27, 2021
b000354
Check #761
harish551 Jul 27, 2021
3e205ea
Check #762
harish551 Jul 27, 2021
4e96177
Check #763
harish551 Jul 27, 2021
3c523a5
Check #764
harish551 Jul 27, 2021
f97dd7c
Check #765
harish551 Jul 27, 2021
cec2b09
Check #766
harish551 Jul 27, 2021
56866fa
Check #767
harish551 Jul 27, 2021
e0122a9
Check #768
harish551 Jul 27, 2021
878e598
Check #770
harish551 Jul 27, 2021
195936a
Check #771
harish551 Jul 27, 2021
609651b
Check #772
harish551 Jul 27, 2021
78aa11d
Check #774
harish551 Jul 27, 2021
c2b690e
Check #775
harish551 Jul 27, 2021
47eb4eb
Check #776
harish551 Jul 27, 2021
77abfff
Check #777
harish551 Jul 27, 2021
b7a3ab4
Check #778
harish551 Jul 27, 2021
cab7e61
Check #779
harish551 Jul 27, 2021
0fda858
Check #781
harish551 Jul 27, 2021
8c2f677
Check #782
harish551 Jul 27, 2021
3d202c5
Check #783
harish551 Jul 27, 2021
6d4c14a
Check #784
harish551 Jul 27, 2021
18e6d9c
Check #785
harish551 Jul 27, 2021
1051326
Check #786
harish551 Jul 27, 2021
86e847d
Check #787
harish551 Jul 27, 2021
a8a767b
Check #788
harish551 Jul 27, 2021
80ab4b3
Check #789
harish551 Jul 27, 2021
5475f1e
Check #790
harish551 Jul 27, 2021
7a48303
Check #791
harish551 Jul 27, 2021
dfad3b5
Check #792
harish551 Jul 27, 2021
ce1aaba
Check #793
harish551 Jul 27, 2021
09ed328
Check #794
harish551 Jul 27, 2021
71e259c
Check #795
harish551 Jul 27, 2021
a97ef74
Check #796
harish551 Jul 27, 2021
3fee4bd
Check #797
harish551 Jul 27, 2021
3395306
Check #798
harish551 Jul 27, 2021
e91d5ee
Check #799
harish551 Jul 27, 2021
aa27ecb
Check #800
harish551 Jul 27, 2021
7d91fe2
Check #901
harish551 Jul 27, 2021
5b2f8ef
Check #902
harish551 Jul 27, 2021
52a1631
Check #903
harish551 Jul 27, 2021
c2df5dc
Check #904
harish551 Jul 27, 2021
b3473d5
Check #905
harish551 Jul 27, 2021
f782cbf
Check #906
harish551 Jul 27, 2021
8eb513c
Check #907
harish551 Jul 27, 2021
efa87a7
Check #908
harish551 Jul 27, 2021
ec84080
Check #909
harish551 Jul 27, 2021
67ce99b
Check #910
harish551 Jul 27, 2021
a62083f
Check #911
harish551 Jul 27, 2021
929eed9
Check #912
harish551 Jul 27, 2021
b529c64
Check #913
harish551 Jul 27, 2021
ff875ba
Check #914
harish551 Jul 27, 2021
0ae4ca0
Check #915
harish551 Jul 27, 2021
47cb021
Check #916
harish551 Jul 27, 2021
824f7f0
Check #918
harish551 Jul 27, 2021
79023c8
Check #919
harish551 Jul 27, 2021
6726028
Check #920
harish551 Jul 27, 2021
3b8a7ad
Check #921
harish551 Jul 27, 2021
4175952
Check #922
harish551 Jul 27, 2021
387854a
Check #924
harish551 Jul 27, 2021
04b345c
Check #925
harish551 Jul 27, 2021
fdb33c2
Check #926
harish551 Jul 27, 2021
1ef5771
Check #927
harish551 Jul 27, 2021
749e6d6
Check #928
harish551 Jul 27, 2021
4a33f83
Check #929
harish551 Jul 27, 2021
77ef04e
Check #930
harish551 Jul 27, 2021
137df7b
Check #931
harish551 Jul 27, 2021
3a8d8d9
Check #932
harish551 Jul 27, 2021
b353f13
Check #933
harish551 Jul 27, 2021
d923f54
Check #934
harish551 Jul 27, 2021
faf53a9
Check #935
harish551 Jul 27, 2021
768bc77
Check #936
harish551 Jul 27, 2021
2126285
Check #937
harish551 Jul 27, 2021
098ac7a
Check #938
harish551 Jul 27, 2021
ec2c9c3
Check #939
harish551 Jul 27, 2021
7be4669
Check #940
harish551 Jul 27, 2021
eccfb10
Check #941
harish551 Jul 27, 2021
bb6a270
Check #942
harish551 Jul 27, 2021
b42c6c2
Check #943
harish551 Jul 27, 2021
8100266
Check #944
harish551 Jul 27, 2021
1df66c7
Check #945
harish551 Jul 27, 2021
3aa92bf
Check #946
harish551 Jul 27, 2021
a8f98e6
Check #947
harish551 Jul 27, 2021
312d42f
Check #948
harish551 Jul 27, 2021
bdba45f
Check #949
harish551 Jul 27, 2021
406a7f7
Check #950
harish551 Jul 27, 2021
445faf1
Check #951
harish551 Jul 27, 2021
b179c89
Check #952
harish551 Jul 27, 2021
e4f4fdb
Check #954
harish551 Jul 27, 2021
e84bf46
Check #955
harish551 Jul 27, 2021
ad7f274
Check #956
harish551 Jul 27, 2021
d8b3cd5
Check #957
harish551 Jul 27, 2021
9a6b824
Check #958
harish551 Jul 27, 2021
200f91b
Check #959
harish551 Jul 27, 2021
3e03592
Check #960
harish551 Jul 27, 2021
6b6eed9
Check #961
harish551 Jul 27, 2021
46c8469
Check #962
harish551 Jul 27, 2021
975c771
Check #963
harish551 Jul 27, 2021
c504680
Check #964
harish551 Jul 27, 2021
c78ec2e
Check #965
harish551 Jul 27, 2021
359b3ae
Check #966
harish551 Jul 27, 2021
6cb6fd7
Check #967
harish551 Jul 27, 2021
9a4d9e6
Check #968
harish551 Jul 27, 2021
f04a7a5
Check #969
harish551 Jul 27, 2021
7002698
Check #970
harish551 Jul 27, 2021
1d265f2
Check #972
harish551 Jul 27, 2021
1c2b150
Check #972
harish551 Jul 27, 2021
7a61543
Check #971
harish551 Jul 27, 2021
8607858
Check #973
harish551 Jul 27, 2021
82cc273
Check #974
harish551 Jul 27, 2021
215a318
Check #975
harish551 Jul 27, 2021
0e13116
Check #976
harish551 Jul 27, 2021
53547a0
Check #769
harish551 Jul 27, 2021
3e4fc6d
Check #423
harish551 Jul 27, 2021
15102ba
check neew scripts
harish551 Sep 3, 2021
a02d2d3
check neew scripts
harish551 Sep 3, 2021
85f4595
check neew scripts
harish551 Sep 3, 2021
941a9ee
check neew scripts
harish551 Sep 3, 2021
eec52b1
check neew scripts
harish551 Sep 3, 2021
5422220
check neew scripts
harish551 Sep 3, 2021
2c06e3d
check neew scripts
harish551 Sep 3, 2021
89eeb51
check neew scripts
harish551 Sep 3, 2021
1d0fd90
check neew scripts
harish551 Sep 3, 2021
725ce5f
check neew scripts
harish551 Sep 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/verify-gentx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ jobs:
- name: validate-gentx
run: |
bash -x ./scripts/verify_gentx.sh
- name: check-is-previous-participant
run: |
python3 ./scripts/is_prev_participant.py


14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# OmniFlix Testnets
Resources for OmniFlix testnets.
All resources for participation in the testnets of the [OmniFlix Network](https://OmniFlix.network) will be published here.

# FlixNet-1
- If you are here to participate in the FlixNet-1 testnet, visit the [FlixNet-1 folder](https://github.com/OmniFlix/testnets/tree/main/flixnet-1) for more information.
- FlixNet-1 gentx submission end time -- 26th July, 6pm UTC
- FlixNet-1 genesis file release -- 27th July via the [blog](https://blog.OmniFlix.network)
- FlixNet-1 launch -- 28th July, 11am UTC

For more information please follow:
- [Blog](https://blog.OmniFlix.network)
- [Telegram Announcements Channel](https://t.me/OmniFlixNetwork)
- [Telegram Group Chat](https://t.me/OmniFlixChat) (request for the URL to a validator-only group if you haven't already received it)
- [Discord Server](https://discord.gg/y27vAh79uU)
2 changes: 2 additions & 0 deletions flixnet-1/gentxs/test-gentx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"omniflix_mord","identity":"","website":"","security_contact":"","details":"omniflix_mord from DOUBLETOP"},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"omniflix1urmpej6k8hckp5sadzdsxxtl95t9j6rp36mtre","validator_address":"omniflixvaloper1urmpej6k8hckp5sadzdsxxtl95t9j6rpugf2z3","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Qed8sR7TSeh4EHK0C3YbpQusuH9zciWIQvLDNF8rJvE="},"value":{"denom":"uflix","amount":"50000000"}}],"memo":"[email protected]:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ar0MCYofJ/+3aiJcvl7genfYVbjHDO/ONQL8ZkcChgxa"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["g+IHQ2QiAg5qwjumk0M3F55QpN2VMOmci5zmLHPqnrQSTQEb3xDOQhLXb7jevUs5GOSjbeqt/kFzXHLmlbahqg=="]}

808 changes: 808 additions & 0 deletions flixnet-1/validator_addresses.txt

Large diffs are not rendered by default.

Empty file added flixnet-2/gentxs/.gitkeep
Empty file.
61 changes: 61 additions & 0 deletions flixnet-2/gentxs/test-gentx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"body": {
"messages": [
{
"@type": "/cosmos.staking.v1beta1.MsgCreateValidator",
"description": {
"moniker": "testval",
"identity": "",
"website": "",
"security_contact": "",
"details": ""
},
"commission": {
"rate": "0.100000000000000000",
"max_rate": "0.200000000000000000",
"max_change_rate": "0.010000000000000000"
},
"min_self_delegation": "1",
"delegator_address": "omniflix1zfmmxr0kpquw3rhgkxe4de52lxgq6dmppaw55y",
"validator_address": "omniflixvaloper1zfmmxr0kpquw3rhgkxe4de52lxgq6dmpv0u44v",
"pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "k9AeYTzBz/JcGblnPBej5CNtJDx/rPM6n0SEB32RmUM="
},
"value": {
"denom": "uflix",
"amount": "50000000"
}
}
],
"memo": "[email protected]:26656",
"timeout_height": "0",
"extension_options": [],
"non_critical_extension_options": []
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "AixRGKMh8Xcrf12X5pl65VMnB/ZfYXWXEZxQBG67mN2W"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_DIRECT"
}
},
"sequence": "0"
}
],
"fee": {
"amount": [],
"gas_limit": "200000",
"payer": "",
"granter": ""
}
},
"signatures": [
"0Vub1DKah6xoEHQoW5f1A+IzqpwmDWnllr/Wkppmg+lYchK7JTljqG0CPcRzzdIOrRm+dwbY8eAyxR0bL505JA=="
]
}
28 changes: 28 additions & 0 deletions scripts/generate_genesis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

CHAIN_ID=flixnet-2
NODE_HOME=/tmp/ofhub
CONFIG=/tmp/ofhub/config

rm -rf $NODE_HOME

omniflixhubd init test --chain-id $CHAIN_ID --home $NODE_HOME

rm -rf $CONFIG/gentx && mkdir $CONFIG/gentx
rm -rf $CONFIG/genesis.json

cp $CHAIN_ID/genesis.json $CONFIG/genesis.json
for i in $CHAIN_ID/gentxs/*.json; do
echo $i
echo $(jq -r '.body.messages[0].delegator_address' $i)
omniflixhubd add-genesis-account $(jq -r '.body.messages[0].delegator_address' $i) 100000000uflix --home $NODE_HOME
cp $i $CONFIG/gentx/
done
echo "Collecting gentxs ..."
omniflixhubd collect-gentxs --home $NODE_HOME

echo "Validate genesis ..."
omniflixhubd validate-genesis --home $NODE_HOME

cp $CONFIG/genesis.json $CHAIN_ID
echo "Done. File saved at ${CHAIN_ID}/genesis.json"
29 changes: 29 additions & 0 deletions scripts/is_prev_participant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import glob
import json


CHAIN_ID = 'flixnet-2'
PREV_CHAIN_ID = 'flixnet-1'
gentx_files = glob.glob(f'./{CHAIN_ID}/gentxs/*.json')

if len(gentx_files) != 1:
print("invalid submission!!")
exit(1)

gentx_file = gentx_files[0]

with open(gentx_file, 'r') as f:
gentx = json.loads(f.read())


p_file = f'./{PREV_CHAIN_ID}/validator_addresses.txt'
with open(p_file, 'r') as p_f:
text = p_f.read()
prev_participants = text.strip().split('\n')

if gentx['body']['messages'][0]['validator_address'] in prev_participants:
print("Yes, Previous Participant")
else:
print('No')


104 changes: 104 additions & 0 deletions scripts/start_node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/bin/bash

NODE_HOME=~/.omniflixhub
NODE_MONIKER="myflixnode"
CHAIN_ID="flixnet-2"
SERVICE_NAME="omniflixhubd"

is_exists () {
type "$1" &> /dev/null ;
}
is_service_exists() {
local n=$1
if [[ $(systemctl list-units --all -t service --full --no-legend "$n.service" | cut -f1 -d' ') == $n.service ]]; then
return 0
else
return 1
fi
}
echo "Step1 - Installing go lang ..."
if is_exists go; then
echo "Go lang is already installed ...";
else
#sudo rm -rf /usr/local/go
curl https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz | sudo tar -C /usr/local -zxvf -

echo "" > ~/.profile
echo 'export GOROOT=/usr/local/go' > ~/.profile
echo 'export GOPATH=$HOME/go' > ~/.profile
echo 'export GO111MODULE=on' > ~/.profile
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' > ~/.profile
source ~/.profile

echo "go lang Installed ..."
go version
fi

echo "Step2 - Installing omniflixhubd ..."
if is_exists omniflixhubd; then
echo "omniflixhub is already installed ..."
omniflixhubd version
else
echo "Installing omniflixhub"
sleep 2
sudo apt-get install git curl build-essential make jq -y
git clone https://github.com/Omniflix/omniflixhub.git
cd omniflixhub
git checkout v0.2.1
make install

echo "omniflixhub installed ..."
omniflixhubd version --long
fi
echo "Step3 - Initializing node ..."
if [ -d "${NODE_HOME}/config" ]; then
echo "node already initialized ..."
echo "Node ID:"
omniflixhubd tendermint show-node-id --home $NODE_HOME
else
echo "Initializing node ..."
sleep 2;
omniflixhubd init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME
echo "Done .."
fi
echo "Step4 - Downloading genesis ..."
curl -s https://raw.githubusercontent.com/OmniFlix/testnets/main/$CHAIN_ID/genesis.json > $NODE_HOME/config/genesis.json
echo "genesis file sha256 hash"
shasum -a 256 $NODE_HOME/config/genesis.json

echo "Step5 - Updating seeds and peers .."
seeds=$(curl https://raw.githubusercontent.com/OmniFlix/testnets/main/$CHAIN_ID/seed_nodes.txt -s | xargs | sed -e 's/ /,/g')
peers=$(curl https://raw.githubusercontent.com/OmniFlix/testnets/main/$CHAIN_ID/persistent_peers.txt -s | xargs | sed -e 's/ /,/g')

sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $NODE_HOME/config/config.toml
echo "Done .."

echo "Step6 - Starting node ..."
if is_service_exists $SERVICE_NAME; then
echo "${SERVICE_NAME} service already exists ..."
else
echo "[Unit]
Description=OmniFlixHub Daemon
After=network-online.target

[Service]
User=${USER}
ExecStart=$(which omniflixhubd) start --home $NODE_HOME
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target" > omniflixhubd.service
sudo mv omniflixhubd.service /etc/systemd/system/omniflixhubd.service
sudo systemctl daemon-reload
sudo systemctl enable omniflixhubd
fi

sudo systemctl restart omniflixhubd
sleep 5
echo "Done .."

echo "Step7 - Checking service logs"
journalctl -eu omniflixhubd.service --no-pager
echo "Completed.."
35 changes: 25 additions & 10 deletions scripts/verify_gentx.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
#!/bin/sh
FLIX_HOME="/tmp/omniflixhub$(date +%s)"
RANDOM_KEY="random-validator-key"
CHAIN_ID=flixnet-1
CHAIN_ID=flixnet-2
VERSION=v0.2.1

GENTX_FILE=$(find ./$CHAIN_ID/gentxs -iname "*.json")
LEN_GENTX=$(echo ${#GENTX_FILE})

#GENTX_DEADLINE=$(date -u -d '2021-07-26T18:00:00.000Z' +'%s')
#now=$(date -u +'%s')
GENTX_SUBMISSION_START=$(date -u -d '2021-09-03T14:00:00.000Z' +'%s')
GENTX_SUBMISSION_DEADLINE=$(date -u -d '2021-09-06T14:00:00.000Z' +'%s')

now=$(date -u +'%s')

declare -i maxbond=50000000
if [ $now -le GENTX_SUBMISSION_START ]; then
echo 'Gentx submission not started yet'
exit 1
fi

if [ $now -ge GENTX_SUBMISSION_DEADLINE ]; then
echo 'Gentx submission is closed'
exit 1
fi
GENTX_FILE=$(find ./$CHAIN_ID/gentxs -iname "*.json")
FILES_COUNT=$(find ./$CHAIN_ID/gentxs -iname "*.json" | wc -l)
LEN_GENTX=$(echo ${#GENTX_FILE})

#if [ $now -ge $GENTX_DEADLINE ]; then
# echo 'Gentx submission is closed'
# exit 1
#fi
if [ $FILES_COUNT -g 1 ]; then
echo 'Invalid! found more than 1 json file'
exit 1
fi

if [ $LEN_GENTX -eq 0 ]; then
echo "gentx file not found."
exit 1
else
set -e

Expand All @@ -38,7 +52,7 @@ else
fi
echo "...........Init omniflixhub.............."

wget -q https://github.com/OmniFlix/omniflixhub/releases/download/v0.1.0/omniflixhubd -O omniflixhubd
wget -q https://github.com/OmniFlix/omniflixhub/releases/download/$VERSION/omniflixhubd -O omniflixhubd
chmod +x omniflixhubd

./omniflixhubd keys add $RANDOM_KEY --home $FLIX_HOME
Expand Down Expand Up @@ -78,3 +92,4 @@ else
killall omniflixhubd >/dev/null 2>&1
rm -rf $FLIX_HOME >/dev/null 2>&1
fi