hiero-ledger / hiero-ledger/hiero-consensus-node

Update throttle definitions

Open
#2,741 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

### Problem

Our [current throttle definitions](https://github.com/hashgraph/hedera-services/blob/aff3e0b0da8ae9f0311b7056098082ebd4ce2d19/hedera-node/src/main/resources/throttles.json) define one bucket called `ThroughputLimits` in which all API calls are listed with limits based on 10K TPS. For example, a crypto transfer is in the 10K throttle group, while something more expensive like `ScheduleSign` is in the 100tps throttle group. Thus, a single `ScheduleSign` costs as much as 100 crypto transfers (since 1/100 == 100/10,000). This bucket throttles **compute** (and network transfer).

We then have additional throttle buckets like `CreationLimits` which throttles **state growth** by placing limits on the growth rate of certain entities. For example, I can only create 5 consensus topics per second. The problem is, if I do create 5 consensus topics per second, there will be no capacity left in the bucket for `TokenCreate`, `TokenAssociateToAccount`, or `ScheduleCreate`.

So we should re-evaluate this creation bucket and decide whether these items should truly be grouped, or if each should be a separate bucket. Maybe only break out `ConsensusCreateTopic` into its own bucket, or only `ConsensusCreateTopic` and `ScheduleCreate`. We need to analyze the cost of these state growths and make a call. We don't want legitimate use of HCS to impact legitimate use of HTS.

### Solution

Measure the impact on state for each of the entities limited by `CreationLimits` and decide which, if any to break out.

### Alternatives

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with hedera-node/src/main/resources/throttles.json and inspect the entities grouped under CreationLimits. Measure the state-growth impact of each listed entity, then decide which items need separate buckets; done means the grouping decision is documented in the configuration and legitimate HCS and HTS usage no longer improperly competes for capacity.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.