GithubHelp home page GithubHelp logo

nicenode / nice-node Goto Github PK

View Code? Open in Web Editor NEW
178.0 7.0 26.0 30.92 MB

Run a node — just press start

Home Page: https://www.nicenode.xyz

License: MIT License

TypeScript 59.25% JavaScript 40.25% Shell 0.01% CSS 0.07% MDX 0.02% HTML 0.02% Dockerfile 0.38%
ethereum decentralized-applications web3 nodes

nice-node's People

Contributors

corn-potage avatar dependabot[bot] avatar gasolin avatar gathin23 avatar jgresham avatar kallydev avatar kamegoro avatar kayla-henrie avatar mv-kr avatar omahs avatar soft-boy avatar wtfsayo avatar xiaolou86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nice-node's Issues

Opt-out of error reporting (Sentry)

Feature details

Make error reporting opt-out
We will make error reporting opt-in once we have more testing in place for NiceNode and once the app becomes more stable.

Media content for the redesign release

When public announcing the major redesign, we will need screenshots, short videos, GIFs, etc. to share social media and add to our website.

Some assets that you could create:

  • GIFs of features
  • Short videos of the app with an intro or outro including NiceNode and our logo
  • Other content you have ideas of!

Automatically start NiceNode on reboot [Win & Mac]

Feature details

  • When the users changes the Setting toggle in the UI, save the value and call this electron API https://www.electronjs.org/docs/latest/api/app#appsetloginitemsettingssettings-macos-windows (note: this Electron API doesn't support linux yet). set openAtLogin
  • Add an additional toggle to start NiceNode hidden on reboot. By default it starts visible on reboot. If NiceNode is not selected to start on reboot, this toggle should be hidden from the user. set openAsHidden

Evaluate a user's hardware and setup using BenchBuddy

Feature details

Users want to know if their setup is good enough to run a node. We currently check disk size, cpu counts, etc, but we do not do any speed tests. SSD Input Ouput per second (IOPS), cpu speed, and internet speed are all easily checked with (fromerly Speedometer) BenchBuddy!

  • For now, this will be initiated through the system monitor screen or through a menu item. (inform the user that all nodes should be stopped before running the test, but don't stop the user)
  • It will then send an ipc command to the main process to run BenchBuddy (currently named speedometer https://github.com/NiceNode/speedometer)
  • The -f json flag will be used with BenchBuddy so that NiceNode can easily parse the output!
  • The results of speedometer will be shown to the user in System Monitor or in a modal/notification

Daily event report of all of a user's node packages

Feature details

This is useful to know what nodes people are running, which versions they're using, the clients they have selected, etc. This is extremely helpful for the contributors to both know what users use and better allocate time, and it is vital data for use for applying for grants.

Technicals

  1. Create cron job when app opens using https://www.npmjs.com/package/cron to run every day at midnight and run the function on create as well.
  2. The function will do the following:
  3. From store in src/main, retrieve the value for lastDailyReportTimestamp to see if a daily report has been sent within the previous day (can use 23 hours & 59 minutes to account to make sure we don't miss a day). If it hasn't been a day, do nothing.
  4. If it has been more than a day, call the function below:
  5. create a new function in src/main/state/nodePackages.ts called getUserNodePackagesWithNodes()
  6. It should call getUserNodePackages and getUserNodes and for each nodePackage, loop over the services and find the corresponding node. Effectively we are just merge parents with their children. It is already done on the front-end but should be done on the backend. The function will look similar to :
userNodePackages.forEach(nodePackage =>  
    const nodes = []
    nodePackage.services.map((service) => {
      const nodeId = service.node.id;
      const node = userNodes?.nodes[nodeId];
      nodes.push(node)
    });
    nodePackage.nodes = nodes;
 });

  1. Then call `src/events.reportEvent('DailyUserReport', userNodePackages);

The data sent to mix panel will look something like:

nodes : array
  status:
  version:
  network:
  services:
  nodes: array
    status:
    name:
    version:
    otherConfig:
....

I think the cron job should be "deleted" when the app closes, but double-check so that we don't increase the number of cron jobs everytime the user opens the app.

Frequently Asked Questions (FAQ) page for nicenode.xyz

Feature details

New config settings don't show up unless node is deleted

Problem details

Current Behavior:
When we add new config settings in the node settings JSON, the new settings aren't displayed in the settings page. If I delete the node without deleting the node chain data, and re-add the node, the new setting shows up.

Expected behavior (?):
When a user starts the app after an app update, and opens settings for a node, new config settings should display.

Environment: Ubuntu

[UI/React] Copy button for log message

Feature details

A copy button shows on hover of the individual log and copies the log's message when clicked. It should "float" above the message all the way on the right side of the log message.

Requirements:

  • the button should only show if the user is hovering over that specific log line
  • clicking the copy button should copy the log to the "clipboard" and work on Mac, Win, Linux
  • bonus: create a storybook story for the <LogMessage /> component to show and test the component without rendering the entire app and running podman and a node. use npm run storybook to test

Example:
Replace the gray box on the right with <FloatingButton variant="icon" iconId="copy" />
Screenshot from 2023-10-12 09-48-30-mh

The users can currently select the text to copy and paste manually and should still be able to.

Why it is important

Many users may have issues running various nodes. They will likely want to copy and paste specific logs to send to the node developer teams or to paste into github issues for the node teams. A quick and easy copy and paste button will help with this.

Ubuntu support for start on boot

Feature details

A .desktop file needs to be created in /home/<user>/.config/autostart/ and kept update with the NiceNode AppImage file path and version.

Example at /home/johns/.config/autostart/nice-node.desktop

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=NiceNode
Exec=/home/johns/Applications/NiceNode-0.0.6-alpha_bcf6e644054f51b51dd377e42273d2c6.AppImage
Icon=/usr/lib/expressvpn/icon.png
Terminal=false

^ This file path is where AppImageLauncher puts AppImages after "Integrating". The path could be different for each user, so the path needs to found by the main process and kept updated. Ex. The path could also be /home/johns/Downloads/NiceNode-0.5.1-alpha.AppImage. It doesn't appear like the icon path matters (tbd on that).

Language selection w/ initial support for Espanol

Feature details

Implement a language selection framework for the front-end which easily allows for the addition of new languages.

  • Detect the user's local language and select it if available (fallback to English)
  • Implement for English and Espanol
  • Should be simple to add a new language
  • Setup Crowdin to allow contributors to do manual translations!

Warn users of OS or hardware incompatibility

Feature details

Docker Desktop isn't support on certain OS versions or hardware. We need to warn the user that their hardware or OS is not compatible and to urge them to look-into updating software or hardware (if possible).

Docker Windows reqs https://docs.docker.com/desktop/install/windows-install/

  • Windows - old version. Windows 11 64-bit: Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
    Windows 10 64-bit: Home or Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.

  • Windows - BIOS doesn't support virtualization

Docker Mac reqs https://docs.docker.com/desktop/install/mac-install/

  • MacOS - old version. macOS must be version 11 or newer. That is Big Sur (11), Monterey (12), or Ventura (13).
  • MacOS - VirtualBox must not be installed

Automated Docker install on Linux (Ubuntu 22)

Reference #34 for Windows and Mac install

Steps I onced used to install on Ubuntu

// rm prev versions
ensure lsmod | grep kvm returns something lol
virtual box > system > processor > enable kvm-/amd-v and PAE/NX!
// I dont think I needed this?
ls -al /dev/kvm
sudo usermod -aG kvm $USER
modprobe kvm
modprobe kvm_amd

// output (before working)
johns:~/dev/nice-node$ lsmod | grep kvm
kvm_amd               155648  0
kvm                  1028096  1 kvm_amd
ccp                   102400  1 kvm_amd

//qemu
sudo apt-get install qemu-kvm qemu

// docker repositories
// https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
sudo apt-get update
 sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

// download deb

// install
sudo apt-get update
sudo apt-get install name-rel.deb // change name-rel


// start on login
systemctl --user enable docker-desktop
// launch docker desktop
systemctl --user start docker-desktop
// accept license

// debugging health-check
/opt/docker-desktop/bin/com.docker.diagnose check

Add node modal is laggy/buggy

Problem details

On slightly slower machines, the add node modal is laggy and buggy.

It is slow to load
Node icons load slowly
Node requirements don't always show up or even load

Fuzzy log search

Feature details

Right now the log search filter is an exact match. Use an npm package to accomplish this or implement your own algoritm. Shouldn't impact performance too much. Include the runtime of the fuzzy search.

  • Ignore case - A search for "error" should return logs with "... Error ... "
  • Char off-by-one - a search for "eror" should return logs with " ... error ... "

Current line of code with the exact match log.includes(searchTerm) at https://github.com/jgresham/nice-node/blob/f01558eb32e622a48b3aa1b8493357e646aa9a93/src/renderer/Generics/redesign/LogMessage/Logs.tsx#L105

Geth logs do not work

Problem details

Start a geth node and try to view the logs. It shows a pm2 error.
This is a tricky one to fix.

Convert all strings to language translation strings [React]

Feature details

  • All strings in React components use language translation strings. Ex. convert Add Node to t('AddNode'). See some of our React components for real examples.

How to do this:

  1. Find the strings (words or sentences) that are in english only
    Open the app and change languages from English to another and take note of all the text that hasn't been converted to the other language and look through all of the components in src/renderer and any text that is shown to the user (in a render method of a component .tsx file)
  2. Convert the code so that the string is translated before being shown to the user. Example, change:
<Button label="Next" />

to

const { t } = useTranslation();
...
<Button label={t('Next')} />

Live code example: https://github.com/jgresham/nice-node/blob/3b24921c261ec52f86857a5e31c45702294c57a0/src/renderer/Generics/redesign/Alert/Alert.tsx#L72
3. Add the English version of the text to one of the files in src/assets/locales/en here https://github.com/jgresham/nice-node/tree/3b24921c261ec52f86857a5e31c45702294c57a0/assets/locales/en. If the text is specific to NiceNode, put it in translation.json, if the text is used in a generic component (not specific to NiceNode) put it in genericComponents.json. Depending on which file you put it in, you will need to pass the filename to useTranslation like so const { t } = useTranslation('genericComponents');

When this work is done, Johns will upload the .json files to crowdin.com and anyone can come and translate the English to another language, which can then be used in NiceNode.

Status: error running

Problem description

After update to new version, Geth stops with error running.

"Geth Logs

Newest logs at the top
'pm2' is not recognized as an internal or external command,
operable program or batch file."

Any help would be appreciated.

For NiceNode developers

{
"platform": "win32",
"platformRelease": "10.0.17763",
"arch": "x64",
"totalMemory": 137359765504,
"niceNodeVersion": "1.5.1-alpha"
}

Style scroll bars (dark mode) [CSS & React]

Feature details

Scroll bars do not automatically get themed

  • Scroll bars should match the dark mode styling

Captura de Pantalla 2022-12-02 a la(s) 4 49 38 p m

Something similar to Chrome's dark mode would look good. In our case, the background could match the same background as everything else.
Captura de Pantalla 2022-12-02 a la(s) 4 57 38 p m

Suggested by @wolfderechter

"Restart nodes after reboot" or "start nodes on login"

Feature details

"Restart nodes after reboot" or "start nodes on login", for all nodes that the user left running before restart and before logging-out.

Technicals
Electron has an API to register callbacks for power events https://www.electronjs.org/docs/latest/api/power-monitor

We don't currently save if a user stopped a node or not. If a user manually stops a node, then we do not want to automatically start that node ever. We can introduce a new node property stoppedBy with values 'user' | nice-node' | 'shutdown' | 'crash'

Tests: Test start & stop geth

Feature details

There are already test cases for downloading and extracting geth. Add an additional test to start & stop geth.

Auto-updates (with user confirmation)

Feature details

  1. Notify users if there is an update.
  2. Warn users that node will be restarted to install the update.
  3. No automatic updates in the background without user's consent as this seems like a security vulnerability.

Externally connected SSDs

Feature details

Right now NiceNode allows a user to run a node and select an externally connected device for the node's storage. However, there are a few changes needed.

  1. NN should scan for externally connected SSDs before showing storage warnings. Right now it just looks at storage which the OS is installed on.
  2. When a user is adding a node and the Operating System storage does not have enough storage, NN should prompt a user to use an external SSD, if an external SSD is connected.
  3. NN should also suggest external SSDs as an option in Hardware Requirements in the app and on the docs website. This is going to be a very appealing option for our targeted users (those who don't want to open their computer to add storage). Also external SSDs are a great option for those who might move their node between computers.

Following Development Steps to Start App Throws Errors

Problem details

What went wrong and what should have happened?

I'm trying to run the application from a git clone of the repository by following the steps outlined in the README (I wanted to help contribute the the project if possible). After cloning the repo I created a .env file with the values indicated in the README. I then ran npm install and npm start from the repo's root directory.

When I view the app in the browser I receive the following errors:

image

image

I am attempting to build and run the application in a podman container running on an Ubuntu 22 host. There is plenty of storage and RAM available.

User defined "Default node storage location"

Feature details

In the main app preferences, a user can set a default node storage location. This location will be used when adding a new node and for "disk space low" notifications. You can re-use the directory(folder) selection code from the DynamicSettings code.

Good First Issue - if someone wants to just work on the UI side!

Simple controls for changing node configuration

Feature details

Radio buttons, toggles, switches, drop downs, etc. to change the node config (runtime input flags). Inspiration can be Tesla's driving controls UI.

Special cases such as http and data directory should warn the user that making these changes will disable certain NiceNode functionality.

Default nethermind install fails to start.

Problem description.

Walked through default install, chose nethermind. Start fails. Services.msc shows docker service is running tho.

Here is relevant logs section:

{
killed: false,
code: 1,
signal: null,
cmd: 'docker pull nethermind/nethermind',
stdout: 'Using default tag: latest\n',
stderr: 'error during connect: This error may indicate that the docker daemon is not running.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/create?fromImage=nethermind%2Fnethermind&tag=latest": open //./pipe/docker_engine: The system cannot find the file specified.\n',
innerError: Error: Command failed: docker pull nethermind/nethermind
error during connect: This error may indicate that the docker daemon is not running.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/create?fromImage=nethermind%2Fnethermind&tag=latest": open //./pipe/docker_engine: The system cannot find the file specified.

  at ChildProcess.exithandler (node:child_process:406:12)
  at ChildProcess.emit (node:events:394:28)
  at ChildProcess.emit (node:domain:475:12)
  at maybeClose (node:internal/child_process:1064:16)
  at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
  at Process.callbackTrampoline (node:internal/async_hooks:130:17) {
killed: false,
code: 1,
signal: null,
cmd: 'docker  pull nethermind/nethermind'

},
level: 'error',
service: 'nice-node-service',
timestamp: '2022-12-17T07:06:11.992Z'
}

For NiceNode developers

{
"platform": "win32",
"platformRelease": "10.0.19045",
"arch": "x64",
"totalMemory": 17087881216,
"niceNodeVersion": "1.5.1-alpha"
}

Docker install

Feature details

Install Docker Desktop for the user. This should be possible on all platforms. Will add more details.

  • Windows
  • Mac
    Edit: Not implementing for Linux now. Reasoning: Install on Linux is complicated and Linux users are likely technical enough to install on their own.
    #51

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.