LogoLogo
Vivid Labs HomepageMediumDiscordTwitter
  • Getting Started with Vivid Labs
  • Vivid Labs Guides
    • Getting Started with VIVID Open - Open Source NFT Marketplace
  • Vivid NFT Shop App - Getting Started
    • Step 1: Install the VIVID NFT Shopify App
    • Step 2: Create NFT Products
    • Step 3: How to Edit an NFT
    • Step 4: Buying and Minting the NFT on the Blockchain
    • Step 5: Product Delivery - Custom Email Templates
    • Step 6: Removing the VIVID NFT App from your Store
  • VideoCoin Block Explorer
  • How to use Ledger device with VideoCoin
  • Worker-hub
    • Worker Hub Walkthrough
    • Update to Newest Version of Worker Hub Alpha
    • Setting up a VID Worker
    • VID Pool Software
      • VidPool - Flat Payments: Percentage-based payment engine
      • Worker Setup - VidPool
  • Staking VID Token
    • Delegated Staking
    • Worker Self Staking
    • Staking with the Genesis Staking Program
    • Reward Distribution
  • Additional Information
  • FAQ
Powered by GitBook
On this page
  • Configuration
  • Image
  • Persistent state
  • Execution safety
  1. Worker-hub
  2. VID Pool Software

Worker Setup - VidPool

Configuration

TODO provide a centralized place for production configuration.

Below is the example of the configuration file.

{
    "DataDir": "/state/",
    "KeyFile": "<PROVIDE PATH TO THE WORKER KEY>",
    "Password": "<PASSWORD FOR WORKER KEY>",
    "StreamManagerAddress": "0xee714E6f2686929AE33614aAA332D67EaC9f5ede",
    "StakingManagerAddress": "0xe535420fD393C202c5F47aAfDc210fF36f697584",
    "WorkerChainURL": "https://symphony.dev.videocoin.net/",
    "PaymentsChainURL": "https://rpc.tst.publicmint.io:8545/",
    "LogLevel": "debug",
    "PaymentURLSpec": "https://explorer.tst.publicmint.io/tx/%s/token_transfers",
    "Auth": {
        "ClientID": "<PROVIDE CLIENT ID FROM VIDEOCOIN CONSOLE>",
        "AuthURL": "d.dev.videocoin.network:5008"
    }
}

Image

Pull image using:

docker pull registry.videocoin.net/vidpool/vidpool:latest

Persistent state

The application requires directory for persisting state for the safety and correctness of the application. Make sure to mount a directory from your local machine to docker instance, such as:

In the example below I created a directory /var/vidstate on my local machine. You can also put a config as config.json inside this directory, and application will pick it up.

docker run -ti -v /var/vidstate:/state -w /state registry.videocoin.net/vidpool/vidpool payout

Execution safety

VideoCoin pool software keeps track of the executed payouts. It does it by tracking last processed block. In the default configuration last processed block is stored on your file system. If it will be lost - manual intervention will be required to avoid processing same rewards twice.

In order to make it more robust you can deploy a simple smart contract on VideoCoin blockchain, the sole responsibility of this contract is to keep last processed block.

docker run -ti -v /tmp/vidconf:/state -w /state registry.videocoin.net/vidpool/vidpool deploy

After the contract is deployed, please update configuration parameter BlockContractAddress.

PreviousVidPool - Flat Payments: Percentage-based payment engineNextDelegated Staking

Last updated 4 years ago