Note: Dependencies must be installed as root/sudo
Note: virtualenv
is a best practice for python, but installation can also be on a user/global
level.
Note: Databases must be installed as root/sudo
MINT uses a local SQLite database which requires MySQL setup (running a MySQL server instance is not required). Assuming a Ubuntu 16.04. or later operating system, install:
Note: bos-mint should be installed as user
You can either install bos-mint via pypi / pip3 (production installation) or via git clone (debug installation). For production use install bos-auto via pip3 is recommended, but the Git master branch is always the latest release as well, making both installations equivalent.
For debug use, checkout from GitHub (master branch) and install dependencies manually:
BOS MINT is supposed to run in the virtual environment. Either activate it beforehand like shown above or run it directly in the env/bin folder.
Note: bos-mint should be upgraded as user
For production installation, upgrade to the latest version - including all dependencies run:
For debug installation, pull latest master branch and upgrade dependencies manually:
Next step is to configure bos-auto.
Default configuration only requires the following:
Possible override values are :
To run MINT in debug mode use:
The output that you see should contain:
The above setup is basic and for development use. Going forward, a Witness may want to deploy UWSGI with parallel workers for the endpoint.
MINT is purposely run on localhost
to restrict outside access. Securing a Python flask application from malicious break in attempts is tedious and would be an ongoing effort.
Important: Recommendation is to access it via a SSH tunnel or through VPN.
Example for SSH tunnel:
Assume bos-mint is running on a remote server accessible via 1.2.3.4 and you have login credentials via SSH (password or private key access). On the local machine that you'll be using to access MINT via a web browser open the tunnel:
-f : Send process to background
-N : Do not send commands (if you need open ssh connections only for tunnelling)
-L : Port mapping (8080 port on your machine, 127.0.0.1:8001 - proxy to where MINT runs)
Now you can open mint in your browser using http://localhost:8080 address.
After starting MINT use your favourite desktop browser to access it and you'll be asked to enter your Witness key that will be stored encrypted in the local Peerplays wallet.
Note: MINT is not optimized for mobile use yet.
For MINT development use checkout the latest repository from:
and then run:
The Manual Intervention Module (MINT) provides a web interface for Witnesses to manually intervene in the otherwise fully-automated process of bringing Bookie Events, BMGs, and Betting Markets to the Peerplays blockchain (through bos-auto).
Occasionally, there may be a need for manual intervention in some element of BOS’s operation. One example would be when multiple Data Proxies are not able to provide the final result of a game (due to sustained connectivity issues or, further back down the chain, an issue with the reporting of the match to the third party data feeds). In this situation, a Peerplays Witness can use the Manual Intervention Module (MINT) which is part of the BOS suite.
MINT provides a web interface for Witnesses to manually intervene in the otherwise fully-automated process of bringing Bookie events and betting markets to Bookie. Some of the functions that MINT can be used to perform:
turn an event ‘in-progress’ (match has started) or a betting market ‘in-play’
freeze an event or betting market
cancel an event or betting market
settle a betting market (i.e. decide winners and losers)
It is important to remember that changes made using MINT do not automatically become ‘fact’ on Bookie. As with BOS’s automated operation, data sent by a particular Witness using MINT is representative of the ‘opinion’ of only that Witness. It requires a consensus amongst a simple majority (50%+1) of all Witnesses for that ‘opinion’ to be accepted as ‘fact’ on Bookie.
MINT also allows for the creation of new events and betting markets. This allows for Bookie to offer betting on longer-term markets like “Who will win the Superbowl?” at the start of a new NFL season (called ‘Futures’ in North America, or ‘Ante-Post’ betting in the UK). These markets do not lend themselves to fully automated management by BOS but are an important part of any sports betting offering.
The ability to create new games or events using MINT also opens up the possibility of Bookie offering ‘novelty’ betting markets where it is not feasible to implement fully-automated data management.
BookiePro requires real-time data feeds in order to create all the various sports, events, markets etc. that are the basis of the sporting exchange. An going challenge has been getting enough of these data feeds that are accurate and reliable.
Many operations required for Bookie, such as creating a new game, require more than one approval which means that at least two data feeds send the exact same information. This is a real problem when there might only be two or three data feeds available at any given time.
Each data feed is consumed by data proxy software, operated by independent organizations, before parsing and normalizing the data and sending it through to BOS for validation, and then finally on to the blockchain.
In it's simplest form the sports data flows from data feed provider -> data proxy - > BOS - > blockchain -> BookiePro. This process is automated, which is desirable, but this brings it's own problems because there isn't enough manual validation on the data until after it fails. The automated process has little ability to correct data that is either sent from the feed provider or incorrectly normalized by the data proxy.
The idea of Couch Potato came about from looking at the process backwards. We know data comes from a feed provider, as what we see as the original source of truth. But if you go back from there who knows how many other layers there are. Does the feed provider get their data directly? Maybe they use a third party to scrape the data and then they purchase it. Maybe the data scraper uses a third party ... and so on. Ultimately though there has to be somebody watching games and inputting the data.
This is the Couch Potato concept. Why not just have a person inputting data directly into a portal or API that then gets posted directly to BOS. In this model the person is the 'data feed provider' and the API or portal the 'data proxy'
Couch Potato aims to improve the data feed and data proxy challenges facing BookiePro by:
Creating a simple to use web portal that uses only data taken directly from Bookiesports and therefore guaranteed correct.
Pushing data directly to BOS as it's entered, no latency or 'spooling' of data.
Incorporating an extensive, powerful, API that can perform all the functions or the web application completely independently, or can be combined with the web application as well.
Create an 'infinitely scalable' system that can be spun up on as many servers as data proxies are required. Every instance of Couch Potato is it's own data proxy.
Allowing third parties to take the API and integrate into their own data gathering processes, whether manual or automated.
Becoming a 'pay-per-input' service for the users of Couch Potato that are entering the data. Couch Potato will track every input such that a suitable payment model can be created for reimbursing the users.
Keeping the data feed providers accountable. If any instance of Couch Potato, operating as a mainnet data proxy, consistently delivers bad data or is unreliable, then that data proxy won't qualify for payment, and ultimately will be removed by witness consensus.