Testnet is live with Smart Contracts!

So I got the genesis file and even the sha256sum matches
like @laura when i run enigmad validate-genesis

i get

ERROR: error validating genesis file /root/.enigmad/config/genesis.json: failed to unmarshal genutil genesis state: UnmarshalJSON cannot decode empty bytes

And on force starting the node it just fails as my previous error.

Thanks for the feedback guys, we’ll fix that on Sunday

2 Likes

Hey @laura @dbriggsie @mohammedpatla ,
I updated the main post with a new genesis file and checksum, I did a few tests and it should work now. Please try again and let me know :slight_smile:

Seems like that’s a bug that was in cosmos-sdk v0.37 that they solved in v0.38, but somehow reproduced in v0.38.1 which we use in this release :sweat_smile:
When you export the chain state, it instantiates genutil as null , instead of an empty {} , that’s what causes the validate-genesis to fail, and probably that’s why the node fail to reproduce the same block hashes too.

2 Likes

Hey @toml I got past the enigmad validate-genesis, but now seeing an error on the replay with the blocks::

ERROR: error during handshake: error on replay: wrong Block.Header.AppHash. Expected CCD64058E400CAA1868DD204D3FD2229B51CDA6AF0120D0CB97824F425BFF435, got 9021AC0590DD7A5C07B56841360632FDAC86FFA0AA0AF97216738E50C03231BF

Mar 08 20:54:14 localhost systemd[1]: Started Enigma node service.
Mar 08 20:54:14 localhost enigmad[10137]: I[2020-03-08|20:54:14.881] starting ABCI with Tendermint                module=main
Mar 08 20:54:14 localhost enigmad[10137]: ERROR: error during handshake: error on replay: wrong Block.Header.AppHash.  Expected CCD64058E400CAA1868DD204D3FD2229B51CDA6AF0120D0CB97824F425BFF435, got 9021AC0590DD7A5C07B56841360632FDAC86FFA0AA0AF97216738E50C03231BF
Mar 08 20:54:14 localhost systemd[1]: enigma-node.service: Main process exited, code=exited, status=1/FAILURE
Mar 08 20:54:14 localhost systemd[1]: enigma-node.service: Failed with result 'exit-code'.
Mar 08 20:54:18 localhost systemd[1]: enigma-node.service: Service RestartSec=3s expired, scheduling restart.
Mar 08 20:54:18 localhost systemd[1]: enigma-node.service: Scheduled restart job, restart counter is at 14.
Mar 08 20:54:18 localhost systemd[1]: Stopped Enigma node service.
Mar 08 20:54:18 localhost systemd[1]: Started Enigma node service.
Mar 08 20:54:18 localhost enigmad[10142]: I[2020-03-08|20:54:18.128] starting ABCI with Tendermint                module=main
Mar 08 20:54:18 localhost enigmad[10142]: ERROR: error during handshake: error on replay: wrong Block.Header.AppHash.  Expected CCD64058E400CAA1868DD204D3FD2229B51CDA6AF0120D0CB97824F425BFF435, got 9021AC0590DD7A5C07B56841360632FDAC86FFA0AA0AF97216738E50C03231BF
Mar 08 20:54:18 localhost systemd[1]: enigma-node.service: Main process exited, code=exited, status=1/FAILURE
Mar 08 20:54:18 localhost systemd[1]: enigma-node.service: Failed with result 'exit-code'.

Just to make sure - are you using the new v0.1.0 binaries? (https://github.com/enigmampc/EnigmaBlockchain/releases/tag/v0.1.0)

Can you post output of running enigmad version on your node machine?

Yes, I’ve got the 0.1.0 version.

$ enigmad version

0.1.0-3-gff4c7f8

Is that correct?

Can you rm -rf .enigmad and try again?

1 Like

That worked! Thanks guys :smiley:.

My testnet validator is now catching up!

2 Likes

Did anyone get the chance to setup a REST API with HTTPs? I’d be glad to use and promote your domain in the explorer.

ping @laura @dbriggsie

1 Like

@Simon This doesn’t work. :man_shrugging:

Hey @simon, I haven’t yet. I know @dbriggsie setup one for mainnet, but not sure about testnet.

What’s your explorer?

It is turned on at least:

curl http://bootstrap.testnet.enigma.co/node_info | jq .node_info.other
{
  "tx_index": "on",
  "rpc_address": "tcp://0.0.0.0:26657"
}

And works for some kind of indexed events:

curl "http://bootstrap.testnet.enigma.co/txs?tx.height=18250"
{
  "total_count": "1",
  "count": "1",
  "page_number": "1",
  "page_total": "1",
  "limit": "30",
  "txs": [
    {
      "height": "18250",
      "txhash": "981A19EA0DD4DA6E292E529ABAF883CC4B17DD727540A0064541989601109865",

or

curl "http://bootstrap.testnet.enigma.co/txs?message.contract_address=enigma1hqrdl6wstt8qzshwc6mrumpjk9338k0lja5ur0"
{
  "total_count": "1",
  "count": "1",
  "page_number": "1",
  "page_total": "1",
  "limit": "30",
  "txs": [
    {
      "height": "18250",
      "txhash": "981A19EA0DD4DA6E292E529ABAF883CC4B17DD727540A0064541989601109865",

The minheight/maxheight patch is currently not released. We ported it to our Cosmos SDK fork for Wasmd.

Thank you @Simon, we’ll wait for the next cosmos-sdk release with this. :blush:

The code explorer hosted at https://enigma.wasm.glass/ (Testnet only). It could use a proper backend to replace the Heroku proxy that goes to sleep when unused for a while.

1 Like

Got the node running!!
Thanks for the fix.

1 Like

Hi guys,
As some of you noticed, testnet got halted today due to a bug with Cosmos SDK.
All the details are listed here.
We are working on recovering and spinning up the testnet again, hopefully with your smart contracts still in place.

Will update here.
Have a good one :smiley:

Hey everyone!
Happy to tell you that we was able to recover the testnet, through a hard fork :tada:

Instead of restarting the testnet from scratch, we thought it could be a good idea to see what it takes for the chain to recover from a halt like this one, with as little data loss as possible. For more information on how we got the chain recovered, visit this page.

Ok, so for the chain to resume where it last stopped, we need to get enough voting power online, so if you had a validator node on testnet, please follow these instructions:

On your node:

  • Download the new genesis file:
    wget -O ~/.enigmad/config/genesis.json "https://raw.githubusercontent.com/enigmampc/EnigmaBlockchain/master/enigma-testnet-genesis.json"
    
  • Validate checksum:
    echo "cc7ab684b955dcc78baffd508530f0a119723836d24153b41d8669f0e4ec3caa $HOME/.enigmad/config/genesis.json" | sha256sum --check
    
  • Validate genesis.json
    enigmad validate-genesis
    
  • Reset node:
    enigmad unsafe-reset-all
    
  • Erase the .compute directory:
    rm -rf ~/.enigmad/.compute
    
  • Restart your node service.

And that’s it, you should be good to go.

2 Likes

It did not work for me.
After following steps i tried starting the node and this is what i get.

Mar 17 18:28:43 vultr.guest enigmad[17518]:         /home/assafmo/workspace/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
Mar 17 18:28:43 vultr.guest enigmad[17518]: github.com/spf13/cobra.(*Command).Execute(...)
Mar 17 18:28:43 vultr.guest enigmad[17518]:         /home/assafmo/workspace/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
Mar 17 18:28:43 vultr.guest enigmad[17518]: github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc0004a8780, 0x149c1d0, 0x13198a6, 0x10)
Mar 17 18:28:43 vultr.guest enigmad[17518]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/libs/cli/setup.go:89 +0x3c
Mar 17 18:28:43 vultr.guest enigmad[17518]: main.main()
Mar 17 18:28:43 vultr.guest enigmad[17518]:         /home/assafmo/workspace/enigmachain/cmd/enigmad/main.go:69 +0x7ab
Mar 17 18:28:43 vultr.guest systemd[1]: enigma-node.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 17 18:28:43 vultr.guest systemd[1]: enigma-node.service: Failed with result 'exit-code'.
Mar 17 18:28:46 vultr.guest systemd[1]: enigma-node.service: Service hold-off time over, scheduling restart.
Mar 17 18:28:46 vultr.guest systemd[1]: enigma-node.service: Scheduled restart job, restart counter is at 20.
Mar 17 18:28:46 vultr.guest systemd[1]: Stopped Enigma node service.
Mar 17 18:28:46 vultr.guest systemd[1]: Started Enigma node service.
Mar 17 18:28:46 vultr.guest enigmad[17549]: I[2020-03-17|18:28:46.479] starting ABCI with Tendermint                module=main
Mar 17 18:28:46 vultr.guest enigmad[17549]: panic: create wasm contract failed: Wasm Error: Filesystem error: File exists (os error 17)
Mar 17 18:28:46 vultr.guest enigmad[17549]: goroutine 1 [running]:
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/enigmampc/EnigmaBlockchain/x/compute/internal/keeper.InitGenesis(0x16ad9a0, 0xc000034068, 0x16c2100, 0xc000428e00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/enigmachain/x/compute/internal/keeper/genesis.go:19 +0x4b5
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/enigmampc/EnigmaBlockchain/x/compute.AppModule.InitGenesis(0x169cf60, 0xc000eabf60, 0xc000aba4d0, 0x169cf60, 0xc000eabec0, 0x1499890, 0xc000aba4d0, 0xc000aba4d0, 0x169cf60, 0xc000eabf30, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/enigmachain/x/compute/module.go:117 +0x152
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc000abb0a0, 0x16ad9a0, 0xc000034068, 0x16c2100, 0xc000428e00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.1/types/module/module.go:265 +0x278
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/enigmampc/EnigmaBlockchain.(*EnigmaChainApp).InitChainer(0xc0000b6100, 0x16ad9a0, 0xc000034068, 0x16c2100, 0xc000428e00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/enigmachain/app.go:409 +0x11d
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc000d1fe00, 0x35e07e59, 0xed5e76111, 0x0, 0xc000d74430, 0xe, 0xc000428b80, 0xc0000b2840, 0x6, 0x6, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.1/baseapp/abci.go:39 +0x2cd
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc000e7e840, 0x35e07e59, 0xed5e76111, 0x0, 0xc000d74430, 0xe, 0xc000428b80, 0xc0000b2840, 0x6, 0x6, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/abci/client/local_client.go:223 +0x101
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc000eab010, 0x35e07e59, 0xed5e76111, 0x0, 0xc000d74430, 0xe, 0xc000428b80, 0xc0000b2840, 0x6, 0x6, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/proxy/app_conn.go:65 +0x6b
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc000c7b0b0, 0xa, 0x0, 0xc000d74b36, 0x6, 0xc000d74b50, 0xe, 0x0, 0x0, 0x0, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/consensus/replay.go:318 +0x66e
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc000c7b0b0, 0x16c4d80, 0xc0004b9180, 0x7f182ed20775, 0x115f210)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/consensus/replay.go:269 +0x485
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/tendermint/tendermint/node.doHandshake(0x16c4080, 0xc000010760, 0xa, 0x0, 0xc000d74b36, 0x6, 0xc000d74b50, 0xe, 0x0, 0x0, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/node/node.go:281 +0x19a
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/tendermint/tendermint/node.NewNode(0xc000d1f2c0, 0x16a7ce0, 0xc000e2a960, 0xc000b2f6a0, 0x168b7c0, 0xc000de2220, 0xc000b2f8b0, 0x149b570, 0xc000b2f8c0, 0x16ae3a0, ...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/node/node.go:597 +0x343
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/cosmos/cosmos-sdk/server.startInProcess(0xc000d28420, 0x149bd98, 0x1d, 0x0, 0x0)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.1/server/start.go:157 +0x4c1
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/cosmos/cosmos-sdk/server.StartCmd.func1(0xc000d40000, 0x1fde8a0, 0x0, 0x0, 0x0, 0x0)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.1/server/start.go:67 +0xb4
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/spf13/cobra.(*Command).execute(0xc000d40000, 0x1fde8a0, 0x0, 0x0, 0xc000d40000, 0x1fde8a0)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x460
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/spf13/cobra.(*Command).ExecuteC(0xc0000a4c80, 0x13366cb, 0xc00043fe90, 0x591822)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/spf13/cobra.(*Command).Execute(...)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
Mar 17 18:28:46 vultr.guest enigmad[17549]: github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc0000a4c80, 0x149c1d0, 0x13198a6, 0x10)
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/libs/cli/setup.go:89 +0x3c
Mar 17 18:28:46 vultr.guest enigmad[17549]: main.main()
Mar 17 18:28:46 vultr.guest enigmad[17549]:         /home/assafmo/workspace/enigmachain/cmd/enigmad/main.go:69 +0x7ab
Mar 17 18:28:46 vultr.guest systemd[1]: enigma-node.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 17 18:28:46 vultr.guest systemd[1]: enigma-node.service: Failed with result 'exit-code'.
1 Like

Made a mistake, I fixed the post but just run again:

rm -rf ~/.enigmad/.compute

And restart node.

2 Likes

Still fails because it cant connect to bootstrap node i think

Mar 17 18:36:06 vultr.guest enigmad[21506]: github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc0000a4c80, 0x149c1d0, 0x13198a6, 0x10)
Mar 17 18:36:06 vultr.guest enigmad[21506]:         /home/assafmo/workspace/go/pkg/mod/github.com/tendermint/tendermint@v0.33.0/libs/cli/setup.go:89 +0x3c
Mar 17 18:36:06 vultr.guest enigmad[21506]: main.main()
Mar 17 18:36:06 vultr.guest enigmad[21506]:         /home/assafmo/workspace/enigmachain/cmd/enigmad/main.go:69 +0x7ab
Mar 17 18:36:06 vultr.guest systemd[1]: enigma-node.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 17 18:36:06 vultr.guest systemd[1]: enigma-node.service: Failed with result 'exit-code'.
Mar 17 18:36:08 vultr.guest systemd[1]: Stopped Enigma node service.
Mar 17 18:36:17 vultr.guest systemd[1]: Started Enigma node service.
Mar 17 18:36:17 vultr.guest enigmad[21551]: I[2020-03-17|18:36:17.760] starting ABCI with Tendermint                module=main
Mar 17 18:36:18 vultr.guest enigmad[21551]: E[2020-03-17|18:36:18.456] dialing failed (attempts: 1): dial tcp 172.105.15.222:26656: connect: connection refused module=pex addr=0b5923ff18a2786eb355ec945dedb565a13825e8@172.105.15.222:26656
Mar 17 18:36:48 vultr.guest enigmad[21551]: E[2020-03-17|18:36:48.437] dialing failed (attempts: 2): dial tcp 172.105.15.222:26656: connect: connection refused module=pex addr=0b5923ff18a2786eb355ec945dedb565a13825e8@172.105.15.222:26656
Mar 17 18:37:18 vultr.guest enigmad[21551]: E[2020-03-17|18:37:18.437] dialing failed (attempts: 3): dial tcp 172.105.15.222:26656: connect: connection refused module=pex addr=0b5923ff18a2786eb355ec945dedb565a13825e8@172.105.15.222:26656