Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ Where `deploydir` is the same as above.
In the `deploydir` directory, create a file at `config/common/networks`, it must contain a list of networks. With each network consisting of at least one host. A network can either be some chainweb deployment or also some pact -s server. chainweaver will auto detect what it actually is:

```
testnet: us1.testnet.chainweb.com us2.testnet.chainweb.com eu1.testnet.chainweb.com eu2.testnet.chainweb.com ap1.testnet.chainweb.com ap2.testnet.chainweb.com
pact: pact01.kadena.io pact02.kadena.io
testnet: api.testnet.chainweb.com
mainnet: api.chainweb.com
```

This file must exist, so chainweaver won't start up in development mode (launching its own pact servers), as of this writing it should also be populated with entries.
Expand Down
4 changes: 2 additions & 2 deletions backend/src/Backend/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ main' ffi mainBundleResourcePath runHTML = do
, ("common/oauth/github/client-id", "") -- TODO remove
]
networks = T.encodeUtf8 $ T.unlines
[ "Mainnet: us-e1.chainweb.com us-e2.chainweb.com us-w1.chainweb.com us-w2.chainweb.com jp1.chainweb.com jp2.chainweb.com fr1.chainweb.com fr2.chainweb.com"
, "Testnet: us1.testnet.chainweb.com us2.testnet.chainweb.com eu1.testnet.chainweb.com eu2.testnet.chainweb.com ap1.testnet.chainweb.com ap2.testnet.chainweb.com"
[ "Mainnet: api.chainweb.com"
, "Testnet: api.testnet.chainweb.com"
]
liftIO $ putStrLn "Starting frontend"
bowserMVar :: MVar () <- liftIO newEmptyMVar
Expand Down
2 changes: 1 addition & 1 deletion common/tests/GoldenTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ goldenTests =
chain = ChainId "0"

(Right (node, pubkey)) = runExcept $ (,)
<$> parseNodeRef "us1.testnet.chainweb.com"
<$> parseNodeRef "api.testnet.chainweb.com"
<*> parsePublicKey "368820f80c324bbc7c2b0610688a7da43e39f91d118732671cd9c7500ff43cca"

rk = RequestKey $ Hash.pactHash "this is a test"
Expand Down
2 changes: 1 addition & 1 deletion common/tests/golden-files/noderef.golden.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"us1.testnet.chainweb.com"
"api.testnet.chainweb.com"
2 changes: 1 addition & 1 deletion common/tests/golden-outputs/noderef.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"us1.testnet.chainweb.com"
"api.testnet.chainweb.com"
4 changes: 2 additions & 2 deletions frontend/src/Frontend/Network/NodeInfo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ parseChainwebInfo v = do
, _chainwebInfo_chainIds = chainIds
}

-- Note, from us-e1.chainweb.com, the chain ids come back not sorted. It comes back as
-- Note, the chain ids come back from the nodes not sorted. It comes back as
-- "nodeChains":["8","9","4","5","6","7","0","1","2","3"]
-- But sorting these is a little tricky. If we just sort the strings, things will get messy with
-- 10, 11, 12, etc but can we actually assume that these are always numbers and sort them as such?
-- Thisj function goes a little over the top to make sure numbers are sorted at the top
-- This function goes a little over the top to make sure numbers are sorted at the top
-- and if we get any non number chain ids they are alphanumerically sorted down below
sortChainIds :: [Pact.ChainId] -> [Pact.ChainId]
sortChainIds ids = sortOn chainIdIndex ids
Expand Down
2 changes: 1 addition & 1 deletion frontend/tests/Frontend/CommandLog.files/v0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"command":{"hash":"n1bWvpxcplbqw3IsaL34bmqvFO1F0iy0FcEcjj8adhA","sigs":[{"sig":"5fd6b3e2836d6dd84114b5948898e6ed63d832c618d01c21e32335e75d4623e5352a63daad37bd1e978ee453255469937ec607e46b97e0364c40a30e0c3dd90a"}],"cmd":"payload"},"url":"https://eu1.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact","version":0,"timestamp":"2020-01-24T13:19:36.199626747Z"}
{"command":{"hash":"n1bWvpxcplbqw3IsaL34bmqvFO1F0iy0FcEcjj8adhA","sigs":[{"sig":"5fd6b3e2836d6dd84114b5948898e6ed63d832c618d01c21e32335e75d4623e5352a63daad37bd1e978ee453255469937ec607e46b97e0364c40a30e0c3dd90a"}],"cmd":"payload"},"url":"https://api.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact","version":0,"timestamp":"2020-01-24T13:19:36.199626747Z"}
2 changes: 1 addition & 1 deletion frontend/tests/Frontend/CommandLog.files/v1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"command":{"hash":"B8H6ZFcoCLAMHTeoKMC5oOi32MG2abRkZfz3EaKuJTA","sigs":[{"sig":"6b5eef89c3c930f2e555aa468e7fea423ca42a29dc7e30dad11c42911ddab24bda4b13b03b7c6342efa2a0c91de46d8be016785b410a2688e17430a045855a0b"}],"cmd":"payload"},"sender":"dib","url":"https://eu1.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact","request_key":"B8H6ZFcoCLAMHTeoKMC5oOi32MG2abRkZfz3EaKuJTA","version":1,"chain":"0","timestamp":"2020-02-14T12:25:27.58977078Z"}
{"command":{"hash":"B8H6ZFcoCLAMHTeoKMC5oOi32MG2abRkZfz3EaKuJTA","sigs":[{"sig":"6b5eef89c3c930f2e555aa468e7fea423ca42a29dc7e30dad11c42911ddab24bda4b13b03b7c6342efa2a0c91de46d8be016785b410a2688e17430a045855a0b"}],"cmd":"payload"},"sender":"dib","url":"https://api.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact","request_key":"B8H6ZFcoCLAMHTeoKMC5oOi32MG2abRkZfz3EaKuJTA","version":1,"chain":"0","timestamp":"2020-02-14T12:25:27.58977078Z"}
4 changes: 2 additions & 2 deletions frontend/tests/Frontend/CommandLogSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ v0CommandLogDecoded = V0.CommandLog
, Pact._cmdHash = either error id $ Pact.fromText' "n1bWvpxcplbqw3IsaL34bmqvFO1F0iy0FcEcjj8adhA"
}
, V0._commandLog_timestamp = UTCTime (fromGregorian 2020 01 24) 47976.199626747
, V0._commandLog_url = "https://eu1.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact"
, V0._commandLog_url = "https://api.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact"
}

v1CommandLogDecoded :: V1.CommandLog
Expand All @@ -85,7 +85,7 @@ v1CommandLogDecoded = V1.CommandLog
, V1._commandLog_sender = "dib"
, V1._commandLog_chain = Pact.ChainId "0"
, V1._commandLog_requestKey = either error id $ Pact.fromText' "B8H6ZFcoCLAMHTeoKMC5oOi32MG2abRkZfz3EaKuJTA"
, V1._commandLog_url = "https://eu1.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact"
, V1._commandLog_url = "https://api.testnet.chainweb.com/chainweb/0.0/testnet04/chain/0/pact"
, V1._commandLog_command = Pact.Command
{ Pact._cmdPayload = "payload"
, Pact._cmdSigs = [Pact.UserSig "6b5eef89c3c930f2e555aa468e7fea423ca42a29dc7e30dad11c42911ddab24bda4b13b03b7c6342efa2a0c91de46d8be016785b410a2688e17430a045855a0b"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[["devnet",["us1.tn1.chainweb.com","us2.tn1.chainweb.com","eu1.tn1.chainweb.com","eu2.tn1.chainweb.com"]],["testnet",["ap1.testnet.chainweb.com","ap2.testnet.chainweb.com","eu1.testnet.chainweb.com","eu2.testnet.chainweb.com","us1.testnet.chainweb.com","us2.testnet.chainweb.com"]]]
[["mainnet",["api.chainweb.com"]],["testnet",["api.testnet.chainweb.com"]]]
16 changes: 3 additions & 13 deletions frontend/tests/Frontend/VersionedStoreSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,10 @@ expectedSelectedNetwork = mkNetworkName "devnet"

expectedNetworks :: Map NetworkName [NodeRef]
expectedNetworks = Map.fromList
[ (mkNetworkName "devnet",
[ mkNodeRef [host|us1.tn1.chainweb.com|]
, mkNodeRef [host|us2.tn1.chainweb.com|]
, mkNodeRef [host|eu1.tn1.chainweb.com|]
, mkNodeRef [host|eu2.tn1.chainweb.com|]
])
[ (mkNetworkName "mainnet",
[ mkNodeRef [host|api.chainweb.com|] ])
, (mkNetworkName "testnet",
[ mkNodeRef [host|ap1.testnet.chainweb.com|]
, mkNodeRef [host|ap2.testnet.chainweb.com|]
, mkNodeRef [host|eu1.testnet.chainweb.com|]
, mkNodeRef [host|eu2.testnet.chainweb.com|]
, mkNodeRef [host|us1.testnet.chainweb.com|]
, mkNodeRef [host|us2.testnet.chainweb.com|]
])
[ mkNodeRef [host|api.testnet.chainweb.com|] ])
]
where
mkNodeRef h = NodeRef $ Authority Nothing h Nothing
Expand Down
3 changes: 1 addition & 2 deletions scripts/generate-dev-config
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ touch config/common/oauth/github/client-id
# https://github.com/kadena-io/chainweaver#setting-up-production-mode-and-the-network-list
if [ ! -f config/common/networks ]; then
cat >config/common/networks <<EOF
devnet: us1.tn1.chainweb.com us2.tn1.chainweb.com eu1.tn1.chainweb.com eu2.tn1.chainweb.com
testnet: eu1.testnet.chainweb.com eu2.testnet.chainweb.com us1.testnet.chainweb.com us2.testnet.chainweb.com ap1.testnet.chainweb.com ap2.testnet.chainweb.com
testnet: api.testnet.chainweb.com
EOF
fi;

Expand Down