Huione Docs
White Paper
Developers
Developers
  • Learn
    • Introduction to Huione Chain
    • Getting started with Huione Chain
  • Architecture
    • What is a Huione Chain Cluster?
    • Clusters
      • Huione Chain Clusters
      • RPC Endpoints
      • Benchmark a Cluster
      • Performance Metrics
    • Consensus
      • Synchronization
      • Leader Rotation
      • Fork Generation
      • Managing Forks
      • Turbine Block Propagation
      • Commitment Status
      • Secure Vote Signing
      • Stake Delegation and Rewards
    • Validators
      • Overview
      • TPU
      • TVU
      • Blockstore
      • Gossip Service
      • The Runtime
    • Dex & Swap
      • Trade on dex
      • Trade on swap
  • CLI
    • Command-line Guide
    • Install the Huione Tool Suite
    • Command-line Wallets
      • Command Line Wallets
      • Paper Wallet
      • File System Wallet
      • Support / Troubleshooting
    • Using Huione Chain CLI
    • Connecting to a Cluster
    • Send and Receive Tokens
    • Staking
    • Deploy a Program
    • Offline Transaction Signing
    • Durable Transaction Nonces
    • CLI Usage Reference
  • Developers
    • Get Started
      • Hello World
      • Local development
      • Rust program
    • Core Concepts
      • Accounts
      • Transactions
        • Overview
        • Versioned Transactions
        • Address Lookup Tables
      • Programs
      • Rent
      • Calling between programs
      • Runtime
    • Clients
      • JSON RPC API -1
      • JSON RPC API -2
      • JSON RPC API -3
      • Web3 JavaScript API
      • Web3 API Reference
      • Rust API
    • Writing Programs
      • Overview
      • Developing with Rust
      • Deploying
      • Debugging
      • Program Examples
      • FAQ
    • Native Programs
      • Overview
      • Sysvar Cluster Data
    • Local Development
      • Huione Test Validator
    • Backward Compatibility Policy
    • Anchor Book
      • Introduction
        • What is Anchor
        • Anchor Documentation
        • Prerequisites
      • Getting Started
        • Installation
        • Hello, Anchor!
      • Anchor Programs In-Depth
        • Essentials
          • High-level Overview
          • The Accounts Struct
          • The Program Module
          • Errors
          • Milestone Project - Tic-Tac-Toe
        • Intermediate
          • Cross-Program Invocations
          • PDAs
          • Events
      • Anchor BTS
        • The Discriminator
      • Anchor References
        • Space Reference
        • Javascript Anchor Types Reference
        • CLI Reference
        • Code References
  • Validators
    • Running a Validator
    • Getting Started
      • Validator Requirements
    • Voting Setup
      • Starting a Validator
      • Vote Account Management
      • Staking
      • Monitoring a Validator
      • Publishing Validator Info
      • Failover Setup
      • Troubleshooting
    • Geyser
      • Geyser Plugins
  • Staking
    • Staking on Huione
    • Stake Account Structure
  • Integrations
    • Add Huione to Your Exchange
    • Retrying Transactions
  • Library
    • Introduction
    • Token Program
    • Associated Token Account Program
    • Memo Program
    • Name Service
    • Feature Proposal Program
    • NFT Program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a new NFT-Mint
        • Cast NFT
        • Transfer an NFT
        • Change account status
        • Permission settings
        • Query Interface
        • Continuous casting
        • Change the Mint attribute
      • Operation Overview
        • Create a new NFT-Mint
        • Transfer NFT
        • Destroy
        • Freeze NFT accounts
        • Update
    • Huione multi-sign program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a multi-signature account
        • Create a proposal account
        • Vote proposal
        • Verify Proposal
        • Add-singer
        • Remove-signer
      • Operation Overview
        • Create a multi-signature account
        • Create a proposal account
        • Vote
        • Verify
        • Add-singer
        • Remove-signer
Powered by GitBook
On this page
  • Huione Test Validator
  • Advantages
  • Installation
  • Running
  • Interacting
  • Appendix I: Status Output
  • Appendix II: Runtime Features

Was this helpful?

  1. Developers
  2. Local Development

Huione Test Validator

Huione

Huione Test Validator

During early stage development, it is often convenient to target a cluster with fewer restrictions and more configuration options than the public offerings provide. This is easily achieved with the huione-test-validator binary, which starts a full-featured, single-node cluster on the developer's workstation.

Advantages

No RPC rate-limits
No airdrop limits
Direct on-chain program deployment (--bpf-program ...)
Clone accounts from a public cluster, including programs (--clone ...)
Load accounts from files
Configurable transaction history retention (--limit-ledger-size ...)
Configurable epoch length (--slots-per-epoch ...)
Jump to an arbitrary slot (--warp-slot ...)

Installation

The huione-test-validator binary ships with the Huione CLI Tool Suite. Install before continuing.

Running

First take a look at the configuration options

huione-test-validator --help

Next start the test validator

huione-test-validator

By default, basic status information is printed while the process is running. See Appendix I for details

Ledger location: test-ledger
Log: test-ledger/validator.log
Identity: EPhgPANa5Rh2wa4V2jxt7YbtWa3Uyw4sTeZ13cQjDDB8
Genesis Hash: 4754oPEMhAKy14CZc8GzQUP93CB4ouELyaTs4P8ittYn
Version: 1.6.7
Shred Version: 13286
Gossip Address: 127.0.0.1:1024
TPU Address: 127.0.0.1:1027
JSON RPC URL: http://127.0.0.1:8899
⠈ 00:36:02 | Processed Slot: 5142 | Confirmed Slot: 5142 | Finalized Slot: 5110 | Snapshot Slot: 5100 | Transactions: 5142 | ◎499.974295000

Leave huione-test-validator running in its own terminal. When it is no longer needed, it can be stopped with ctrl-c.

Interacting

Open a new terminal to interact with a running put-test-validator instance using other binaries from the Huione CLI Tool Suite or your own client software.

Configure the CLI Tool Suite to target a local cluster by default#

huione config set --url http://127.0.0.1:8899

Verify the CLI Tool Suite configuration#

huione genesis-hash

NOTE: The result should match the Genesis Hash: field in the huione-test-validator status output

Check the wallet balance#

huione balance

NOTE: Error: No such file or directory (os error 2) means that the default wallet does not yet exist. Create it with Huione-keygen new.
NOTE: If the wallet has a zero Huione balance, airdrop some localnet Huione with put airdrop 10

Perform a basic transfer transaction#

huione transfer EPhgPANa5Rh2wa4V2jxt7YbtWa3Uyw4sTeZ13cQjDDB8 1

Monitor msg!() output from on-chain programs#

huione logs

NOTE: This command needs to be running when the target transaction is executed. Run it in its own terminal

Appendix I: Status Output

Ledger location: test-ledger

File path of the ledger storage directory. This directory can get large. Store less transaction history with --limit-ledger-size ... or relocate it with --ledger ...

Log: test-ledger/validator.log

File path of the validator text log file. The log can also be streamed by passing --log. Status output is suppressed in this case.

Identity: EPhgPANa5Rh2wa4V2jxt7YbtWa3Uyw4sTeZ13cQjDDB8

The validator's identity in the gossip network

Version: 1.6.7

The software version

Gossip Address: 127.0.0.1:1024
TPU Address: 127.0.0.1:1027
JSON RPC URL: http://127.0.0.1:8899

The network address of the Gossip, Transaction Processing Unit and JSON RPC service, respectively

⠈ 00:36:02 | Processed Slot: 5142 | Confirmed Slot: 5142 | Finalized Slot: 5110 | Snapshot Slot: 5100 | Transactions: 5142 | ◎499.974295000

Session running time, current slot of the the three block commitment levels, slot height of the last snapshot, transaction count, voting authority balance

Appendix II: Runtime Features

By default, the test validator runs with all runtime features activated.

You can verify this using the Hui one command-line tools:

huione feature status -ul

Since this may not always be desired, especially when testing programs meant for deployment to mainnet, the CLI provides an option to deactivate specific features:

huione-test-validator --deactivate-feature <FEATURE_PUBKEY_1> --deactivate-feature <FEATURE_PUBKEY_2>
PreviousLocal DevelopmentNextBackward Compatibility Policy

Last updated 7 months ago

Was this helpful?