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

Add startup binary management #40

Merged
merged 10 commits into from
Nov 14, 2023
Merged

Add startup binary management #40

merged 10 commits into from
Nov 14, 2023

Conversation

torkelrogstad
Copy link
Collaborator

@torkelrogstad torkelrogstad commented Nov 13, 2023

On startup, we load the drivechaind binary from assets, and launch it. The loading spinner is shown until we get a successful connection. In the case of an error, we display a big and ugly error message that it's impossible to get through.

TODO:

  • Dynamically load RPC config files based on the CHAIN param
  • Add the same thing for sidechains
  • Load dynamic assets based on platform + architecture
  • Prettify error messages
  • Windows compat
  • What to do if there's no config file present. The Drivechain launcher creates it's own config file. I tend to think this is not something we should do without asking the user first, as we should be respectful of the users environment.

@torkelrogstad torkelrogstad force-pushed the 2023-11-13-startup branch 2 times, most recently from 4ad3f97 to 32a968d Compare November 13, 2023 15:53
Comment on lines +250 to +259
// TODO: better error message with troubleshooting tips here
child: _initBinariesError != null
? SailText.primary24('Ran into unrecoverable error on startup: $_initBinariesError')
: loadingIndicator(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@octobocto input appreciated. When this branch is triggered we're at a unrecoverable state, and most likely it's the programmer's fault. Shouldn't happen with the end user, but if it happens they should get a good error message

lib/config/sidechains.dart Outdated Show resolved Hide resolved
lib/config/sidechains.dart Outdated Show resolved Hide resolved
Comment on lines +106 to +105
// TODO: correct?
return '.ethereum';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ping test this

lib/pages/tabs/sidechain_explorer_tab_page.dart Outdated Show resolved Hide resolved
@octobocto
Copy link
Collaborator

You should really rebase on master before continuing work here…

1. Tear out some unecesary OOP crazities
2. Rework the RPC clients such that they don't read RPC credentials on
   creation, but are passed them as a parameter. We need to construct
   the clients on startup after reading configuration files, while
   showing meaningful messages along the way
@torkelrogstad torkelrogstad merged commit e92339b into master Nov 14, 2023
1 check passed
@torkelrogstad torkelrogstad deleted the 2023-11-13-startup branch November 14, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants