Skip to content

Commit

Permalink
feat: Cherry-Pick (0.56): Define throttle for GetBalance queries (#16338
Browse files Browse the repository at this point in the history
)

Signed-off-by: Valentin Tronkov <[email protected]>
  • Loading branch information
vtronkov authored Oct 31, 2024
1 parent 76c54fc commit 8978fa6
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 7 deletions.
15 changes: 14 additions & 1 deletion hedera-node/configuration/mainnet/upgrade/throttles.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,24 @@
"opsPerSec": 0,
"milliOpsPerSec": 1000000000,
"operations": [
"CryptoGetAccountBalance",
"TransactionGetReceipt"
]
}
]
},
{
"burstPeriod": 0,
"burstPeriodMs": 1000,
"name": "BalanceQueryLimits",
"throttleGroups": [
{
"opsPerSec": 0,
"milliOpsPerSec": 1000000,
"operations": [
"CryptoGetAccountBalance"
]
}
]
}
]
}
17 changes: 15 additions & 2 deletions hedera-node/configuration/previewnet/upgrade/throttles.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,24 @@
"opsPerSec": 0,
"milliOpsPerSec": 1000000000,
"operations": [
"CryptoGetAccountBalance",
"TransactionGetReceipt"
]
}
]
},
{
"burstPeriod": 0,
"burstPeriodMs": 1000,
"name": "BalanceQueryLimits",
"throttleGroups": [
{
"opsPerSec": 0,
"milliOpsPerSec": 1000000,
"operations": [
"CryptoGetAccountBalance"
]
}
]
}
]
}
}
15 changes: 14 additions & 1 deletion hedera-node/configuration/testnet/upgrade/throttles.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,24 @@
"opsPerSec": 0,
"milliOpsPerSec": 1000000000,
"operations": [
"CryptoGetAccountBalance",
"TransactionGetReceipt"
]
}
]
},
{
"burstPeriod": 0,
"burstPeriodMs": 1000,
"name": "BalanceQueryLimits",
"throttleGroups": [
{
"opsPerSec": 0,
"milliOpsPerSec": 1000000,
"operations": [
"CryptoGetAccountBalance"
]
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
public record StatsConfig(
@ConfigProperty(defaultValue = "<GAS>,ThroughputLimits,CreationLimits") @NodeProperty
List<String> consThrottlesToSample,
@ConfigProperty(defaultValue = "<GAS>,ThroughputLimits,OffHeapQueryLimits,CreationLimits,FreeQueryLimits")
@ConfigProperty(
defaultValue =
"<GAS>,ThroughputLimits,OffHeapQueryLimits,CreationLimits,FreeQueryLimits,BalanceQueryLimits")
@NodeProperty
List<String> hapiThrottlesToSample,
@ConfigProperty(defaultValue = "0") @NodeProperty int executionTimesToTrack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,24 @@
"opsPerSec": 0,
"milliOpsPerSec": 1000000000,
"operations": [
"CryptoGetAccountBalance",
"TransactionGetReceipt"
]
}
]
},
{
"burstPeriod": 0,
"burstPeriodMs": 1000,
"name": "BalanceQueryLimits",
"throttleGroups": [
{
"opsPerSec": 0,
"milliOpsPerSec": 1000000,
"operations": [
"CryptoGetAccountBalance"
]
}
]
}
]
}
}

0 comments on commit 8978fa6

Please sign in to comment.