-
Notifications
You must be signed in to change notification settings - Fork 224
node: Mode system #853
base: master
Are you sure you want to change the base?
node: Mode system #853
Conversation
Allow to flush the mempool in just 10 blocks.
* typo, comment, code optimization. * optimise code * Update ConsoleColorSet.cs * Update ConsoleColorSet.cs * revert all visiblities * revert change to visibility * remove null check and optimise code * remove null check * Revert some changes * Revert some changes * revert recursion * revert unnessary optimise * revert unnecessary optimise * revert almost all changes that has nothing to do witht typo * revert if statement changes * revert more unnesary optimise code * revert change to using packages order * revert change in wallet * Update neo-cli/CLI/MainService.Contracts.cs Co-authored-by: Shargon <shargon@gmail.com> * Update neo-cli/CLI/MainService.Contracts.cs Co-authored-by: Shargon <shargon@gmail.com> * Update Neo.ConsoleService/ConsoleServiceBase.cs * Update MainService.Node.cs * Update MainService.Node.cs * Update Logger.cs * remove default * remove static * remove static * remove token.cancel * Update MainService.Node.cs * Update MainService.Tools.cs Co-authored-by: Erik Zhang <erik@neo.org> Co-authored-by: Shargon <shargon@gmail.com>
@@ -0,0 +1 @@ | |||
{"name":null,"version":"1.0","scrypt":{"n":16384,"r":8,"p":8},"accounts":[{"address":"NbNRXrkfMyrEyEv2euE63Xxxqkno7xvuk2","label":null,"isDefault":false,"lock":false,"key":"","contract":{"script":"","parameters":[{"name":"signature","type":"Signature"}],"deployed":false},"extra":null}],"extra":null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyone who want to setup a private single node network. such that they can start the private network without modifying anyting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this given account, they will need to create an account by themself, then config the config.json manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But there is no private key in the wallet. The user still have to create another wallet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot that, will update right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can not, they are of the same name~~~all of them are config.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.xxx.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emmmmmmmmm, good idea, will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.json
config.fs.json
DBFTPlugin.json
ApplicationLog.json
under same folder now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are still in different folders.
The logic of |
Cause |
Co-authored-by: Nicole <43694095+nicolegys@users.noreply.github.com>
In addtion, as you said, relative path is an old issue that also exists in master branch, and it happens not only in the places I mentioned in this pr. I'll create annother issue if needed. |
You dont have to, cause this issue does not exist in the official publish package as it is published in the self-contain mode. |
Co-authored-by: Nicole <43694095+nicolegys@users.noreply.github.com>
Co-authored-by: Nicole <43694095+nicolegys@users.noreply.github.com>
I have said that this issue also exists when it is published in the self-contain mode. I've tested it both on v3.4.0 and master branch, both on windows and linux. The cause of this issue is, in our code, files are read or generated based on the current execution directory, not the relative directory. And this issue was not raised before because of few usage scenarios, so it's not a high priority. Please be more careful. |
@shargon Could you review again? |
@@ -14,6 +14,10 @@ expect { | |||
timeout { exit 1 } | |||
} | |||
|
|||
sleep 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 seconds is required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, has to wait for 5 seconds, at least
@Liaojinghui Please solve conflicts |
Resolved |
updated to work under neo-project/neo-modules#709
This pr implements #863
Mode system is intended to help developers to save and load neo node configurations.
mainnet
mainnet
mode:testnet
mode:privatenet
mode:when user load into the privatenet mode, a single node blockchain network will be setup with the default primary account NbVj8GhwToNv4WF2gVaoco6hbkMQ8hrHWP. Please note that the secret key of this account is publicly available to everyone,
do not send any asset to this account in main net
you will lose your token and we will not be responsible for that.
Create your own mode
You can config your own network by modifying the
config.json
andconfig.fs.json
in the root directory, as well as theconfig.json
of Plugins. Then runmode save [mode name]
to save your configuration as a mode. If the name you assigned is an existing mode, existing mode will be updated.