Comments (11)
Saving is done only on sync and not when the user backs out of the wallet, because saving takes > 30 seconds. Maybe we can make an exception if the wallet is not synced yet. But then we are in the "wrapping things up" dialog for over 30 seconds and the user is like "wtf, this is broken!"
It's a tough call.
On the other hand: wait for the sync to finish and you are fine :) Maybe a warning dialog that all will be lost if the user exits before sync is done?
from xmrwallet.
What if there were milestone block heights that the app can keep track of so if the wallet was synced past this block, the user had the option to resume from that point even though they originally didn't specify a starting height at wallet creation?
Syncing is taking way to long and I would love it if it can sync in chunks.
Additionally there seems to be a bug where my wallet was synced but didn't save and now when I tap the wallet again, it begins syncing from the beginning. My phone might have lost internet connection sometime during syncing but there was text stating that it was synced.
from xmrwallet.
Hey, i'm using monerujo as a lib project to integrate monero in my Bitcoin wallet. I've implemented this. Wallet::store() is very quick on my end. I am using a dedicated thread for the Coin Management stuff though.
I'm still playing with it, but i have this changes on a branch. @m2049r Check https://github.com/ehanoc/xwallet/blob/1ced382b6855c19bbcbc9b58e10f862025479e38/app/src/main/java/com/bytetobyte/xwallet/service/coin/monero/MoneroManager.java#L502
I can implement something similar on your project if you're ok with it. We can discuss details.
from xmrwallet.
The current plan is to store the wallet if the user leaves the Wallet Activity. So no periodic store but only when synced or "aborted" to be continued later.
@ehanoc I looked at your code and cannot see any reason for storing to be faster. Monerujo does the saving in its own service thread. Storing a fully synced mainnet wallet takes about 15 seconds on my galaxy s4, a testnet wallet about 6 seconds.
Tying storing to number of blocks loaded is not so good because different nodes sync at different speed - a local node syncs at maybe 2000 blocks a minute and a public remote node maybe only 500. so picking the "correct" number of blocks to sync after is difficult -> therefore the solution proposed above.
from xmrwallet.
@m2049r, my service runs in it's own dedicated process and has its own memory space, yours runs in the same process & same memory space as the main app process. I need IPC due to that. I don't think it makes that much difference but I store a wallet in 1 / 2 seconds.
But, syncing is only catch-up and if you check the store() functions code, they don't check with the nodes, it just saves whatever state we have.
I do think this it's important because restoring can take a long time once you reach the restoring height starting block. Android often kills on going processes as it needs resources for other things and we shouldn't be making users just wait for this to finish.
from xmrwallet.
it's got nothing to do with didicated process or heap. it's got to do with the hardware you run it on. a fresh wallet on an s7 edge also takes 1-2 seconds to store in monerujo. also, as the monerujo wallet process runs as a foreground service it is not as susceptible to getting killed by the system as a dedicated background service.
nonetheless, as already mentioned, i will implement storing when not synced when the user backs out - but has to wait for storing to finish.
from xmrwallet.
Can this be closed in light of #152 ?
from xmrwallet.
For some reason, my phone's screen locked while syncing and monerujo locked the wallet without syncing the state. Is this a bug?
from xmrwallet.
probably not. maybe it did not load any blocks so there was nothing to save. usually there is no problem even if you lock the phone while syncing.
can you reproduce this? maybe with another node as well?
from xmrwallet.
It definitely saved blocks, it had made a lot of progress. Not only that, but syncing the state of my Ledger wallet always kicked me out to the wallet list after a point, so it's impossible to complete.
I will try another node.
from xmrwallet.
I'm still having problem with this. It tells me "Synced" but then after a while it'll say "syncing 600,000 blocks" and AFAICT continue syncing. If my screen locks, opening the wallet again will take me to the home screen and ask me to open the wallet again. This is with a Ledger wallet.
I did try various nodes.
from xmrwallet.
Related Issues (20)
- Add warning when choosing the PocketChange option that it will decrease privacy HOT 1
- On PocketChange; warnings, suggestions and improvements HOT 1
- Grab address through QR code image file
- Will other apps steal and obtain the private key if I don't set a password on monerujo? HOT 2
- Remove HRK as it's no longer a currency in use HOT 1
- I'll help you translate your wallet into Russian HOT 1
- REDACTED FOR PRIVACY HOT 1
- Remove/replace SideShift HOT 13
- Google play store displays app as harmful HOT 4
- ipv6 nodes not supported (1.7XMR)
- Receive currency max amount too low! - is upper limit necessary? HOT 3
- The "Wallet Password" field should (probably) be called "Wallet Password" rather than "Wallet Passphrase"
- "Create New Wallet" / Restore Wallet - annoying GUI glitch.
- Crash on memory tagging while transaction pending
- [PROPOSAL] Add the ability to set the transaction fee HOT 1
- Wishlist: explicit "grab wakelock" button for syncing, other long tasks HOT 1
- cleartext traffic?
- Accessibility: Unlabeled and unusable elements with talkback (0.5XMR) HOT 3
- Inquiry about status of iOS app HOT 2
- Coin control yes/no? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmrwallet.