Coder Social home page Coder Social logo

drivechain_launcher's Introduction

Drivechain Launcher

🚧 Under construction

This application is built using Godot.

Godot may seem like an odd choice at first glance, but with its cross-platform abilities and an amazing set of GUI & IO features, it makes it very capable for this application.

We can currently run on Mac, Windows, and Linux.

If you'd like to build from source, check below.

Development Environment Prerequisites

# macOS
$ brew install godot

# Ubuntu/Debian
$ snap install godot-4 # note: this gets installed as godot-4, not godot

# Windows
$ choco install godot

Getting started

Ensure that godot is installed such that is in on your $PATH.

For building releases, so-called "export templates" has to be downloaded. These are available from the official website. Note that these are unique per version of Godot, but not unique per platform we're exporting for.

From the GUI, these templates can be downloaded like this:

  1. "Project" menu in the toolbar
  2. "Export" item within the "Project" menu
  3. "Download and install"

Important

The app relies on external binaries to be downloaded from a specific GitHub release. This is a bit cumbersome, but was the best we could come up with for now.

  • chain_providers.cfg are where each of the sidechain configs starts. The hash and file size for each platform binary is manually generated and added to the config for the release if it has changed.
  • version.cfg is where you would update the version and base GitHub release URL. Sometimes you may need to create a pre-release, upload all the binaries there and point to that as you are developing.
  • Currently, each platform version is built on its respective platform. So build the launcher for Linux on Linux, Mac on Mac, and Windows on Windows.
  • Mac is a bit different as you need to have a developer ID certificate so that Godot can request a signature and notarization. Whoever does this will need to create a signing certificate request and have Paul then create a new developer ID certificate with that request. Then you would install that into your Mac keychain. More info here: https://developer.apple.com/help/account/create-certificates/create-developer-id-certificates

Export preset notes

The file export_presets.cfg controls the export (i.e. build) process for the Launcher. It is controlled through the Godot GUI. If you write comments in the file, they will get erased once the file is saved. Furthermore, enums are represented as numbers, not strings...

export_presets.cfg is kept in Git. This file does not contain anything sensitive. It is merged with .godot/export_credentials.cfg, which does contain sensitive information. This file is also merged with certain environment variables, such that this can be done on CI without fiddling around with files.

macOS

Signing (and therefore also notarizing) the application requires having the correct set of certificates + private keys on the machine doing the export. Certificates can be viewed using Keychain Access.app. Seeing certificates capable of signing (i.e. certificates with private keys):

$ security find-identity -v -p codesigning | grep LayerTwo`

Notarizing the app requires an App Store Connect API key. Docs for generating this can be found here. There's three components to this key, which should go into .godot/export_credentials.cfg before exporting:

  1. Issuer ID (notarization/api_uuid). This is an UUID indicating which organization the key belongs to. This is available over the list of active keys.
  2. The key itself (notarization/api_key). This is a path to a .p8 file, and can only be obtained when creating the key.
  3. Key ID (notarization/api_key_id). This is available in the list of active keys.

Explanation of export config file options:

export/distribution_type
0=testing ?
1=distribution
2=app store

codesign/codesign
0=disabled
1=built-in ad-hoc
2=rcodesign ruby tool for exporting from Linux
3=Xcode codesign

notarization/notarization
0=disabled
2=xcrun notarytool

Generate App Store Connect API keys:

Download the key somewhere

Docs on macOS: https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_macos.html

Windows

Signing (is that the correct Windows nomenclature?) of the build artifacts does not happen in our pipeline. This leads to a scary pop-up warning the user when they try and launch the app. This could probably be set up, somehow. Left as an exercise to the reader!

LICENSE

MIT License

Copyright (c) 2023-2024 LayerTwo Labs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

drivechain_launcher's People

Contributors

seriouscatsoserious avatar ismyhc avatar psztorc avatar torkelrogstad avatar 8bitprodigy avatar cryptaxe avatar ash-l2l avatar rex4539 avatar rsantacroce avatar

Stargazers

 avatar BTCapsule avatar  avatar 3chain avatar JackJin avatar  avatar  avatar Michael Staub avatar  avatar  avatar Nikita Chashchinskii avatar 22388o⚡️  avatar

Watchers

HostFat avatar  avatar  avatar

drivechain_launcher's Issues

Wait to show "run" buttons of sidechains until mainchain IBD is completed?

The sidechains cannot connect to the mainchain until the mainchain has completed initial block download and is completely synced up to the main chain tip. If someone starts the sidechains when the mainchain is out of sync they will not be able to do anything and may need to restart / manually re-enable networking once mainchain has synced up.

Instead we could wait to enable the sidechains until the mainchain is synced up. What do you guys think?

UI Misalignment of Titles and Buttons in Drivechain Launcher Sidechain List on Ubuntu

Description

There is a misalignment between the sidechain titles and their corresponding "Run" buttons in the Drivechain Launcher interface. The titles and buttons do not align horizontally, leading to a disjointed and potentially confusing user interface.

Environment

  • OS: Ubuntu 22.04.4 LTS
  • Launcher Version: 1.2

Steps to Reproduce

  1. Open the Drivechain Launcher.
  2. Observe the sidechain list, specifically the alignment of the "Run" buttons relative to the sidechain titles.

Expected Behavior

Each "Run" button should be aligned with its corresponding sidechain title, ensuring a clean and orderly UI presentation.

Actual Behavior

The "Run" buttons are misaligned with their corresponding sidechain titles, with some buttons appearing higher or lower than the title text.

Suggested Fix

  • Adjust the CSS or layout properties to ensure consistent vertical alignment between the titles and buttons.
  • Implement a grid or flexbox layout structure that forces alignment between elements.

Screenshots

names

Additional Context

This misalignment could lead to a less professional appearance of the application and might confuse users, especially when quickly scanning the list of available sidechains to perform an action.

Potential Severity

Low - This issue primarily affects the visual appeal and could slightly impact the usability of the UI, but it does not hinder the functionality.


Zside is interrupted during download

I'm not sure if this is important, but at about 9% of downloading zSide, an error is thrown in the terminal and the Download button becomes active again image

Cosmetic error on reset on Mac

Screen.Recording.2024-05-21.at.4.54.29.PM.mov

On both granular and full reset, this same behavior occurs. Appears fully cosmetic. Once the window is reopened, the launcher behaves as normal

Add AppImage

Suggestion in add AppImage for Drivechain Launcher

Inconsistent File Path Separator Display in Drivechain Launcher on Windows 10

Description

The Drivechain Launcher on Windows 10 is displaying file paths with forward slashes (/) instead of the expected backward slashes (\) for Windows file systems. This inconsistency might lead to confusion or issues when users copy and paste these paths in environments that expect the typical Windows path format.

Environment

  • OS: Windows 10
  • Launcher Version: 1.2.0
  • Component: File path display

Steps to Reproduce

  1. Open the Drivechain Launcher.
  2. Navigate to the 'Settings' to view the 'Application Data Directory' and 'Drivechain Data Directory' paths.
  3. Observe the format of the file paths displayed.
  4. Go to the 'BitAssets Info' section and observe the file paths displayed there.

Expected Behavior

File paths should display with backward slashes (\) as is standard on Windows.

Actual Behavior

File paths are displayed with forward slashes (/).

Screenshots

1
2

Additional Context

While this has not yet led to any operational issues, it is a deviation from standard Windows path conventions and may cause problems when paths are used in Windows Explorer or command-line interfaces.

"Reset Everything" operation fails when Launcher is open on Windows 10

Issue: "Reset Everything" operation fails when Launcher is open on Windows 10

photo_2024-03-13_09-05-46

Environment:

  • OS: Windows 10
  • Launcher Version: 1.2.0
  • Affected Component: Reset Everything feature

Steps to Reproduce:

  1. Open the Launcher on Windows 10.
  2. Click on 'Reset Everything' button.
  3. Notice the prompt indicating the operation can't be completed because a file is open.

Expected Behavior:
The "Reset Everything" feature should reset all settings without requiring the Launcher to be closed, similar to its behavior on Ubuntu.

Actual Behavior:
A prompt appears stating that the operation can't be completed because a file that would be affected by "Reset Everything" is open. The operation completes only after closing the Launcher.

Additional Context:

  • This issue does not occur on Ubuntu, where the "Reset Everything" button resets everything without needing to close anything or the operation not completing.

Add zCash and Ethereum unique data dirs to chain_providers.cfg

Presently the location of Zcash (.zcash-drivechain on Linux and ZcashDrivechain on macOS) and Ethereum (.ethereum on both) are hardcoded in a function that deletes them specifically during a reset everything call. They should be added to chain_providers.cfg so that they can be called using chain_providers for clarity and robustness.

UI Alignment Issues with Sidechain Names and Descriptions in Drivechain Launcher on Windows 10

Description

There are alignment inconsistencies in the Drivechain Launcher UI, where the sidechain names and their corresponding descriptions become misaligned when the download progress bar appears. This creates a potentially confusing and visually unappealing user experience.

Environment

  • OS: Windows 10
  • Launcher Version: 1.2.0
  • Component: Sidechain listings in the UI

Steps to Reproduce

  1. Navigate to the sidechain section in the Drivechain Launcher.
  2. Initiate a download for a sidechain, such as 'Bit-Ethereum'.
  3. Observe the alignment of the sidechain names and descriptions before and during the download process.

Expected Behavior

The sidechain names and their descriptions should maintain proper alignment regardless of the state of any adjacent UI elements, like a download progress bar.

Actual Behavior

When a download is initiated and the progress bar appears, the descriptions for the sidechains are pushed to the right, misaligning them with the sidechain names. In addition, certain sidechain names are longer than others and subsequently move the descriptions out of vertical alignment. Lastly, when certain sidechains are running, additional information will be displayed alongside their name, leading to further misalignment.

Screenshots

x
y
misalign

Additional Context

The issue seems to be related to the responsive design not accounting for the dynamic changes when the download progress bar is introduced to the UI.

Inconsistent Progress Bar Lengths Causing Misalignment on Windows and Linux

Issue description

The progress bars representing download percentages in the Launcher are displaying with inconsistent lengths, leading to a visual misalignment. This issue is observable on both Windows and Linux platforms. The misalignment is not related to any particular scaling settings or screen resolutions as it has been replicated on various setups.

Steps to reproduce

  1. Start the application on a Windows or Linux machine.
  2. Begin a download process that triggers the progress bars.
  3. Observe that the progress bars, which should align perfectly, have different lengths.

Expected behavior

Each progress bar should match the length of the container element, ensuring visual consistency and proper alignment, regardless of the percentage value they represent.

Actual behavior

Progress bars are misaligned due to varying lengths, which seems to be unrelated to the actual download percentages they are indicating.

Screenshots/Video

image

Additional information

  • The issue has been confirmed on multiple devices.
  • There has been no recent changes to the UI code that might have caused this inconsistency.

Update Bitnames, Bitassets, Thunder start scripts to to accomodate new settings

Current bitnames start.sh:

/home/L2L/drivechain_launcher_sidechains/Bitnames/bitnames-latest-x86_64-unknown-linux-gnu -d /home/L2L/drivechain_launcher_sidechains/Bitnames/data -n 127.0.0.1:38040 -m 127.0.0.1:8332 -u user -p password -r 127.0.0.1:19020

What it should be updated to:

/home/L2L/drivechain_launcher_sidechains/Bitnames/bitnames-latest-x86_64-unknown-linux-gnu -d /home/L2L/drivechain_launcher_sidechains/Bitnames/data -u user -p password

Unzipping hanging on Fedora

User reported error wherein attempting to unzip sidechains after downloading will sometimes hang. ethSide reportedly unzipped without issues. Will test and add further details.

Buttons to Cycle Quotes Not Functional in Drivechain Launcher on Ubuntu

Description

When using the Drivechain Launcher on Ubuntu, the buttons designed to cycle through quotes are not functional. Clicking these buttons does not change the displayed quote, which affects the user's ability to interact with this feature.

Environment

  • OS: Ubuntu 22.04
  • Launcher Version: 1.2

Steps to Reproduce

  1. Open the Drivechain Launcher on Ubuntu 22.04.
  2. Attempt to click the buttons intended for cycling through quotes.
  3. Observe that the displayed quote does not change, and no action seems to be triggered by the clicks.

Expected Behavior

Clicking on the buttons to cycle quotes should seamlessly transition between different quotes, providing users with a variety of informational or motivational content.

Actual Behavior

  • The buttons intended to cycle through quotes do not function upon being clicked. No action is observed, and the displayed quote remains unchanged, hindering the user experience by not providing expected functionality.

Suggested Fix

  • A thorough investigation into the event handling mechanism for the quote cycling buttons is recommended. This should include ensuring that the buttons are properly linked to their event handlers and that these handlers are compatible with Ubuntu 22.04.

Screenshots

Screencast.from.03-08-2024.09.37.52.AM.webm

Shut down all chains nicely on launcher exit?

This is more of a question than an issue. Should the launcher send a shutdown signal to the mainchain and all running sidechains when the user exits? Currently they all keep running if the launcher is closed for me

UI Alignment Issues with Sidechain Names and Descriptions in Drivechain Launcher on Ubuntu

Description

There is a misalignment between the sidechain titles and their corresponding "Run" buttons in the Drivechain Launcher interface. The titles and buttons do not align horizontally, leading to a disjointed and potentially confusing user interface.

Environment

  • OS: Ubuntu 22.04.4 LTS
  • Launcher Version: 1.2

Steps to Reproduce

  1. Open the Drivechain Launcher.
  2. Observe the sidechain list, specifically the alignment of the "Run" buttons relative to the sidechain titles.

Expected Behavior

Each "Run" button should be aligned with its corresponding sidechain title, ensuring a clean and orderly UI presentation.

Actual Behavior

The "Run" buttons are misaligned with their corresponding sidechain titles, with some buttons appearing higher or lower than the title text.

Suggested Fix

  • Adjust the CSS or layout properties to ensure consistent vertical alignment between the titles and buttons.
  • Implement a grid or flexbox layout structure that forces alignment between elements.

Screenshots

Screencast.from.03-08-2024.09.37.52.AM.webm

Additional Context

This misalignment could lead to a less professional appearance of the application and might confuse users, especially when quickly scanning the list of available sidechains to perform an action.

Potential Severity

Low - This issue primarily affects the visual appeal and could slightly impact the usability of the UI, but it does not hinder the functionality.


Error loading withdrawal vote & BMM settings

error

Getting this error message, but haven't really done anything.

  1. Started Bitcoin + BIPs 300/301
  2. Started Testchain
  3. Closed both
  4. Started Drivechain again
  5. This error message came up

Using Windows 10 Home

"Run" Buttons Allow Multiple Presses Causing Errors and Multiple Instances on Windows 10

Description

The "Run" button in the Drivechain Launcher is not disabled after the initial click, which allows for multiple presses. For the Drivechain, this results in error pop-ups related to data directory locks. For other sidechains, it leads to multiple instances opening, which could cause significant problems if interacting with a live testnet.

Environment

  • OS: Windows 10
  • Launcher Version: 1.2

Steps to Reproduce

  1. Open the Drivechain Launcher.
  2. Click the "Run" button for the Drivechain multiple times quickly.
  3. Observe the error messages indicating that the data directory is already in use.
  4. Repeat the process with other sidechains and notice multiple instances opening.

Expected Behavior

The "Run" button should provide immediate feedback and be disabled upon the first press, preventing further presses until the initial action is complete or a timeout occurs. This would prevent the errors for the Drivechain and the opening of multiple instances for other sidechains.

Actual Behavior

  • For the Drivechain: Multiple error pop-ups indicate that a lock on the data directory cannot be obtained because Drivechain is already running.
  • For other sidechains: Multiple instances of the sidechain are initiated, which could lead to serious issues, especially if there's a live testnet involved.

Suggested Fix

  • Implement immediate visual feedback on the "Run" button, such as disabling the button, changing its color, or showing a spinner or progress indicator.
  • Ensure that only one instance of the process can run at a time, potentially by checking for active instances before initiating another.

Screenshots

err

Additional Context

Allowing multiple instances to run simultaneously could lead to unexpected behavior, particularly in environments where sidechains are connected to a live testnet, risking data integrity or network stability.

When starting Qt GUI sidechains (like testchain) the launcher does not know about syncing mainchain block cache

When the Qt based sidechains like testchain start, they contact mainchain and synchronize a cache of mainchain block information. Since the launcher doesn't know about this it looks like it has frozen after hitting run on testchain until the mainchain block cache is synchronized.

We could check for this error message:

{ "result": <null>, "error": { "code": -28, "message": "Updating mainchain block cache..." }, "id": 1 }

or just wait for a minute, as syncing is pretty fast.

Add quote to Launcher

Ambition is common to all men; and those, who are unable to rise to distinction, are at least willing to reduce others to their own standard.

-- William Godwin

UI Misalignment of Titles and Buttons in Drivechain Launcher Sidechain List on Windows 10

Description

There is a misalignment between the sidechain titles and their corresponding "Run" buttons in the Drivechain Launcher interface. The titles and buttons do not align horizontally, leading to a disjointed and potentially confusing user interface.

Environment

  • OS: Windows 10
  • Launcher Version: 1.2

Steps to Reproduce

  1. Open the Drivechain Launcher.
  2. Observe the sidechain list, specifically the alignment of the "Run" buttons relative to the sidechain titles.

Expected Behavior

Each "Run" button should be aligned with its corresponding sidechain title, ensuring a clean and orderly UI presentation.

Actual Behavior

The "Run" buttons are misaligned with their corresponding sidechain titles, with some buttons appearing higher or lower than the title text.

Suggested Fix

  • Adjust the CSS or layout properties to ensure consistent vertical alignment between the titles and buttons.
  • Implement a grid or flexbox layout structure that forces alignment between elements.

Screenshots

names

Additional Context

This misalignment could lead to a less professional appearance of the application and might confuse users, especially when quickly scanning the list of available sidechains to perform an action.

Potential Severity

Low - This issue primarily affects the visual appeal and could slightly impact the usability of the UI, but it does not hinder the functionality.


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.