GithubHelp home page GithubHelp logo

anarkrypto / p2pow Goto Github PK

View Code? Open in Web Editor NEW
27.0 6.0 3.0 11.36 MB

A P2P Delegated Proof of Work solution for Nano cryptocurrency

Home Page: https://anarkrypto.github.io/P2PoW

License: MIT License

Python 11.67% JavaScript 78.12% CSS 7.11% HTML 3.10%
nano-cryptocurrency nano pow proof reward p2p api dpow delegated trustless

p2pow's Introduction

Nano P2PoW

A P2P Delegated Proof of Work solution for Nano cryptocurrency

Trustless, serverless, open-source

Introduction

This project has the ability to make Nano instantaneous for any type of low computing device by delegating PoW to Workers on a P2P network, requiring no central servers / coordinators.

P2PoW is the rebranding of Delegated PoW, created by me, Anarkrypto, in October 2019 and winner of NanoJam - first hackaton involving the Nano cryptocurrency.

P2PoW rewards "workers nodes" providing computing resources to Nano users in exchange for a small fee. Using Nano's DAG technology, it was possible to create a safe mechanism where neither party can be dishonest. This eliminates any need for central coordinator / authority in the process.

The only way a user can have their transaction validated by Worker is to attach an extra transaction block as a reward after their transactions. The only way for a Worker to receive his reward is by completing PoW and broadcasting the user's transaction first to be able to validate his reward block. Read more in this Medium article

P2PoW Resources

P2PoW API:

worker API is a node-like software that those interested in providing proof of work for users should run.

It register the worker's IP in the tracker account to be found by users.
Then it provides an API that receives proof of work requests, verifies the validity and, if all is well, solves the PoW and broadcast the user_block and reward_block to the network, receiving a reward in return.

P2PoW Client

This client offers the best way to communicate with workers running the P2PoW API and was developed to facilitate the implementation of the P2PoW protocol in apps and websites:

App Intercace <-> Client JS <-> Workers API

All signatures are made on the client side. Block information, account balance and etc are obtained through RPC commands for a Nano node.

Compatible with node.js and major browsers

Proof of work can be requested in a simple way

P2PoW.requestWork(user_block, callback)
  .then(res => {
          console.info("P2PoW successfully! Your Block: " + res.user_block.hash)
  })
  .catch (err => {
          console.error("All workers fail: " + err.fail)
  })

P2PoW Web Demo

This application runs directly in the browser and contains the main functions of a Nano wallet

It offers a friendly interface allowing any user to test the P2PoW protocol, using online workers to validate their transactions.

The communication process with workers is done by the P2PoW client JS

Try it now, P2PoW online web demo: http://demo.p2pow.online

Preview:


Donations

This project is developed in a totally independent way, you can encourage further development of this and other Nano projects with a donation:

nano_18eoa1k16d4n1b5hb8hwxm5mmgp6zny7owhn8omc5bgxjahxsyznob9u536t

Discord Channel

If you have questions about the project, suggestions or other contributions you can join our channel #p2pow-discussion on The Nano Center's Discord server: https://discord.gg/GhzdTkD

p2pow's People

Contributors

anarkrypto avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

p2pow's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.