Skip to main content

No project description provided

Project description

compute-horde

Receipts

Common django models

This library contains common Django models for the receipts. To use them, update your INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    'compute_horde.receipts',
    ...,
]

Migrations

To make new migrations after doing some changes in the model files, run:

DJANGO_SETTINGS_MODULE=compute_horde.settings uv run django-admin makemigrations

Blockchain

This library contains common logic for interacting with the blockchain (subtensor).

To use it, update your INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    'compute_horde.blockchain',
    ...,
]

Block cache

This is a cheap-to-query store that stores the current block number.

Usage:

  • Add compute_horde.blockchain.tasks.update_block_cache as a Celery Beat task with some reasonable frequency (like 6s)
    • Make sure to set the expires= option for the beat entry to about the same value to avoid the tasks piling up
  • To get the current block number from cache, use aget_current_block (or get_current_block).

Validators

This app contains common logic for updating validators of a given network. To use it, update your INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    'compute_horde.validators',
    ...,
]

Models

This app works with models from other projects; it doesn't define its own. To use it, you need to specify COMPUTE_HORDE_VALIDATOR_MODEL in your settings.py, in the form of <app_label>.<model_name>. This model must have at least two fields: public key (string) and active (bool). Other settings are:

COMPUTE_HORDE_VALIDATOR_KEY_FIELD
COMPUTE_HORDE_VALIDATOR_ACTIVE_FIELD
COMPUTE_HORDE_VALIDATOR_DEBUG_FIELD # optional
BITTENSOR_NETUID
BITTENSOR_NETWORK

Tasks

There is a periodic task to update the validators in the database. To use it, define the settings above and add compute_horde.validators.tasks.fetch_validators to your celery beat config.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compute_horde-0.0.26.tar.gz (46.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compute_horde-0.0.26-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file compute_horde-0.0.26.tar.gz.

File metadata

  • Download URL: compute_horde-0.0.26.tar.gz
  • Upload date:
  • Size: 46.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for compute_horde-0.0.26.tar.gz
Algorithm Hash digest
SHA256 33d4adc3b91af65719eaf589f9bca9c8827193205598439f70c119870ef5672e
MD5 5429adf89f1fcac54f914be510f263ed
BLAKE2b-256 b869ad416b371c4ce5e5a64509ccd546316f6e18cf2c4e487dc78af7d532e49e

See more details on using hashes here.

Provenance

The following attestation bundles were made for compute_horde-0.0.26.tar.gz:

Publisher: library_cd.yml on backend-developers-ltd/ComputeHorde

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compute_horde-0.0.26-py3-none-any.whl.

File metadata

  • Download URL: compute_horde-0.0.26-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for compute_horde-0.0.26-py3-none-any.whl
Algorithm Hash digest
SHA256 123c15bc7ebe3b76e92c97158068bb4c9a838a86ba220ab2225e8df7263c9ba3
MD5 9cab4187bf5459e3ad1c5fc5197d65bb
BLAKE2b-256 820c54e4af9853125c6b2de2c78e5f5b745f932e407c6dca949a6322604706b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for compute_horde-0.0.26-py3-none-any.whl:

Publisher: library_cd.yml on backend-developers-ltd/ComputeHorde

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page