nicenode / nice-node Goto Github PK
View Code? Open in Web Editor NEWRun a node — just press start
Home Page: https://www.nicenode.xyz
License: MIT License
Run a node — just press start
Home Page: https://www.nicenode.xyz
License: MIT License
https://speedometer.tools/ and https://github.com/NiceNode/speedometer should be BenchBuddy and
src/main/dialog
https://github.com/NiceNode/nice-node/blob/main/src/main/dialog.ts needs to support language translations. Take a look at how they are done in src/main/menu
https://github.com/NiceNode/nice-node/blob/main/src/main/menu.ts
Example: this should be in Spanish because the app is set to Spanish
Monitor node logs for errors or warnings and show those to the user
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.
The ability to only create a single client instead of both at the same time.
{
"platform": "win32",
"platformRelease": "10.0.19045",
"arch": "x64",
"totalMemory": 17106214912,
"niceNodeVersion": "2.2.0-alpha"
}
Docker only uses about half of a computers hardware resources by default. After it is installed, we should notify users to increase the allocation or if possible, NiceNode can do this automatically.
Windows (we use WSL2 backend for Docker):
https://docs.docker.com/desktop/settings/windows/#advanced
Installing a dependency using the terminal is required to run an App Image on Ubuntu 22. See: https://askubuntu.com/questions/1403811/appimage-on-ubuntu-22-04
NiceNode should use Ubuntu's recommended format for app installation, which appears to be using Snapcraft https://ubuntu.com/desktop/developers
More info on Snap and electron apps:
https://snapcraft.io/#electron
https://www.electron.build/configuration/snap
Idea courtesy of @wolfderechter
Show the error message in the UI, so the user can take an action to fix the error or report it to the devs.
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:
openAtLogin
openAsHidden
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!
-f json
flag will be used with BenchBuddy so that NiceNode can easily parse the output!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.
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.src/main/state/nodePackages.ts
called getUserNodePackagesWithNodes()
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;
});
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.
Nimbus does not store data in the location that is shown in the UI.
The issue is occurring on all platforms.
{
"platform": "linux",
"platformRelease": "6.2.0-35-generic",
"arch": "x64",
"totalMemory": 33532297216,
"niceNodeVersion": "1.0.0-alpha"
}
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
Currently, when launching NiceNode, users are warned against running it and have to make a few extra steps.
Code Signing requires $99 for macOS and ~few hundred $ for Windows.
See electron-build's code-signing docs: https://www.electron.build/code-signing.html
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:
<LogMessage />
component to show and test the component without rendering the entire app and running podman and a node. use npm run storybook
to testExample:
Replace the gray box on the right with <FloatingButton variant="icon" iconId="copy" />
The users can currently select the text to copy and paste manually and should still be able to.
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.
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).
Implement a language selection framework for the front-end which easily allows for the addition of new languages.
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/
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
When a user's computer restarts, NiceNode should start in minimized mode.
Iff docker is installed, allow user to run node as docker container.
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
Currently, calls are still made and silently fail
The Docker command generated for a geth node --http.api 's includes capitolized letters that make the command fail on these options, "--http.api Eth,Net,Web3,Debug" should be lower case -"--http.api eth,net,web3,debug"
Linux using the latest .deb.
The Prysm beacon node option does not have any settings or config available!
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.
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
Start a geth node and try to view the logs. It shows a pm2 error.
This is a tricky one to fix.
Add Node
to t('AddNode')
. See some of our React components for real examples.How to do this:
src/renderer
and any text that is shown to the user (in a render
method of a component .tsx
file)<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.
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.
{
"platform": "win32",
"platformRelease": "10.0.17763",
"arch": "x64",
"totalMemory": 137359765504,
"niceNodeVersion": "1.5.1-alpha"
}
Scroll bars do not automatically get themed
Something similar to Chrome's dark mode would look good. In our case, the background could match the same background as everything else.
Suggested by @wolfderechter
The sync percentage is inaccurate. Currently it uses the current and estimated highest block from this API: https://eth.wiki/json-rpc/API#eth_syncing
"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'
This will allow for selecting a new jwtsecret file for a node
Ensure the directory/folder selector (storage location) still works.
There are already test cases for downloading and extracting geth. Add an additional test to start & stop geth.
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.
What went wrong and what should have happened?
The geth binary can't start. I've opened an issue with the Geth team to see if they will take this up :)
ethereum/go-ethereum#25261
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:
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.
please include screenshots or a short screen recording
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!
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.
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'
}
{
"platform": "win32",
"platformRelease": "10.0.19045",
"arch": "x64",
"totalMemory": 17087881216,
"niceNodeVersion": "1.5.1-alpha"
}
Install Docker Desktop for the user. This should be possible on all platforms. Will add more details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.