Code Monkey home page Code Monkey logo

gladius-cli's People

Contributors

code-merc avatar kleoken avatar overtfuture avatar speedaemon avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gladius-cli's Issues

Gladius "Create Node" not working

capture
For hours, i have been stuck at
"[Gladius-Node] Creating Node contract, please wait for tx to complete (this might take a couple of minutes)
[Gladius-Node] Transaction: undefined [Pending]"

for longer than 8 hours.

Probable questions:

  1. Have i been accepted by the pool manager?
    No

How to join pool ?

Hello,
I tried to rent my bandwidth but its look like I need a pool. so how can I get it?

Input validation improvements

When entering a pool address or other data, do validation to make sure it really is a pool. This means checking for spaces in front of the pool address, verifying that the contract is actually an instance of a pool contract, etc.

Crash when running `gladius edge` with no parameters

When you run gladius edge it will crash with the following error:

panic: runtime error: index out of range

goroutine 1 [running]:
github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands.edge(0xa11380, 0xa36ff0, 0x0, 0x0)
	/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands/nodeCommands.go:231 +0x5dd
github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra.(*Command).execute(0xa11380, 0xa36ff0, 0x0, 0x0, 0xa11380, 0xa36ff0)
	/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra/command.go:760 +0x2c1
github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xa11840, 0xc42019df58, 0x72467d, 0xa11840)
	/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra/command.go:846 +0x30a
github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra.(*Command).Execute(0xa11840, 0xc42001a0b8, 0x0)
	/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra/command.go:794 +0x2b
github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands.Execute()
	/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands/root.go:30 +0x2d
main.main()
	/home/alex/go/src/github.com/gladiusio/gladius-node/cmd/gladius-cli/main.go:8 +0x20

Add config folder

Add a folder in ~/.config/gladius-cli that stores nodeFile.json, /keys, and a .env

Make status responses more clear

Make the responses more clear when user calls gladius-node status before gladius-node start. Also make it more clear that user isn't technically an edge node if they are not connected to a pool - TEST

Separate generated configuration files and program code

Currently the generated files (gpg keys and nodeFile.json) are stored together with the application code in $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli:

  • $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli/keys
  • $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli/nodeFile.json

The directory and json file should be moved to a different path so we can easily replace the application code and also backup and secure the keys and nodeFile.json.

I propose to do this move in two steps, so we don't break the running beta installations:

1. Step:
Change the program code, so it looks for the keys and the nodeFile.json in $HOME/.gladius-cli

The program is executed with init command:

The init command will still create the files in $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli. Nothing changes here.

The program is executed with any other command:

  1. Look for keys and nodeFile.json in $HOME/.gladius-cli. If valid files are found proceed with execution
  2. If no valid config is found in the first step check $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli. If valid files are found proceed with execution
  3. If no valid config is found inform user to run init and abort program execution

2. Step:
Add the parameter --config (overwriteable by environment variable $CONFIG) which will specify the third directory to look for the files.

When executed with the parameter or env var set the application behaves a little different:

The program is executed with init command and $CONFIG set:

Execute init process but write files to the directory specified in $CONFIG. It's the users task to make sure the program has write permissions to create the directory or create the necessary files inside the directory.

The program is executed with any other command and $CONFIG set:

  1. Look for keys and nodeFile.json in $CONFIG. If valid files are found proceed with execution
  2. If no valid config is found look for keys and nodeFile.json in $HOME/.gladius-cli. If valid files are found proceed with execution
  3. If no valid config is found in the first step check $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli. If valid files are found proceed with execution
  4. If no valid config is found inform user to run init and abort program execution

No way to view what a node is doing

The gladius status command is extremely limited. It claims to be running, but it doesn't indicate what it's actually doing. This command should be updated to provide more useful status information. #

ethPvtKey in plain text

Private key stored in plain text, and can be easy accessible if get access to user(or root) account.

How about hash key, or use encryption?

Logging

add logging in for the ErrorHandler

Add a wallet reset option

if a user their wallet password they should be able to create a new one without having to delete the .config/gladius/wallet directory

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.