Nano P2PoW

Delegated Proof of Work, now P2PoW. Updates and news!

Image for post
Image for post
  • Rebranding

In this year of 2020 a lot of work was done on top of P2PoW... the news has accumulated and before the year is over I want to have the honor of sharing with the Nano community!

NanoJam victory and Rebranding

In 2019 it was a pleasure, after the recount of the votes, to discover Delegated Proof of Work was the winner of NanoJam, the first international hackaton of the Nano community, taking the first place!
Due to the fact that many people confuse the old name of the project “Delegated Proof of Work” with the project “DPoW” (distributed PoW, which maintains a different system, with a centralized api), a rebranding was necessary. @mitche50 from the Nano Center suggested the current name: P2PoW. I intend to remain with that name that certainly fell very well in our P2P project!

The importance of P2PoW for Nano

  1. Currently, Nano’s only anti-spam barrier is the Proof of Work mechanism, present in all Nano transactions. Without it, the network could easily become congested.

To better understand the technical functioning of P2PoW, read this article: https://medium.com/@anarkrypto/delegated-proof-of-work-d566870924d9

Worker API Update -> V2.0.0

Many things have changed since the first version of Delegated Proof of Work (now P2PoW) to keep the API more robust, efficient, secure and updated with the changes to the Nano protocol. Let’s see:

- Adapting to the new difficulty

Now P2PoW API by default handles different send and receive transactions according to Nano protocol updates.
Minimum difficulty to send: 8X the old difficulty
Minimum difficulty to receive: 1/8 the old difficulty
In addition, workers can enable dynamic fee, this requires customers to pay more for larger PoW when the network is more saturated.

-Efficiency

While solving a job, the API automatically checks if the transaction has already been confirmed (possibly by a competing worker). If so, the api gives up the work and can focus all its resources on the next work.

-Logging

Now the P2PoW API comes with a more organized logging system, with different flags:
INFO: Common notices, such as startup and new work
Warning: User made an invalid request or with some invalid data
Error: Error in configuration, API or communication with node nano / worker
For those using Linux, logs can be tracked via journalctl
The user can also redirect the entire log to a file using arg: -o file.log

-Support for IPV6

In addition to IPV4, the decentralized registration system protocol is already able to convert IPV6 to the Nano account format and make it available to P2PoW clients automatically.

-Improvement of code in modules

To facilitate the work of developers who want to forge the code, the API now has its functions divided into “modules”, as well as a division of the configuration files.

Image for post
Image for post

Code comments have also been added and improved.

P2PoW Client JS

To facilitate and improve the integration of P2PoW in applications, I announce the P2PoW client JS. A library with all the functions needed to use P2PoW. Check usage examples:

P2PoW.sync(delay, callback) //synchronize with workers

P2PoW.getWorkersOnline( ) //get workers list

P2PoW.requestInfo(workerAddress) //get a worker info

P2PoW.requestWork(user_block, workerIP) //solve a transaction

P2PoW Web Demo

How about a simple and friendly online demo for any user to test P2PoW working in practice?

Try it Now :https://demo.p2pow.online

Image for post
Image for post

The P2PoW Demo is the first integration with the client JS and allows anyone to test the protocol without the need to install any software or understand programming!

Atualização do site

The site was also not left out! This is the new official P2PoW website: https://p2pow.online

Image for post
Image for post
Image for post
Image for post
https://p2pow.online

The code is available at: https://github.com/anarkrypto/p2pow/tree/master/docs

Implementations: C, PHP, IoT and Wallet with P2PoW!

Image for post
Image for post

The programmer and enthusiast Fabio Silva took advantage of P2PoW protocol to integrate into his projects focused on IoT and low processing devices:

myNanoEmbedded: lightweight C library

myNanoEmbedded is a lightweight C library that integrates Nano Cryptocurrency to low complexity computational devices (like IoT), with fast transactions and small fees by delegating the Proof of Work with P2PoW.

Support: BIP39, P2PoW, TRNG or PRNG entropy
ARM-A, ARM-M, Thumb, Xtensa-LX6 and IA64 compatible
Linux desktop, Raspberry PI, ESP32 and Olimex A20 tested platforms

myNanoPHP: library to integrate Nano to PHP

myNanoPHP is a PHP Nano Library optimized in size and speed, binding the C library MyNanoEmbedded for PHP.

Nano-electron

Nano-electron is a cross-platform wallet for Nano cryptocurrency.

Focused on lightness, agility and portability, this wallet uses the myNanoEmbedded C Library through a binding to provide greater performance.

myNanoJS

myNanoJS is a C library that integrates Nano Cryptocurrency tools to NodeJS

myNanoJava

Java C bindings for Nano Cryptocurrency with Bitcoin support

Nano Pruning — What will change in P2PoW

This subject will be explained in more detail soon, but so far everything indicates that the pruning will have no negative impact on the P2PoW protocol. On the contrary, it will help!
Since pruning does not apply to burn accounts, it will not affect the decentralized registration system of workers at all.
However, pruning will make P2PoW more efficient, because although P2PoW requires 2 transactions for each work (1 user transaction and 1 reward transaction), pruning will leave only the last transaction saved in the ledger (state block), therefore, in pruned nodes, P2PoW will not require extra storage compared to other methods of transact Nano!

The future of P2PoW

Many updates and features can make P2PoW even more complete and robust. Some possible implementations stand out:

  • Integration with Tor: Will allow Nano users to delegate proof of work through an anonymous proxy thus preserving your ip identity and localization. Currently, the main wallets do not provide this type of privacy. Which means that users are exposed.

Donations

This project is developed in a totally independent way.

All the progress mentioned here was the result of months of work!

You can encourage further development of this and other Nano projects with a Nano donation:

nano_18eoa1k16d4n1b5hb8hwxm5mmgp6zny7owhn8omc5bgxjahxsyznob9u536t

Image for post
Image for post

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

Written by

Desenvolvedor, cripto-entusiasta e criptolibertário

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store