Skip to content

Implement HIP-1313 High-Volume Entity CreationΒ #2265

Description

@aceppaluni

πŸ§‘β€πŸ”¬ Advanced Issue

Welcome! This is an Advanced Issue touching core SDK architecture.

It is designed for expert contributors who have demonstrated deep architectural understanding and a proven track record of high-quality contributions.

🐞 Problem Description

The Hiero Python SDK does not currently support HIP-1313 which introduces high-volume throttles for entity creation transactions.

HIP-1313 introduces a parallel throttle system for high-volume entity creation. Users can opt into this system by setting a boolean flag on their transactions. When enabled:

Transactions use a separate set of high-volume throttles with dedicated capacity
Dynamic pricing applies based on throttle utilization (higher usage = higher fees)
Users should set maxTransactionFee to control costs
Standard throttles remain unchanged for users who don't opt in
Without this feature, developers cannot access additional entity creation capacity during peak times, which may slow down applications that need to create many items quickly (such as onboarding large groups of users).

Relevant files:

Sources/Hiero/Transaction.py (base class)
Protobuf bindings for TransactionBody

πŸ› οΈ Implementation Notes

  1. Verify Protobuf Bindings
    • Check that TransactionBody protobuf includes the high_volume field (field number 25)
    • If not present, regenerate Swift protobuf bindings
  2. Update Transaction Base Class
    • Add highVolume property with default value of false
    • Add highVolume(_ highVolume: Bool) -> Self fluent setter method
    • Add willSet { ensureNotFrozen() } guard to prevent modification after freezing
    • Update toTransactionBodyProtobuf to include highVolume in the protobuf output
    • Update init(protobuf:) to read highVolume from the protobuf
  3. Add Unit Tests
    • Test that highVolume defaults to false
    • Test setting highVolume to true
    • Test that highVolume cannot be set after transaction is frozen
    • Test serialization/deserialization preserves highVolume flag
    • Test that highVolume is correctly included in protobuf output
  4. Add Integration Tests
    • Test creating an account with highVolume enabled
    • Test that transaction succeeds with appropriate maxTransactionFee
    • Test that transaction fails with INSUFFICIENT_TX_FEE when maxTransactionFee is too low
  5. Add Example
    • Create an example demonstrating high-volume account creation

Example Usage

from hiero_sdk_python import (
    AccountCreateTransaction,
    Hbar,
)

# Create an account using high-volume throttles
account_create_tx = (
    AccountCreateTransaction()
    .key(new_account_key.public_key)
    .initial_balance(Hbar(10))
    .set_high_volume(True)
    .max_transaction_fee(Hbar(5))  # Important: set a fee limit
    .freeze_with(client)
    .sign(new_account_key)
)

response = account_create_tx.execute(client)
receipt = response.get_receipt(client)

account_id = receipt.account_id

print(f"Created account {account_id} using high-volume throttles")

🧠 Advanced Contributors β€” Prerequisites & Expectations

Caution

Advanced issues are the highest-risk work in this project. We will reject PRs that do not meet these standards.

🏁 Concrete Prerequisites

  • Advanced Language: Proficient with Python.
  • Expertise: Deep architectural understanding of _Executable, Transaction, and Query base classes.
  • Proven History: Successfully completed β‰₯ 10 intermediate issues in this repo.
  • Consistency: β‰₯ 3–4 months of active, human-led contributions to this SDK.

Note

CI/CD Exception: For issues focused on GitHub Actions / Workflows, the repo-specific thresholds above may be waived if the contributor demonstrates advanced-level proficiency in CI/CD.

⚠️ AI Usage Policy

  • Using AI to generate code for Advanced issues is strictly discouraged
  • AI may be used to help explain file relationships, but cannot be the main source of research.
  • Submitting AI-generated or unvalidated code is grounds for immediate closure

⏱️ Timeline & Workflow

  • Typical time: ~1 month / ~50 hours.
  • πŸ”΄ Completing an advanced issue in 1–3 days is a red flag and will likely be rejected.
  • Suggested: Post your proposed architectural approach as a comment and wait for explicit maintainer approval before writing any code.

πŸ”¬ Technical Domains

  • API Client Architecture (request β†’ serialization β†’ execution β†’ response mapping)
  • Backward Compatibility (preserving method signatures, defaults, and return types)
  • Protobuf Alignment (reading .proto files, _to_proto() / _from_proto() correctness)
  • State & Immutability (correct usage of guards like _require_not_frozen)
  • Execution Boundaries (retry logic, backoff, node selection, gRPC deadlines)
  • Testing (unit, integration, mocking, test coverage for edge cases and failure modes)

πŸ›‘οΈ Quality & Review Standards

Advanced PRs must be "safe, maintainable, architecturally sound, and production-ready."

  1. Architectural Fit: The solution must fit naturally into the existing SDK abstractions.
  2. Security & Correctness: Evaluate all logic for injection risks, state corruption, or thread-safety issues.
  3. Maintainability: Code must be short and clear enough for any other maintainer to debug without your assistance.
  4. Backward Compatibility: Public API signatures must be preserved. If a breaking change is required, it must be explicitly managed through a deprecation cycle.
  5. Comprehensive Testing: Must include unit and integration tests covering all new logic paths, edge cases, and failure modes. AI generated tests based on AI generated code is grounds for immediate rejection.

βœ… PR Quality Checklist

Before opening your PR, the contributor must confirm:

  • I have spent the majority of my time researching the problem and solution space extensively, including reviewing relevant code, documentation, and external resources.
  • I understand the system-wide impact of these changes on affected modules and performance.
  • The system design fits with current Hiero SDK architectural approaches.
  • I have tested my changes extensively against both local and network environments.
  • I have verified naming, types, and field ordering against pinned Protobufs.
  • Every line of code is personally understood and explainable.

πŸ“š Resources & Support

References:

Python SDK References:

πŸ†˜ Stuck?

Metadata

Metadata

Assignees

Labels

notes: HIPAdds a HIPscope: DLTinvolves engineering for distributed ledger technologyskill: advancedrequires knowledge of multiple areas in the codebase without defined steps to implement or examples

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions