`[New]` CLI & Service Application
Description
This PR is to focus on the a new CLI & service. Also to fix the problems and bottlenecks at hand with the current CLI. The goal is not to change anything in core at least in this PR. But in the future will be changing Plugins and adding a WebServer in the CLI that Plugins can tie into.
How Basic Design Works
The way this is going to work is with two applications. One that is a Service that can run in linux with systemd and in windows as a WindowsService. The other application is a command-line based app that talks to the ServiceApp by using NamedPipes/IPC systems.
Features
- [x] All things in current CLI
- [x] Command-line based (With Prompt)
- [x] IPC NamedPipes (For Service)
- [ ] Multi-Node support
- [x] Full Node
- [ ] Lite Node
- [ ] Development Node
- [x] Consensus Node
- [ ] Debug Server
- [ ] Smart Contract Tracer
- [x] Run as a OS Service
- [ ] Offline mode
- [ ] New archive/backup file format
- [ ] Detailed mass logging - anything & everything
- [ ] Plugin automation installation (download from
nuget) - [x] Expanded configuration file - (
config.jsonremoved) - [ ] New wallet management system
More to come...
Your Feedback is Requested!
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
How Has This Been Tested?
- Unit Tests
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules
Does it solve #3014?
@roman-khimov Sure does
@shargon @roman-khimov @Jim8y @vncoelho
Any feature requests?
Very excellent work, i will test it later.
@shargon @roman-khimov @Jim8y @vncoelho
Any feature requests?
@superboyiii
I don't have any specific feature requests, if it solves #3014 and makes it easier to run node for various operators, it's good for me.
@Jim8y still not finished. Just want to know the features up front as I'm building
@roman-khimov Yes it will be very easy and configurable.
why it shows "Error: Key" when I call help in the CLI command line
@Jim8y This is a service, i haven't created CLI application yet to talk to the service. Just wanted to know what additional features you want beside the ones in the currently CLI as im building the application.
I think command like ./NeoService --openwallet /data/wallet.json to execute will be cool. People will never have to go into neo-cli to run command line. Neo-CLI can be a pure server in backend then. We can have much more like: --config config.json, --rpcport 10332, --wsport 10334, --enable-consensus, etc.
I think command like
./NeoService --openwallet /data/wallet.jsonto execute will be cool. People will never have to go into neo-cli to run command line. Neo-CLI can be a pure server in backend then. We can have much more like: --config config.json, --rpcport 10332, --wsport 10334, --enable-consensus, etc.
It should work with the current commands
@superboyiii @shargon it will be same commands with additions. But backend will be a service. There will be two applications one called neo-cli that we know and love; the other one called neo-host.
neo-host is the node service application that neo-cli communicates with through named pipes or on linux with unix sockets. Also neo-host can run as standalone service in the console. But you would still need to run neo-cli to talk to it.
Running neo-host as a standalone console application will show all the logs in the console instead of syslog or windows event log depending on your operating system.
Also this can run in azure services or any cloud provider.
Just to give you all an update. I'm currently developing a TraceApplicationEngine for the vm. A long with a new blockchain backup system like the chain.*.acc.zip. Old format is still supported.
@shargon @roman-khimov @Jim8y @vncoelho Inputs please...
The new neo-cli prompt will have different color schemes for different modes based off the mode you are in.
Modes
-
Developer : Compiled with
debugvsreleasebinary. - Failsafe : When you can't access or connect to the node or needs maintenance.
-
Debug : Developement mode (like how
neo-expressworks) -
Consensus: Running as a
consensusnode. - ColorBlind: For visually impaired.
Here is an Example (ANSI Terminal)
Here is an Example
Now we know N4 is blue.
As I've said, I'm OK with just about anything that fixes #3014, my only worry now probably is that we have a +3.6K PR again.
@shargon @vncoelho @Jim8y
The code in this PR is getting really big... are you all ok with that? It not even close to being finished or even having half the features the CLI is going to have.
I am ok @cschuchardt88 , if there is any core change maybe we migrate to another PR later. If changes are neo-node only I am fine.
But maybe we should think about merging it on 3.9.0.
This is a new project application all together. I hope it will be done by than... I'm solo rebuilding the whole CLI system along with new features...
Update - IPC Snapshot Command Prompt
@Jim8y @shargon
Should I just setup this PR up for review? It's Incomplete but this will become really big PR. I got the basic layout scaffold setup.
@Jim8y @shargon
Should I just setup this PR up for
review? It's Incomplete but this will become really big PR. I got the basic layout scaffold setup.
create a branch and break this pr into smaller ones. That is currently the only way to make it work.
@Jim8y @shargon Should I just setup this PR up for
review? It's Incomplete but this will become really big PR. I got the basic layout scaffold setup.create a branch and break this pr into smaller ones. That is currently the only way to make it work.
I'm ok with other branch. But how am I to break down PR for something that is built already. I'm not understanding that part.
an issue that list your plan, add few classes that has no dependency issues on every pr. i am not trying to make it hard for you, just current coredev protocol wont work well on long pr.
See PR #3372 PAIRT-1 to PART-7