For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To Use

The subnet can utilize multiple record validators that are used in order of priority (see RecordValidatorBase).

Usage

Starting the DHT with:

# Initialized with top priority
signature_validator = SignatureValidator(pk)

# Initialize with priority below the SignatureValidator
consensus_predicate = HypertensorPredicateValidator.from_predicate_class(
     MockHypertensorCommitReveal, hypertensor=self.hypertensor, subnet_id=subnet_id
)

record_validators=[consensus_predicate, signature_validator]

dht = DHT(
     initial_peers=initial_peers,
     start=True,
     num_workers=DEFAULT_NUM_WORKERS,
     use_relay=use_relay,
     use_auto_relay=use_auto_relay,
     client_mode=reachable_via_relay,
     record_validators=record_validators,
     **kwargs,
)

Last updated