Commit Graph

13 Commits

Author SHA1 Message Date
Eric Mastro 06c0c72b7c refactor(@embark/embark-swarm): Re-add swarm storage plugin (#1783)
* add web3 connection

* add TODO

* refactor(@embark/embark-swarm): Re-add swarm storage plugin

Swarm added back in to the refactored code.

Prevent Embark from hanging when Swarm/IPFS crashes.

Use swarm config as per below

To take this PR for a spin, update `dapps/templates/demo/config/storage.js` with the following:
```
module.exports = {
  // default applies to all environments
  default: {
    enabled: true,
    ipfs_bin: "ipfs",
    available_providers: ["ipfs", "swarm"],
    upload: {
      provider: "swarm",
      host: "localhost",
      port: 8500
    },
    dappConnection: [
      {
        provider: "swarm",
        host: "localhost",
        port: 8500,
        getUrl: "http://localhost:8500/bzz:/"
      }
    ]
    // Configuration to start Swarm in the same terminal as `embark run`
    , account: {
      address: "SWAM_ACCOUNT_ADDRESS", // Address of account accessing Swarm
      password: "config/development/password" // File containing the password of the account
    },
    /*swarmPath: "PATH/TO/SWARM/EXECUTABLE" // Path to swarm executable (default: swarm)*/
  }
};

```

NOTE: `account.address` needs to be a node account. Please make sure `embark run2` has been run first, then create a new node account and update the config, then re-run embark.

1. `embark run2`
2. `geth account new --datadir=.embark/development/datadir --password=config/development/password`
3. Copy output from #2 to `account.address` in config
4. Re-run `embark run2`
2019-08-22 12:57:39 -04:00
Jonathan Rainville d8ba0be534 reafctor(@embark/ens): create namestystem component and fix ENS 2019-08-22 12:51:05 -04:00
Iuri Matias e432dc328c implement communication stack component, whisper plugin 2019-07-30 15:00:45 -04:00
Iuri Matias 9e0fdac1ef register EmbarkJS.Storage in the console; re-add upload support 2019-07-30 10:38:26 -04:00
Iuri Matias 43d6aa1366 add storage and ipfs components 2019-07-29 17:09:57 -04:00
Iuri Matias dd0cfbc2dc genereate components config files 2019-07-17 17:52:17 -04:00
Jonathan Rainville 162d66b675 feat: enable starting and switching storage configs in tests 2019-07-12 12:51:56 -04:00
Jonathan Rainville 63ab21ee81 feat(@embark/test-runner): make modules configurable per test
Make storage, ens and communication configurable per test
Tested ENS and it works like a charm
2019-07-12 12:44:53 -04:00
Michael Bradley, Jr 5930cce7dd chore(release): 4.1.0-beta.5 2019-07-10 16:21:47 -05:00
Michael Bradley, Jr 5828ae6cc5 fix(@embark/storage): revise timing for process:started and code eval to avoid race conditions 2019-07-10 16:06:27 -05:00
Jonathan Rainville 9390673ef4 chore: update shelljs to 0.8.3 for all packages 2019-07-08 11:25:30 -05:00
Michael Bradley, Jr bd602b45ee refactor(@embark/storage): wrap require.resolve in try/catch
Wrap `require.resolve` in try/catch instead of testing the path with
`embark.fs.access`.
2019-07-05 17:01:09 -05:00
Michael Bradley, Jr 04694edb0b refactor: move storage, ipfs and swarm modules into their own packages 2019-07-05 16:07:45 -05:00