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

Store masp-params in base dir #215

Closed
ruuda opened this issue Jul 25, 2022 · 2 comments
Closed

Store masp-params in base dir #215

ruuda opened this issue Jul 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working MASP

Comments

@ruuda
Copy link

ruuda commented Jul 25, 2022

On version f1afdffd5e43ad4bb448db7bf5bc1e23464350f7, which is the required version for using namada-cq-2.a6ebeb093671093b21, anoma ledger tries to access ~/.masp-params, and there doesn’t appear to be a way to change this path.

When running as a system user, which is standard practice for daemons, the user may not have a home directory, and so the application crashes.

Relevant part of strace
statx(AT_FDCWD, "/nonexistent/.masp-params/masp-spend.params", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffc38b9b9d0) = -1 ENOENT (No such file or directory)
write(1, "MASP parameters not present, dow"..., 44MASP parameters not present, downloading...
) = 44
mkdir("/nonexistent/.masp-params", 0777) = -1 ENOENT (No such file or directory)
mkdir("/nonexistent", 0777)             = -1 EACCES (Permission denied)
statx(AT_FDCWD, "/nonexistent", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffc38b9b770) = -1 ENOENT (No such file or directory)

The user's home directory is /nonexistent, which indeed does not exist.

Instead of storing things at a hard-coded location under ~/.masp-params, I think it would make sense to put this data in the base dir. If that is not desirable for some reason, the path should at least be configurable. I looked into the code and it’s a third-party crate that hard-codes the path, but it looks like it is part of Anoma and ultimately the issue surfaces in anoma, so I am opening an issue here.

Also for the default path, consider respecting the XDG Base Directory Specification instead of creating yet another entry directly in the user's home directory.

@ruuda ruuda added the bug Something isn't working label Jul 25, 2022
@murisi murisi added this to Namada-Old Aug 9, 2022
@murisi murisi moved this to Todo in Namada-Old Aug 9, 2022
@cwgoes
Copy link
Collaborator

cwgoes commented Jan 13, 2023

@mariari can you take this quickly as part of the MASP work (low priority)?

@mariari
Copy link
Member

mariari commented Feb 1, 2023

It seems to be related to the work in #100 and thus should be done after #685 is completed

@cwgoes cwgoes closed this as completed Feb 5, 2024
@github-project-automation github-project-automation bot moved this from Todo to Tested in Devnet in Namada-Old Feb 5, 2024
phy-chain pushed a commit to phy-chain/namada that referenced this issue Mar 1, 2024
* This fixes the build and dev commands for the extension

* Fix start scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MASP
Projects
No open projects
Status: Tested in Devnet
Development

No branches or pull requests

4 participants