-
Notifications
You must be signed in to change notification settings - Fork 164
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
Proof-of-Work on the phone (Proof of Concept) #212
Comments
Check out NIP-13. Basically PoW is a way to prove that you spent money (or rather: energy, which amounts to the same thing) on something. It's the same type of PoW as in Bitcoin mining, actually. It's just mining nostr notes. The basic idea is that notes can have PoW attached, and notes with PoW would be far less likely to be spam since it actually takes a little time to send them. Relays or clients could use PoW as another tool in the chest both for fighting spam and for figuring out how to prioritize notes for display to readers. If someone attached a huge amount of PoW to a note, likely they thought it was important, so maybe you want to read it. Phones can't do much, but if you don't mind that your note gets sent in 10 seconds or 2 hours, you could still do something. The amount of PoW is configurable, more takes longer of course. But that's why it runs in the background and gets a notification, so you can do other stuff while Amethyst crunches away on the PoW. To make this usable we would need:
Interestingly, it also gives you a way to cancel sending a note after hitting send. Maybe some people would like to always use 5 seconds worth of PoW, it would give them 5 seconds to cancel sending the note (like in Gmail how you have a about 5 seconds to unsend). Also, there might be external PoW service providers in the future so you can simply buy it instead of doing it yourself, but it's cool to have the option to do a little bit on your phone directly. |
(Fatfingered the close button.) |
Thanks for the clarification, now it makes sense. I like it specially for the spam filtering, and I can see the value on those 3 points you remarked 👌🏼 |
Nice! Post the video on Nostr. I will boost to see what people think :) My first reaction is that it should be a screen inside the app (maybe together with the notification?) and we need a better way to display when posts are in the queue to be sent. |
There can be a screen in the app which gets LiveData updates from the Worker, but they do need to run in Workers on a background task, with a persistent service notification in order to live through leaving the app and doing other stuff while waiting for it to be sent. So it would be both. The screen should also show the queue since we can only do one at a time, and allow cancelling any item (either discard or send straight away without PoW). Ideally the notification would show a rough ETA (maybe a range). That should be easy to calculate by doing a 1 second benchmark on app start or something. Posted the screen recording here note1j7yyvsny2eysnyayjsqlxd6xxa8ne4x9t7g854hjy6tg2zzrfj6snw58an |
@3j2009 if you want to do some design mockups for this stuff that would be awesome. I don't know if I'll have time to actually do the full thing because there's still quite a lot of work from this proof of concept. But I imagine whoever does it will appreciate having the designs ready to go! |
quick mockup video below. Note: For the 2 points you mentioned about identifying notes that have or have not added POW as well as filters we can detail those as separate issues. Interested to hear your thoughts: POW.mp4 |
Also btw: Changed the "upload image" button to a classic paper clip attachment button to make room in the top toolbar for the POW button. |
Looks good. Great idea with the dumbbell icon. I was initially thinking a long press on the post button, but this is better. |
Closing in favor of #2 |
I saw this on the "TODO" list and thought I'd give it a try.
amethyst_pow.mp4
Code is very rough right now, but I think it's a decent proof of concept and should be a good starting point.
The text was updated successfully, but these errors were encountered: