Giter Site home page Giter Site logo

wownmedia / cryptology_tbw Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 7.0 3.32 MB

Cryptology - True Block Weight Voter share payout script for ARK Core blockchains

License: Other

JavaScript 1.19% TypeScript 95.55% Shell 3.26%
payout-script ark dpos true-block-weight

cryptology_tbw's Introduction

The Cryptology True BlockWeight payout script is licenced under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Before you start:

The Cryptology TBW payout script is charging a 0.5% license fee that will automatically be generated and transferred to a wallet in my control. I realize that not every delegate will agree to this and in case you do not agree then I suggest you a) write your own script or b) use one of the other scripts.

Why the license fee?

This script now charges a license fee for 2 reasons; firstly I want to stimulate and enable a new kind of proposal model where a delegate can offer to share payouts from a different income stream. In case of cryptology (on ARK and Compendia) this income stream will be the license fee that will be distributed to my voters. We probably all can agree that ARK and Compendia will thrive well when we can apply new and creative ideas that might draw attention to the projects.

Secondly I think a payout script is an essential tool for a delegate, similar to the need of a server and voters. Part of a delegate skillset would be the ability to create such a script, in case you lack this skillset (or to prevent double work) you can invest in the usage of a 3rd party script such as this one. Nobody questions the need to spend money on their server(s), nor the need to invest in voters (% share and other contributions); so why should the, essential tool, payout script be any different?

Upgrade from V2.6

Version 3.0 no longer looks for a payment signature in the VendorField. Any transfer from a delegate/validator to a voter is interpreted as a payout.

Installation

  • Clone the repository to your server;
  • go to the directory of the script;
  • yarn install
  • yarn build
  • chmod +x bin/app
  • cp example.env .env
  • nano .env and fill out the values for your setup

Usage

You can use the script in 4 ways:

  1. To calculate the amounts that would be paid out: bin/app
  2. To check the transactions that will be generated: bin/app check
  3. To payout your voters: bin/app payout
  4. To payout your voters and check the transactions that were send to the node(s): bin/app payout check

Or to use the script from a cron job for automated payments add this line to your crontab:

00 12 * * * cd ~/cryptology_tbw && node --max-old-space-size=4096 ~/cryptology_tbw/bin/app payout

cryptology_tbw's People

Contributors

c0nsol3 avatar dafty avatar dated avatar dependabot[bot] avatar roks0n avatar wownmedia avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

cryptology_tbw's Issues

allow for custom payout frequencies

Payout is run every 24 hours, but some voters want every 7 days.

Implement a mechanism to allow operators to set a custom frequencies (in blocks) for individual addresses.

V2 compatibility

The script uses SQL queries to obtain it's data from the Node database. V2 has a different DB schema and a set of queries for V2 should be prepared.

Split transaction array in blocks of 50 transactions

Currently I don't check the number of transactions in the transactions array when sending them to the node. For me it's not an issue at this moment because I only have 35 voters... but if a delegate who generates over 50 transactions per payout were to use this script, there will be a problem.

Add whitelist option

when whitelist is set, then everything not in there is blacklisted by default

Add option to send transactions to more than 1 node

Currently the script sends all tx to 1 node. This can slow down forging of the tx.

Refactor the node config so it accepts an object with multiple nodes to POST to

NODES={[ip:"x.x.x.x", port:4003, ip:"y.y.y.y", port: 4003]}

422 error

in Testnet while using bin/app payout and bin/app payout check getting error 422 in last line
3 Payouts initiated
[2022-05-05 01:58:44.615 +0000] INFO (Cryptology TBW): Sending 3 transactions to (ip):6003/.
[2022-05-05 01:58:44.638 +0000] ERROR (Cryptology TBW): Request failed with status code 422

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.