[go: up one dir, main page]

Skip to content

Implement Miner Registration System

Summary

Implement the system for miners to register with mining accounts using keybooks.

Background

Third-party apps need to control who can mine by managing a registry of approved miners in a keybook.

Requirements

  • Miner registration transaction type
  • Registration fee handling
  • Stake requirement enforcement
  • Automatic expiry mechanism
  • Maximum miner limits

Implementation Details

type RegisterMinerTransaction struct {
    TransactionBody
    
    MiningAccount   *url.URL
    MinerADI        *url.URL
    MinerPubKey     []byte
    StakeAmount     uint64
    RegistrationFee uint64
}

type MiningKeyBook struct {
    KeyBook
    
    RegistrationFee uint64
    RequiredStake   uint64
    AutoExpiry      uint64
    MaxMiners       uint32
}

Acceptance Criteria

  • Registration transaction type defined
  • Registration executor implementation
  • Fee collection logic
  • Stake verification
  • Keybook entry management
  • Expiry checking mechanism
  • Maximum miner enforcement
  • Unit tests for registration flow
  • Integration tests with keybooks

Dependencies

  • Depends on: #3669 (Mining Account Type)
  • Depends on: #3666 (KeyPage Schema Updates)

Related

  • Epic: &37
  • Specification: 32-lxr-mining-app-integration-simple.md