appditto / natrium_wallet_flutter

Natrium - Fast, Robust & Secure NANO Wallet, now written with Flutter.
Other
843 stars 322 forks source link

Local PoW Support #24

Open oojacoboo opened 5 years ago

oojacoboo commented 5 years ago

Relying on centralized servers for PoW creates a single point of failure for this wallet. This is a common issue for all wallets right now, but as Natrium growing in popularity, it’s even more important that we address this issue now.

Local PoW should be the default with an option to configure a remote PoW server of your choice. Suggested servers could be recommended or provided as toggle options.

Along similar lines, are there any other centralized dependencies?

bbedward commented 5 years ago

My stance is that local pow should never be the expectation on a mobile device. I feel pretty strongly about that because I think it would create a poor user experience - e.g. "why is Natrium draining all my battery?" - "why is my phone getting hot?". Besides being very slow to compute a pow (potentially well over a minute on many devices), there's also the likelihood that PoW will become more difficult in the near future. Plus, there's a possibility it could get flagged by Apple (and even Google) as "mining"

But* - being able to pick your own server is a good thing I think. The Natrium server is pretty straight forward to get running and could be setup in a matter of minutes.

The only thing that would really be effected is the push notifications. I don't think that's a feature that can easily be decentralized, but the push notification server could always be separated and independent from the main Natrium server.

oojacoboo commented 5 years ago

Picking your PoW server is a start. At least then if one PoW system is down, you can change it over to a working one. Regardless, I'd like to see support for local PoW. Mobile devices are starting to become on par with standard computers now. Apple is even reportedly moving the MacBook line over the A12 Bionic which is in the iPad now. I think we'll see a full convergence soon on the computing side and I think we'll find local PoW to be desirable. I know some of the prioritization might change that as people demand more and more difficult PoW (or we can hope - I guess).

Push notifications is understandable. It might be nice to have a statement about it being a centralized component. I think it's important to convey what's centralized and what data is sent outside of the wallet.

Loving Natrium BTW, great work.

bananodroid commented 5 years ago

I'm wondering how much of a battery drain local PoW would actually be? Does it not only compute on demand (or precomputes once)? I can't imagine people would be doing that many transactions each day on mobile that it would take up a significant amount of daily processing power.

Update - just tested Nanovault on mobile with local PoW on Samsung S9. Client side CPU 15 seconds, webGL on chrome android 2mins

rainbyte commented 4 years ago

Also Local PoW doesn't need to be the default behavior. An alternative could be use it as fallback when server is down, showing a warning if needed or having an option to disable it.

gabparrot commented 4 years ago

Would generating your own PoW count as mining for Apple though? Because their terms say "apps cannot mine for cryptocurrencies unless the processing is based off-device (e. g. cloud computing)

rainbyte commented 4 years ago

I think it doesn't count as mining, because mining implies someone is obtaining a reward. NANO calculations are only used as anti-spam measure, similar to a captcha.

otonashixav commented 3 years ago

It's been awhile since the difficulty change, and my OnePlus 6 with a 3 year old Adreno 630 computes PoW fine with Nault. Is it possible that local PoW gets added as an optional feature, with warnings about GPU usage and battery drain? Or is the subset of users who would opt for a non-default option hidden behind warnings too small for it to be implemented, given the risk of being removed from the app/play store?