Skip to content

Commit f8850be

Browse files
committed
merge hotfix/restrict_jsonrpc_size
2 parents 86f8d74 + f28beb3 commit f8850be

14 files changed

Lines changed: 2055 additions & 13 deletions

File tree

common/src/main/java/org/tron/common/parameter/CommonParameter.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,16 @@ public class CommonParameter {
491491
public int jsonRpcMaxBlockFilterNum = 50000;
492492
@Getter
493493
@Setter
494+
public int jsonRpcMaxBatchSize = 100;
495+
@Getter
496+
@Setter
497+
public int jsonRpcMaxResponseSize = 25 * 1024 * 1024;
498+
@Getter
499+
@Setter
500+
public int jsonRpcMaxAddressSize = 1000;
501+
@Getter
502+
@Setter
494503
public int jsonRpcMaxLogFilterNum = 20000;
495-
496504
@Getter
497505
@Setter
498506
public int maxTransactionPendingSize;

common/src/main/java/org/tron/core/config/args/NodeConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ public static class JsonRpcConfig {
292292
private int maxBlockRange = 5000;
293293
private int maxSubTopics = 1000;
294294
private int maxBlockFilterNum = 50000;
295+
private int maxBatchSize = 100;
296+
private int maxResponseSize = 25 * 1024 * 1024;
297+
private int maxAddressSize = 1000;
295298
private int maxLogFilterNum = 20000;
296299
private long maxMessageSize = 4194304;
297300
}

0 commit comments

Comments
 (0)