now limit for return call is 1 million (#293)
This commit is contained in:
@@ -186,8 +186,8 @@ open class EthereumUpstreamValidator @JvmOverloads constructor(
|
|||||||
TransactionCallJson(
|
TransactionCallJson(
|
||||||
Address.from(callLimitContract),
|
Address.from(callLimitContract),
|
||||||
// calling contract with param 200_000, meaning it will generate 200k symbols or response
|
// calling contract with param 200_000, meaning it will generate 200k symbols or response
|
||||||
// 30ce0 + metadata — 200_000k
|
// f4240 + metadata — ~1 million
|
||||||
HexData.from("0xd8a26e3a0000000000000000000000000000000000000000000000000000000000030ce0")
|
HexData.from("0xd8a26e3a00000000000000000000000000000000000000000000000000000000000f4240")
|
||||||
),
|
),
|
||||||
"latest"
|
"latest"
|
||||||
)
|
)
|
||||||
@@ -199,7 +199,7 @@ open class EthereumUpstreamValidator @JvmOverloads constructor(
|
|||||||
if (it.message != null && it.message!!.contains("rpc.returndata.limit")) {
|
if (it.message != null && it.message!!.contains("rpc.returndata.limit")) {
|
||||||
log.warn(
|
log.warn(
|
||||||
"Error: ${it.message}. Node ${upstream.getId()} is probably incorrectly configured. " +
|
"Error: ${it.message}. Node ${upstream.getId()} is probably incorrectly configured. " +
|
||||||
"You need to set up your return limit to at least 200000. " +
|
"You need to set up your return limit to at least 1_100_000. " +
|
||||||
"Erigon config example: https://github.com/ledgerwatch/erigon/blob/d014da4dc039ea97caf04ed29feb2af92b7b129d/cmd/utils/flags.go#L369"
|
"Erigon config example: https://github.com/ledgerwatch/erigon/blob/d014da4dc039ea97caf04ed29feb2af92b7b129d/cmd/utils/flags.go#L369"
|
||||||
)
|
)
|
||||||
Mono.just(false)
|
Mono.just(false)
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ class EthereumUpstreamValidatorSpec extends Specification {
|
|||||||
3 * getIngressReader() >> Mock(Reader) {
|
3 * getIngressReader() >> Mock(Reader) {
|
||||||
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
||||||
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
||||||
HexData.from("0xd8a26e3a0000000000000000000000000000000000000000000000000000000000030ce0")
|
HexData.from("0xd8a26e3a00000000000000000000000000000000000000000000000000000000000f4240")
|
||||||
), "latest"])) >> Mono.just(new JsonRpcResponse("0x00000000000000000000".getBytes(), null))
|
), "latest"])) >> Mono.just(new JsonRpcResponse("0x00000000000000000000".getBytes(), null))
|
||||||
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
||||||
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
||||||
@@ -318,7 +318,7 @@ class EthereumUpstreamValidatorSpec extends Specification {
|
|||||||
3 * getIngressReader() >> Mock(Reader) {
|
3 * getIngressReader() >> Mock(Reader) {
|
||||||
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
||||||
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
||||||
HexData.from("0xd8a26e3a0000000000000000000000000000000000000000000000000000000000030ce0")
|
HexData.from("0xd8a26e3a00000000000000000000000000000000000000000000000000000000000f4240")
|
||||||
), "latest"])) >> Mono.just(new JsonRpcResponse(null, new JsonRpcError(1, "Too long")))
|
), "latest"])) >> Mono.just(new JsonRpcResponse(null, new JsonRpcError(1, "Too long")))
|
||||||
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
||||||
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
||||||
@@ -386,7 +386,7 @@ class EthereumUpstreamValidatorSpec extends Specification {
|
|||||||
1 * read(new JsonRpcRequest("net_version", emptyList())) >> Mono.just(new JsonRpcResponse('"1"'.getBytes(), null))
|
1 * read(new JsonRpcRequest("net_version", emptyList())) >> Mono.just(new JsonRpcResponse('"1"'.getBytes(), null))
|
||||||
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
||||||
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
||||||
HexData.from("0xd8a26e3a0000000000000000000000000000000000000000000000000000000000030ce0")
|
HexData.from("0xd8a26e3a00000000000000000000000000000000000000000000000000000000000f4240")
|
||||||
), "latest"])) >> Mono.just(new JsonRpcResponse("0x00000000000000000000".getBytes(), null))
|
), "latest"])) >> Mono.just(new JsonRpcResponse("0x00000000000000000000".getBytes(), null))
|
||||||
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
||||||
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
||||||
@@ -410,7 +410,7 @@ class EthereumUpstreamValidatorSpec extends Specification {
|
|||||||
1 * read(new JsonRpcRequest("net_version", emptyList())) >> Mono.just(new JsonRpcResponse(null, new JsonRpcError(1, "Too long")))
|
1 * read(new JsonRpcRequest("net_version", emptyList())) >> Mono.just(new JsonRpcResponse(null, new JsonRpcError(1, "Too long")))
|
||||||
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
1 * read(new JsonRpcRequest("eth_call", [new TransactionCallJson(
|
||||||
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
Address.from("0x32268860cAAc2948Ab5DdC7b20db5a420467Cf96"),
|
||||||
HexData.from("0xd8a26e3a0000000000000000000000000000000000000000000000000000000000030ce0")
|
HexData.from("0xd8a26e3a00000000000000000000000000000000000000000000000000000000000f4240")
|
||||||
), "latest"])) >> Mono.just(new JsonRpcResponse(null, new JsonRpcError(1, "Too long")))
|
), "latest"])) >> Mono.just(new JsonRpcResponse(null, new JsonRpcError(1, "Too long")))
|
||||||
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
1 * read(new JsonRpcRequest("eth_blockNumber", [])) >> Mono.just(new JsonRpcResponse('"0x10ff9be"'.getBytes(), null))
|
||||||
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
1 * read(new JsonRpcRequest("eth_getBlockByNumber", ["0x10fd2ae", false])) >>
|
||||||
|
|||||||
Reference in New Issue
Block a user