appditto / natrium_wallet_flutter

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

Output block in JSON #5

Open Javdu10 opened 5 years ago

Javdu10 commented 5 years ago

Hi,

I think it would be a really good option if we could create block offline and send them to a "processor" which get them by sms and only broadcast them to the network, but it involve may things.

  1. saving the frontier block in localStorage
  2. option to create a block and output it in JSON without broadcasting it if no internet connection and the ability to copy it or send the button "send with"
  3. asking if we save the block in the localstorage or discard it
  4. update frontier block if internet connection is available

this way you can still use Nano with no internet connection

the next step is probably using bluethooth

what do you think ?

bbedward commented 5 years ago

I think this could potentially be done in a non-obtrusive way so I'd be open to it.

We would need to store things like the "last known" balance and frontier, and if user is offline allow them to still access send menu which allows them to export the contents of block.

The only problem is PoW, which is not required to sign the block - but is required to publish it.

I'd say if the phone is already storing the last known frontier+balance - it could also precompute the next PoW, but the balance of the new block has to be known in order to compute the hash (which we would be wanting to compute while the device is offline, depending on send amount -in this case).

PoW could be done on device (very slow), or can assume whatever processor will add the PoW - I think not including the pow makes the offline block creation significantly less useful, though. So I would probably lean towards doing it on device.

Javdu10 commented 5 years ago

For the POW part, I think you won't be able to make it on the phone, Apple has ban cryptocurrency mining even tho I don't consider it as mining, Apple might think so. So you don't need to bother that part, it will be up to the person who provide the connection between the no internet guy and internet

I wonder how much seconds does it take to compute a PoW on mobile tho

Javdu10 commented 5 years ago

Edited

rainbyte commented 4 years ago

Would be possible to use this feature to make a payment when client doesn't have internet but merchant has a working connection?

A few days ago I tried to make a payment with an app, and they doesn't support this feature, so I couldn't buy using local currency.

It could be great if Nano payments could processed when only one wallet has internet, so it would be ahead of fiat currency apps.

I think Chinese Wechat supports a similar feature, where client generates a payment QR which can be captured and published.