Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blockchain Storage Path #315

Merged
merged 8 commits into from
Nov 15, 2023
Merged

Blockchain Storage Path #315

merged 8 commits into from
Nov 15, 2023

Conversation

chenzhitong
Copy link
Member

close #283

Can we store the blockchain file in the root directory of the program, like neo-cli, instead of store in AppData folder.

@chenzhitong chenzhitong marked this pull request as ready for review November 9, 2023 08:13
@chenzhitong
Copy link
Member Author

@cschuchardt88 @lock9 @RichardBelsum @ixje

Can we store the blockchain file in the root directory of the program, like neo-cli, instead of store in AppData folder.

@cschuchardt88
Copy link
Member

cschuchardt88 commented Nov 9, 2023

Ya i can't see why not. It's annoying to have to goto AppData folder.

Edit:
But you should be using checkpoints to rollback changes and such

@ixje
Copy link
Contributor

ixje commented Nov 9, 2023

That sounds good.

@chenzhitong
Copy link
Member Author

chenzhitong commented Nov 9, 2023

Edit: But you should be using checkpoints to rollback changes and such

@cschuchardt88 I don't get it. What should I do?

@cschuchardt88
Copy link
Member

image

But we should change the directory to base directory.

@ixje
Copy link
Contributor

ixje commented Nov 9, 2023

I'm also not following your checkpoint comments. Perhaps you can describe what we're supposed to see in that screenshot and why that is (or is not) a problem?

As for where to store the data; either in the same folder as the neo-express configuration file, or make it configurable through the neo-express configuration file. And to make it backwards compatible you can say the default is "in the same folder as the config file" if not specified/present in the file.

@Jim8y
Copy link
Contributor

Jim8y commented Nov 10, 2023

Merge?

@Ashuaidehao
Copy link
Collaborator

May need more test to check if the checkpoint command can run normally after this change.
For example, I can copy the "default.neo-express" file to any project folders, then run neoxp commands, it can find the same folder where the chaindata stored, I'm not sure if it still work in this PR.

@chenzhitong
Copy link
Member Author

May need more test to check if the checkpoint command can run normally after this change. For example, I can copy the "default.neo-express" file to any project folders, then run neoxp commands, it can find the same folder where the chaindata stored, I'm not sure if it still work in this PR.

image

work

@cschuchardt88
Copy link
Member

cschuchardt88 commented Nov 10, 2023

As for where to store the data; either in the same folder as the neo-express configuration file, or make it configurable through the neo-express configuration file. And to make it backwards compatible you can say the default is "in the same folder as the config file" if not specified/present in the file.

Can we do this? This is a big change. And there maybe apps that on that location.

@Ashuaidehao
Copy link
Collaborator

May need more test to check if the checkpoint command can run normally after this change. For example, I can copy the "default.neo-express" file to any project folders, then run neoxp commands, it can find the same folder where the chaindata stored, I'm not sure if it still work in this PR.

image

work

It also has an offline mode, just stop the running command window and run neoxp in another folders.

@Ashuaidehao
Copy link
Collaborator

Ashuaidehao commented Nov 10, 2023

And you should test more commands like neoxp show tx 0xXXX, neoxp contract deploy xx.nef and so on. This PR will not just change neoxp run command behavior.

@chenzhitong
Copy link
Member Author

I know why it's stored in the AppData folder, because it was installed through the dotnet tool at that time, and now it can be run as a standalone application, so it doesn't need to be stored in the AppData folder anymore.

PS: dotnet tool install Neo.Express -g are installed in the following directories by default:

OS Path
Linux/macOS $HOME/.dotnet/tools
Windows %USERPROFILE%\.dotnet\tools

@chenzhitong
Copy link
Member Author

And you should test more commands like neoxp show tx 0xXXX, neoxp contract deploy xx.nef and so on. This PR will not just change neoxp run command behavior.

Test Passed

@cschuchardt88
Copy link
Member

cschuchardt88 commented Nov 10, 2023

I'm also not following your checkpoint comments. Perhaps you can describe what we're supposed to see in that screenshot and why that is (or is not) a problem?

I was talking about this See Below

May need more test to check if the checkpoint command can run normally after this change.
For example, I can copy the "default.neo-express" file to any project folders, then run neoxp commands, it can find the same folder where the chaindata stored, I'm not sure if it still work in this PR.

@chenzhitong test the above.

Also you have the unit test project for this as well. You can create a project unit test for a contracts. Lets not forget about that. If you need help with a template for contract unit test for neo-express let me know.

@cschuchardt88
Copy link
Member

You should change the path to match #324 Should be alot easier to understand for the user.

@Jim8y
Copy link
Contributor

Jim8y commented Nov 14, 2023

You should change the path to match #324 Should be alot easier to understand for the user.

@chenzhitong Any update?

Co-authored-by: Christopher Schuchardt <[email protected]>
@Jim8y Jim8y merged commit 33e2c1d into neo-project:master Nov 15, 2023
1 check passed
@cschuchardt88 cschuchardt88 mentioned this pull request Nov 15, 2023
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What is the location of the folder where the block data is stored
5 participants