Python app which collates CPU/NET usage for all accounts interacting with the blockchain each day. It gathers from the get_blocks nodeos API in the aggregator
process, and submits to an EOSIO oracle contract after the period has ended in the submitter
process.
It stays aware of the state of the contract and sends the total system CPU/NET usage for the period, and then the individual account CPU usage totals in several actions as determined by the contract. It resubmits any data that doesn't make it into an irreversible block.
Data is stored in Redis which is persisted to file every 5 minutes.
By default all submission data is pruned to the most recent 28 days worth (can be change in config.env).
Data submission uses a small node.js Express http server.
- Install docker and docker-compose
- Create the config.env file like the template, and modify as required
docker-compose up -d
docker-compose down
tail -f python/debug.log
docker-compose down
rm redis/dump.rdb
- Copy whole repo to a new directory for each oracle
- Update config.env in these directories to reflect appropriate submission credentials for each oracle
docker-compose up -d
in each directory
If you want to use standard totals and usage data for ease of testing the contract, you can edit config.env to uncomment TEST_USAGE_DATA line and set the other TEST_ parameters before starting.
- Prevent contract reconfiguration from requiring existing data to be deleted manually
- Replace node.js express server with https://github.com/EOSArgentina/ueosio library