embarklabs / embark

Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms
https://framework.embarklabs.io/
MIT License
3.79k stars 495 forks source link

How to turn off/disable Blockchain/Ethereum? #982

Open sreejithr opened 6 years ago

sreejithr commented 6 years ago

Overview

TL;DR I'm building a project with IPFS. I don't need Ethereum contracts. How do I turn blockchain off in the config?

Extra Detail

I'm getting No Blockchain node found and this error in the dashboard:

 TypeError: Cannot read property 'geth_bin' of undefined                                                                                                                                                        
     at self.isClientInstalled (C:\Users\srramakr\AppData\Roaming\nvm\v8.11.2\node_modules\embark\lib\modules\blockchain_process\blockchain.js:151:134)                                                          │
     at runCommand (C:\Users\srramakr\AppData\Roaming\nvm\v8.11.2\node_modules\embark\lib\modules\blockchain_process\blockchain.js:288:14)                                                                       │
     at ChildProcess.exithandler (child_process.js:282:5)                                                                                                                                                        
     at emitTwo (events.js:126:13)                                                                                                                                                                               
     at ChildProcess.emit (events.js:214:7)                                                                                                                                                                      
     at maybeClose (internal/child_process.js:925:16)                                                                                                                                                            
     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

And as a result, my localhost:8000 is stuck at "Embark is building. Please wait..."`.

Steps to reproduce

  1. Make sure Ethereum (geth) binary isn't installed.
  2. Do embark run.
  3. Error in dashboard.

Screenshots

embark_building

Logs

log.txt

Context (Environment)

jrainville commented 6 years ago

Hi , @sreejithr, that's a very interesting workflow you are asking for. I think you are the first to want the storage but not smart contracts.

I think there is no out of the box way to not have a blockchain connection, but there is a simple way to get around it.

You can, in another terminal, start embark simulator and then you will be able to run Embark, even without contracts. Don't worry, the simulator is pretty light and comes with Embark.

I'll also check with the test to see if there is a way to get rid of the blockchain connection altogether.

Hope it helps.

sreejithr commented 6 years ago

Thank you @jrainville for responding so fast. I'm building a decentralized annotation service which stores all public annotations in IPFS. No need for smart contracts as of now.

I tried embark simulator but it gives an Invalid character error in ganache-cli. For the time being though, I installed geth in my machine.

But I'd love an option to turn off blockchain nonetheless. Is this in your roadmap?

0x-r4bbit commented 6 years ago

But I'd love an option to turn off blockchain nonetheless. Is this in your roadmap?

@sreejithr we've discussed this internally and were actually surprised that this is not working at the moment. Embark should allow you to build a Dapp that just uses decentralized storages, without the need of running a node, or being connected to one.

So yes, this is not only on our roadmap but a bug that needs to be fixed :)