Increase REST server default limits. (#2991)
* Increase REST server default limits. * Fix compilation error. * Fix tests.
This commit is contained in:
parent
b66e7c8573
commit
75a8fe3b2c
|
@ -65,9 +65,14 @@ template init(T: type RestServerRef, ip: ValidIpAddress, port: Port): T =
|
|||
HttpServerFlags.NotifyDisconnect}
|
||||
# We increase default timeout to help validator clients who poll our server
|
||||
# at least once per slot (12.seconds).
|
||||
let headersTimeout = seconds(2'i64 * int64(SECONDS_PER_SLOT))
|
||||
let
|
||||
headersTimeout = seconds(2'i64 * int64(SECONDS_PER_SLOT))
|
||||
maxHeadersSize = 65536 # 64 kilobytes
|
||||
maxRequestBodySize = 16_777_216 # 16 megabytes
|
||||
let res = RestServerRef.new(getRouter(), address, serverFlags = serverFlags,
|
||||
httpHeadersTimeout = headersTimeout)
|
||||
httpHeadersTimeout = headersTimeout,
|
||||
maxHeadersSize = maxHeadersSize,
|
||||
maxRequestBodySize = maxRequestBodySize)
|
||||
if res.isErr():
|
||||
notice "Rest server could not be started", address = $address,
|
||||
reason = res.error()
|
||||
|
|
|
@ -24,7 +24,7 @@ export forks, phase0, altair
|
|||
const
|
||||
# https://github.com/ethereum/eth2.0-APIs/blob/master/apis/beacon/states/validator_balances.yaml#L17
|
||||
# https://github.com/ethereum/eth2.0-APIs/blob/master/apis/beacon/states/validators.yaml#L17
|
||||
MaximumValidatorIds* = 30
|
||||
MaximumValidatorIds* = 16384
|
||||
|
||||
type
|
||||
EventTopic* {.pure.} = enum
|
||||
|
|
|
@ -531,9 +531,9 @@
|
|||
"headers": {"Accept": "application/json"}
|
||||
},
|
||||
"response": {
|
||||
"status": {"operator": "equals", "value": "400"},
|
||||
"status": {"operator": "equals", "value": "200"},
|
||||
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
|
||||
"body": [{"operator": "jstructcmpns", "value": {"code": "", "message": ""}}]
|
||||
"body": [{"operator": "jstructcmps", "start": ["data"], "value": [{"index": "", "balance": "", "status": "", "validator": {"pubkey": "", "withdrawal_credentials": "", "effective_balance": "", "slashed": false, "activation_eligibility_epoch": "", "activation_epoch": "", "exit_epoch": "", "withdrawable_epoch": ""}}]}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1218,9 +1218,9 @@
|
|||
"headers": {"Accept": "application/json"}
|
||||
},
|
||||
"response": {
|
||||
"status": {"operator": "equals", "value": "400"},
|
||||
"status": {"operator": "equals", "value": "200"},
|
||||
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
|
||||
"body": [{"operator": "jstructcmpns", "value": {"code": "", "message": ""}}]
|
||||
"body": [{"operator": "jstructcmps", "start": ["data"], "value": [{"index": "", "balance": ""}]}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue