Skip to content

PoolStats

Bases: Base

ORM model for the pool stats endpoint.

Attributes:

Name Type Description
uid int

Primary key.

time datetime

Timestamp of the record.

full_json dict

Full JSON data.

pool_list dict

List of pools.

pool_statistics dict

Pool statistics.

hashrate int

Pool hashrate.

miners int

Number of miners.

total_hashes int

Total number of hashes.

last_block_found_time int

Time of the last block found.

last_block_found int

Last block found.

total_blocks_found int

Total number of blocks found.

pplns_weight int

PPLNS weight.

pplns_window_size int

PPLNS window size.

sidechain_difficulty int

Sidechain difficulty.

sidechain_height int

Sidechain height.

Source code in p2pool/models.py
class PoolStats(Base):
    """
    ORM model for the pool stats endpoint.

    Attributes:
        uid (int): Primary key.
        time (datetime): Timestamp of the record.
        full_json (dict): Full JSON data.
        pool_list (dict): List of pools.
        pool_statistics (dict): Pool statistics.
        hashrate (int): Pool hashrate.
        miners (int): Number of miners.
        total_hashes (int): Total number of hashes.
        last_block_found_time (int): Time of the last block found.
        last_block_found (int): Last block found.
        total_blocks_found (int): Total number of blocks found.
        pplns_weight (int): PPLNS weight.
        pplns_window_size (int): PPLNS window size.
        sidechain_difficulty (int): Sidechain difficulty.
        sidechain_height (int): Sidechain height.
    """
    __tablename__ = 'pool_stats'
    uid = Column(Integer, primary_key=True)
    time = Column(DateTime, default=datetime.now)
    full_json = Column(JSON)
    pool_list = Column(JSON)
    pool_statistics = Column(JSON)
    hashrate = Column(Integer)
    miners = Column(Integer)
    total_hashes = Column(Integer)
    last_block_found_time = Column(Integer)
    last_block_found = Column(Integer)
    total_blocks_found = Column(Integer)
    pplns_weight = Column(Integer)
    pplns_window_size = Column(Integer)
    sidechain_difficulty = Column(Integer)
    sidechain_height = Column(Integer)