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

[Feature] Add optional start_height to login / account creation / import_request #32

Open
CryptoGrampy opened this issue Feb 23, 2022 · 6 comments

Comments

@CryptoGrampy
Copy link

CryptoGrampy commented Feb 23, 2022

I'm not sure this is the best place to make this feature request, but it would be great to be able to be able to specify a starting height on LWS /login account creation. There's not really an way to import an existing wallet (Say I want to move my Monerujo wallet to my self-hosted LWS / MyMonero setup, or say I want to use MyMonero to track donations that have been made to the Monero Art Fund) without having to manually set a height in admin settings (I think this is a thing) or re-scanning the wallet from the genesis block- this is an existing api feature (import_request) and is a bit too heavy handed.

I think it makes the most sense to add an optional start_height to the login endpoint (subsequent login requests that include the height are ignored if requestHeight <= storedHeight, and updated/rescanned otherwise), but alternatively, perhaps this makes sense to add as an optional item to import_request, or maybe both.

@CryptoGrampy CryptoGrampy changed the title Add optional start_height to login / account creation / import_request [Feature] Add optional start_height to login / account creation / import_request Feb 25, 2022
@vtnerd
Copy link
Owner

vtnerd commented Jun 1, 2022

The current API was designed to generate revenue (for the extra load on the server) when someone needed to import an older wallet. I'm sure it could be worked out, but it would mess with some backends (as fees need to be done on a pro-rata basis).

@vtnerd
Copy link
Owner

vtnerd commented Jun 1, 2022

Also, the admin utility already lets you set a specific reset height, you just can't do it from the API right now (since it tries to strictly adhere to the spec).

@paulshapiro
Copy link

Not all back-ends are going to want to charge users for scanning, such as my team's upcoming LWS reimplementation (we're planning to just do free scanning, at least initially). In the present spec, the /login endpoint already serves the function of informing the server of wallets that need scanning, as evidenced by the /login response containing the .start_height. However the /import_request endpoint is specced explicitly to re-request scanning. It would be easily expanded to include a req param of .start_height that servers which want to monetize scanning could simply persist and then wait until payment to scan from. Or they could choose to ignore it, i.e. it wouldn't break or mess with back-ends if the /import or /login endpoint were modified to allow clients to specify desired start_heights .. in fact it would only reduce load on scanners.

I also plan to submit a PR to the spec fairly soon to suggest another expansion related to scan height.

@CryptoGrampy
Copy link
Author

Another option to resolve this issue is to add Polyseed support 😄 https://github.com/tevador/polyseed

@paulshapiro
Copy link

lol .. but the seed does not get sent to the server. a client is still going to need to communicate the start height to a scanner.

@trasherdk
Copy link
Contributor

In CLI restore_height unless it's a restored wallet.

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

No branches or pull requests

4 participants