Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-535] Support frontend only mode #1241

Merged

Conversation

DominikGuzei
Copy link
Member

@DominikGuzei DominikGuzei commented Dec 31, 2018

This PR adds support for frontendOnlyMode which makes it possible to connect to manually started instances of cardano-node for advanced debugging purposes.

How to Test:

  1. Within the cardano-sl repository you first have to build a script for a certain network … e.g for testnet: nix-build -A connectScripts.testnet.wallet -o launch_testnet
  2. Then launch this cluster + node with ./launch_testnet
  3. You should now have a state-wallet-testnet folder inside the cardano-sl repo … copy the full path to the sub folder tls in there.
  4. Within the Daedalus repo checkout this branch and run: CARDANO_TLS_PATH=/path/to/tls CARDANO_HOST=localhost CARDANO_PORT=8090 nix-shell

Now you should have a pre-configured nix-shell session where you can yarn dev as usual and Daedalus connects itself to the manually started cardano node.

Note:

Only CARDANO_TLS_PATH is mandatory. CARDANO_HOST defaults to localhost and CARDANO_PORT to 8090 😉

So if you just start the default cardano node (which runs on localhost:8090) you can also start nix-shell with CARDANO_TLS_PATH=/path/to/tls nix-shell

Todos:

  • The frontendOnlyMode flag in launcherConfig is always true … it should be false when --arg autoStartBackend true is passed to the nix-shell command. This means that currently only the manual cardano node mode is working (since it's always assuming that it should run in frontend only mode!)
  • Update Electron version used by nix-shell (@cleverca22) - fixed in 045fc7a

Review Checklist:

Basics

  • PR is updated to the most recent version of target branch (and there are no conflicts)
  • PR has good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub
  • Automated tests: All acceptance tests are passing (yarn run test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn run dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn run package / CI builds)
  • There are no flow errors or warnings (yarn run flow:test)
  • There are no lint errors or warnings (yarn run lint)
  • Text changes are proofread and approved (Jane Wild)
  • There are no missing translations (running yarn run manage:translations produces no changes)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn run storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly documented and commented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-rendering
  • Any code that only works in Electron is neatly separated from components

Testing

  • New feature / change is covered by acceptance tests
  • All existing acceptance tests are still up-to-date
  • New feature / change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review:

  • Merge PR
  • Delete source branch
  • Move ticket to done on the Youtrack board

@DominikGuzei DominikGuzei self-assigned this Dec 31, 2018
@nikolaglumac nikolaglumac changed the title support frontend only mode [DDW-535] Support frontend only mode Dec 31, 2018
@DominikGuzei DominikGuzei removed the WIP label Jan 2, 2019
@DominikGuzei
Copy link
Member Author

DominikGuzei commented Jan 2, 2019

@cleverca22 thanks for the support, i fixed the autoStartBackend convertion to frontendOnlyMode with the help of your change.

This feature is now working for me - i can run Daedalus against a manually started cardano-node and also against the "normal", Daedalus-managed cardano-node 🎉

@nikolaglumac @disassembler please test and spread the word to QA testers to give it a try too.

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DominikGuzei may I ask you to document this "frontend-only" mode in the main README file? 🙏

@nikolaglumac nikolaglumac merged commit 3ad556f into develop Jan 7, 2019
@iohk-bors iohk-bors bot deleted the feature/ddw-535-support-manully-starting-cardano-node branch January 7, 2019 13:35
@nikolaglumac nikolaglumac mentioned this pull request Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants