I decided to brush up on my JavaScript skills and as a pet project I started working on set of tools that handle a Waves node’s accounting and payments. Currently this is beta quality software and it’s not advisable to use it on Mainnet. The code is being released to gather feedback from the community and get it into a production-ready state. You can find the code in github, the project is called WavesLPoSTools.
This project is modeled on Marc Jansen’s WavesLPoSDistributer and follows the same conventions as much as possible. The objective is being a drop in replacement. Following the same architecture has the added bonus of being able to verify the correctness of each script’s output.
The code was written from scratch, with the intent of improving several areas:
providing easier, centralized configuration that is isolated in a separate file;
lowering memory and disk requirements;
lowering execution time;
allowing data analysis and statistics on top of the blockchain information
As in WavesLPoSDistributer you can use the payment utilities to execute payments for any file that conforms to the payout.json format. So if you have any home brew utilities that write their output in this format you can keep on using them as usual.
Any ideas on how to improve, pull requests, or any kind of constructive feedback is accepted. A couple of ideas for future versions are:
Airdrop script
database support for more transaction types
a REST interface to extract information from the database
I didn’t know that project, thanks! I’ll take a look Anyway I wanted to learn more about modern JavaScript server-side development, thus my choice. I know PHP but it’s popularity is decreasing due to a few known issues.
Let me know if you see any issues. Downloading the blockchain and creating the database will take some time, but after that the updates should be quick.
Hi, can you put the blocks.db in a URL for downloading?
The database store all nodes entries.
I have synced for more than 14 hours and only sync 316401 blocs :…(
Currently I only have a good snapshot of blocks.db for Mainnet (but you shouldn’t use the payments scripts with that one). You can try the db update and the payout calculation though.
The copy of blocks.db I have for Testnet is currently a work in progress, to add more info about other transaction types I have to start from scratch.
Hello @Raul_localwavesnode have you confirmed that things are working correctly after the changing that parameter name?
I want to include you in the Acknowledgements sections of the README.md for the project, how should I refer to you? A name and a link would be perfect.
I’ve linked to your github profile and I mention localwavesnode.
In the next few days I’ll add some more updates to the code. I’m making changes to enable our node’s new policy (distributing 100% of the fees but subtracting the cost of transferring the payout to leasers).
Following some thorough testing and some bug fixing the code is now production ready!
A couple of changes:
Updated the Acknowledgments section of the README to mention everybody that helped with testing
Added option to specify the batch size when retrieving block information
Get it on WavesLPoSTools gitbub page. If you’re having trouble with downloading the blockchain information try adding the batchSize option to your config file.
Is there any way not to pay Leasint’s rewards from a specific address? Example, XXY address allocated 1000 Waves but is a wallet my stay that is always offline, and I want the reward to be sent directly to another YYX wallet. Would you have to put this function in the program?