Difference between revisions of "BIP PoolAPI"

From Bitcoin Wiki
Jump to: navigation, search
(Basic grammar stuff)
Line 4: Line 4:
 
   BIP: ?
 
   BIP: ?
 
   Title: ?
 
   Title: ?
   Author: Paul Sheppard <shep(nospace)soft(at)gmail.com> and Luke Dashjr <luke+bip22@dashjr.org>
+
   Author: Paul Sheppard <shepsoft@gmail.com> and Luke Dashjr <luke+bip22@dashjr.org>
 
   Status: Draft
 
   Status: Draft
 
   Type: Standards Track
 
   Type: Standards Track
Line 15: Line 15:
 
==Specification==
 
==Specification==
  
Time is seconds since Jan 1 1970 midnight UTC.<br>
+
* All time keys are seconds since Jan 1 1970 midnight UTC.
Hashrate is hashes per second.<br>
+
* Hashrate is measured in full block hashes per second. So if a full block proof-of-work requires two rounds of SHA256 (as it does with Bitcoin today), each two rounds counts only as a single hash.
Satoshis is the smallest divisable part of the currency. i.e. for USD this is 0.01<br>
+
* Currencies are always represented in the smallest divisible part of the currency. eg, for USD this is 1 cent and for Bitcoin this is 0.00000001 BTC
 +
 
 +
===Object Formats===
 +
{| class="wikitable"
 +
! Key !! Type !! Description
 +
|-
 +
!colspan='3'| user
 +
|-
 +
| pool_MOTD || String || whatever the pool wants to tell us
 +
|-
 +
| pool_hashrate || Hashrate || current hashrate of the entire pool
 +
|-
 +
| pool_users || Number || number of active users on the pool
 +
|-
 +
| pool_workers || Number || number of active workers on the pool
 +
|-
 +
| current_round || Object of 'block' || current active round
 +
|-
 +
| user_hashrate || Hashrate || current hashrate of user for all workers
 +
|-
 +
| last_activity || Time || last submitted share time of any user worker
 +
|-
 +
| balances || Array of 'balance' || listing of each balance (BTC, NMC, etc.)
 +
|-
 +
| workers || Array of 'worker' || listing of each worker of the user
 +
|}
  
===Consistuent Structures===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! Key !! Type !! Description
 
! Key !! Type !! Description
Line 92: Line 116:
 
|-
 
|-
 
| fee || Float || fee multiplier (1% = 0.01)
 
| fee || Float || fee multiplier (1% = 0.01)
|}
 
 
===Main Structure===
 
{| class="wikitable"
 
! Key !! Type !! Description
 
|-
 
!colspan='3'| user
 
|-
 
| pool_MOTD || String || whatever the pool wants to tell us
 
|-
 
| pool_hashrate || Hashrate || current hashrate of the entire pool
 
|-
 
| pool_users || Number || number of active users on the pool
 
|-
 
| pool_workers || Number || number of active workers on the pool
 
|-
 
| current_round || Object of 'block' || current active round
 
|-
 
| user_hashrate || Hashrate || current hashrate of user for all workers
 
|-
 
| last_activity || Time || last submitted share time of any user worker
 
|-
 
| balances || Array of 'balance' || listing of each balance (BTC, NMC, etc.)
 
|-
 
| workers || Array of 'worker' || listing of each worker of the user
 
 
|}
 
|}
  

Revision as of 02:43, 7 June 2012

This page describes a BIP (Bitcoin Improvement Proposal).
Please see BIP 2 for more information about BIPs and creating them. Please do not just create a wiki page.

  BIP: ?
  Title: ?
  Author: Paul Sheppard <shepsoft@gmail.com> and Luke Dashjr <luke+bip22@dashjr.org>
  Status: Draft
  Type: Standards Track
  Created: 22-05-2012

Abstract

This BIP aims to create a standard API for pool statistics.

Specification

  • All time keys are seconds since Jan 1 1970 midnight UTC.
  • Hashrate is measured in full block hashes per second. So if a full block proof-of-work requires two rounds of SHA256 (as it does with Bitcoin today), each two rounds counts only as a single hash.
  • Currencies are always represented in the smallest divisible part of the currency. eg, for USD this is 1 cent and for Bitcoin this is 0.00000001 BTC

Object Formats

Key Type Description
user
pool_MOTD String whatever the pool wants to tell us
pool_hashrate Hashrate current hashrate of the entire pool
pool_users Number number of active users on the pool
pool_workers Number number of active workers on the pool
current_round Object of 'block' current active round
user_hashrate Hashrate current hashrate of user for all workers
last_activity Time last submitted share time of any user worker
balances Array of 'balance' listing of each balance (BTC, NMC, etc.)
workers Array of 'worker' listing of each worker of the user
Key Type Description
shares
submitted Number shares submitted
stale Number shares deemed stale by pool
invalid Number shares deemed invalid by pool
Key Type Description
block
currency String BTC, NMC, Ix, iO, etc...
id Number block ID
duration Time block duration in seconds
shares_round Object 'shares' shares for entire pool for the round
shares_user Object 'shares' shares for all workers of the user for the round
Key Type Description
balance
currency String BTC, NMC, Ix, iO, etc...
confirmed Satoshis confirmed reward (>=120 valid blocks)
unconfirmed Satoshis unconfirmed reward (<120 valid blocks)
estimate Satoshis estimated reward for current round
last_pay Satoshis value of last payout
last_pay_time Time time of last payout
total_pay Satoshis total value of paid out
threshold Satoshis min confirmed reward before auto payout. 0 for no auto payment
Key Type Description
worker
id String unique worker identifier
name String human-readable identifier for worker
hashrate Hashrate current hashrate of the worker
last_activity Time last submitted share time
shares_round Object 'shares' shares for current round
shares_reset Object 'shares' shares since last user reset
shares_total Object 'shares' shares of worker for all time
reward_algo String reward algorithm identifier
fee Float fee multiplier (1% = 0.01)

Reward algorithms:

Algorithm name Description
Prop Proportional
PPLNS Pay Per Last N Shares
PPS Pay Per Share
SMPPS Shared Maximum Pay Per Share
Score
Geo Geometric Method
DGM Double Geometric Method

Example

Motivation

Moving forward with bitcoin it is important to make all aspects as user friendly as possible.

Rationale

This BIP allows the creators of Apps and Web GUIs for pool monitoring a common interface to use, as opposed to dealing with a differing interface for each pool.

Backwards Compatibility

As an emerging standard, backwards comparability is not applicable. However forward comparability should be maintained. Any future incompatibilities shall be identified by the 'API_version' number.