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

Attach pow to notes #544

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Attach pow to notes #544

wants to merge 8 commits into from

Conversation

ticruz38
Copy link
Collaborator

  • Generate a PoW for notes and replies
  • Hide notes based on the PoW difficulty (configurable in app settings)
  • User Settings to attach a PoW difficulty with each send
  • Note option to adjust the PoW difficulty before send
  • Note Create loading state is now richer, it is either signing, or generating a PoW
  • The PoW generation is done in a web worker to avoid the main thread to lock up completely

I had a strange issue when developing this PR, the Worker class, which is a browser native API, was set to the Welshman Worker class, instantiating the PoW worker would just create another welshman Worker class. It might be due to how I link welshman. Let me know if you have that same issue as well.

@ticruz38
Copy link
Collaborator Author

#86

@staab
Copy link
Collaborator

staab commented Jan 22, 2025

Looks good on first review, haven't tested it yet.

I had a strange issue when developing this PR, the Worker class, which is a browser native API, was set to the Welshman Worker class, instantiating the PoW worker would just create another welshman Worker class. It might be due to how I link welshman. Let me know if you have that same issue as well.

This is because in App.svelte line 320 I'm assigning everything in welshman to window for convenience when using the console. You can remove the lib assignment and it should fix the issue.

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

Successfully merging this pull request may close these issues.

2 participants