Hey all,
Today we launched Enigma Blockchain’s Testnet, with nodes running the latest pre-release v0.1.0 with a smart contracts module baked in.
Just smart contracts, no SGX for now.
For smart contracts we actually worked with CosmWasm to embed their library (v0.7.0) into Enigma Blockchain’s enigmad and enigmacli.
We call it Compute.
We also launched a Testnet Faucet so everyone can go and send themselves tokens to play with. Keep in mind the number of available tokens is limited! Please don’t abuse this service.
So how do you join the testnet?
It’s essentialy the same process as one would join the mainnet, but we created a doc to refresh your memory and save you the hassle
NOTE: You DO NOT want to use the v0.1.0 on an existing mainnet validator node. It will not work. NOTE 2: We recommend you to first remove older enigmachain installations to prevent collisions. NOTE 3: Before removing, changing or doing anything with the old enigmad,enigmacli installations - make sure to back up your keys and recovery seeds!
If you are new to Cosmos SDK and Enigma Blockchain, you should check out our docs for additional tips, configurations etc. (for example, how to run a validator node)
Existing documentation was written with mainnet in mind, but still relevant to testnet as well with slight modifications.
Smart Contracts docs will be posted soon, in the meantime you should check out CosmWasm’s docs for info about writing and deploying smart contracts.
This release supports currently only Debian/Ubuntu systems. More distribution will be available in the future.
Possible future developments
Testnet explorer.
Ability for Mainnet and Testnet clients to be installed simultaneously.
Great. Could you add TLS as well (REST API over HTTPs)? Otherwise in-browser apps hosted via https:// cannot access the API due to mixed content restrictions in browsers.
Great. When you do that, there are 3 things worth considering for apps:
TLS certificate: because of mixed content limitations by browsers. And because encryption makes sense.
CORS: every origin should be allowed to access it and preflight requests (OPTION) should work
compression: the REST server by default does not compress responses. A contract is about 100 kilobytes of bytecode that is encoded with 33% overhead in base64. The encoding overhead can be compressed away almost entirely and the pure code can be compressed to about 50% of the original size. For JSON responses larger than a couple of kilobytes this helps as well.
At https://enigma.wasm.glass/ I deployed is a Code Explorer pointing to the Enigma testnet. It is connecting to a pretty slow proxy backend that goes to sleep when unused for a while. So you need to be a bit patient when it says “Loading …”. At least it has HTTPs and CORS configured. Proper endpoint welcome.
I also uploaded and instantiated the first contract
Mar 06 21:42:01 vultr.guest systemd[1]: enigma-node.service: Main process exited, code=exited, status=1/FAILURE
Mar 06 21:42:01 vultr.guest systemd[1]: enigma-node.service: Failed with result 'exit-code'.
Mar 06 21:42:05 vultr.guest systemd[1]: enigma-node.service: Service hold-off time over, scheduling restart.
Mar 06 21:42:05 vultr.guest systemd[1]: enigma-node.service: Scheduled restart job, restart counter is at 130.
Mar 06 21:42:05 vultr.guest systemd[1]: Stopped Enigma node service.
Mar 06 21:42:05 vultr.guest systemd[1]: Started Enigma node service.
Mar 06 21:42:05 vultr.guest enigmad[9599]: I[2020-03-06|21:42:05.193] starting ABCI with Tendermint module=main
Mar 06 21:42:05 vultr.guest enigmad[9599]: ERROR: error during handshake: error on replay: wrong Block.Header.AppHash. Expected CCD64058E400CAA1868DD204D3FD2229B51CDA6AF0120D0CB97824F425BFF435, got 9021AC0590DD7A5C07B56841360632FDAC86FFA0AA0AF97216738E50C03231BF
Mar 06 21:42:05 vultr.guest systemd[1]: enigma-node.service: Main process exited, code=exited, status=1/FAILURE
Mar 06 21:42:05 vultr.guest systemd[1]: enigma-node.service: Failed with result 'exit-code'.```