Return limit zksync (#459)
* validateCallLimit with limit param * add call-validate-contract to zksync * update reader * fix error message * rm disable-validation for testnets/sepolia * fix tests * split CallLimitValidator implementations for zksync and other eth * add callLimitBlockNumber param * mv callLimitBlockNumber to options * upd docs * rm callLimitBlockNumber options param and hardcode it add zskync call limit validator check for debug_traceBlockByNumber is available * zksync limit check only for mainnet
This commit is contained in:
@@ -772,6 +772,17 @@ If it's set to `0` it essentially disables the peer validation.
|
|||||||
| Disables checking for the state of syncing on the upstream (as `eth_syncing` method).
|
| Disables checking for the state of syncing on the upstream (as `eth_syncing` method).
|
||||||
If the Upstream is in _syncing_ state then the Dshackle doesn't use it for call until it reaches the blockchain head.
|
If the Upstream is in _syncing_ state then the Dshackle doesn't use it for call until it reaches the blockchain head.
|
||||||
|
|
||||||
|
| `validate-call-limit`
|
||||||
|
| boolean
|
||||||
|
| `true`
|
||||||
|
| Enable/Disable the call limit validation. Size of call limit is defined by `call-limit` option.
|
||||||
|
If it's enabled configuration parameter for chain `call-limit-contract` is required.
|
||||||
|
|
||||||
|
| `call-limit-size`
|
||||||
|
| number
|
||||||
|
| `1000000`
|
||||||
|
| For all eth-like chains (except zkSync). The maximum size of the call limit. If the upstream exceeds this limit, it will be considered as failed.
|
||||||
|
|
||||||
| `timeout`
|
| `timeout`
|
||||||
| number
|
| number
|
||||||
| `60`
|
| `60`
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ class ChainOptions {
|
|||||||
val validateSyncing: Boolean,
|
val validateSyncing: Boolean,
|
||||||
val validateCallLimit: Boolean,
|
val validateCallLimit: Boolean,
|
||||||
val validateChain: Boolean,
|
val validateChain: Boolean,
|
||||||
|
val callLimitSize: Int,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class DefaultOptions(
|
data class DefaultOptions(
|
||||||
var chains: List<String>? = null,
|
var chains: List<String>? = null,
|
||||||
var options: PartialOptions? = null
|
var options: PartialOptions? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class PartialOptions(
|
data class PartialOptions(
|
||||||
@@ -28,10 +29,11 @@ class ChainOptions {
|
|||||||
var timeout: Duration? = null,
|
var timeout: Duration? = null,
|
||||||
var providesBalance: Boolean? = null,
|
var providesBalance: Boolean? = null,
|
||||||
var validatePeers: Boolean? = null,
|
var validatePeers: Boolean? = null,
|
||||||
var validateCalllimit: Boolean? = null,
|
var validateCallLimit: Boolean? = null,
|
||||||
var minPeers: Int? = null,
|
var minPeers: Int? = null,
|
||||||
var validateSyncing: Boolean? = null,
|
var validateSyncing: Boolean? = null,
|
||||||
var validateChain: Boolean? = null
|
var validateChain: Boolean? = null,
|
||||||
|
var callLimitSize: Int? = null,
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -53,11 +55,12 @@ class ChainOptions {
|
|||||||
copy.validationInterval = overwrites.validationInterval ?: this.validationInterval
|
copy.validationInterval = overwrites.validationInterval ?: this.validationInterval
|
||||||
copy.providesBalance = overwrites.providesBalance ?: this.providesBalance
|
copy.providesBalance = overwrites.providesBalance ?: this.providesBalance
|
||||||
copy.validateSyncing = overwrites.validateSyncing ?: this.validateSyncing
|
copy.validateSyncing = overwrites.validateSyncing ?: this.validateSyncing
|
||||||
copy.validateCalllimit = overwrites.validateCalllimit ?: this.validateCalllimit
|
copy.validateCallLimit = overwrites.validateCallLimit ?: this.validateCallLimit
|
||||||
copy.timeout = overwrites.timeout ?: this.timeout
|
copy.timeout = overwrites.timeout ?: this.timeout
|
||||||
copy.validateChain = overwrites.validateChain ?: this.validateChain
|
copy.validateChain = overwrites.validateChain ?: this.validateChain
|
||||||
copy.disableUpstreamValidation =
|
copy.disableUpstreamValidation =
|
||||||
overwrites.disableUpstreamValidation ?: this.disableUpstreamValidation
|
overwrites.disableUpstreamValidation ?: this.disableUpstreamValidation
|
||||||
|
copy.callLimitSize = overwrites.callLimitSize ?: this.callLimitSize
|
||||||
return copy
|
return copy
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,8 +74,9 @@ class ChainOptions {
|
|||||||
this.validatePeers ?: true,
|
this.validatePeers ?: true,
|
||||||
this.minPeers ?: 1,
|
this.minPeers ?: 1,
|
||||||
this.validateSyncing ?: true,
|
this.validateSyncing ?: true,
|
||||||
this.validateCalllimit ?: true,
|
this.validateCallLimit ?: true,
|
||||||
this.validateChain ?: true,
|
this.validateChain ?: true,
|
||||||
|
this.callLimitSize ?: 1_000_000,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class ChainOptionsReader : YamlConfigReader<ChainOptions.PartialOptions>() {
|
|||||||
options.validateSyncing = it
|
options.validateSyncing = it
|
||||||
}
|
}
|
||||||
getValueAsBool(values, "validate-call-limit")?.let {
|
getValueAsBool(values, "validate-call-limit")?.let {
|
||||||
options.validateCalllimit = it
|
options.validateCallLimit = it
|
||||||
}
|
}
|
||||||
getValueAsBool(values, "validate-chain")?.let {
|
getValueAsBool(values, "validate-chain")?.let {
|
||||||
options.validateChain = it
|
options.validateChain = it
|
||||||
@@ -43,6 +43,9 @@ class ChainOptionsReader : YamlConfigReader<ChainOptions.PartialOptions>() {
|
|||||||
getValueAsBool(values, "balance")?.let {
|
getValueAsBool(values, "balance")?.let {
|
||||||
options.providesBalance = it
|
options.providesBalance = it
|
||||||
}
|
}
|
||||||
|
getValueAsInt(values, "call-limit-size")?.let {
|
||||||
|
options.callLimitSize = it
|
||||||
|
}
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,8 +273,6 @@ chain-settings:
|
|||||||
type: eth
|
type: eth
|
||||||
settings:
|
settings:
|
||||||
expected-block-time: 5s
|
expected-block-time: 5s
|
||||||
options:
|
|
||||||
disable-validation: true
|
|
||||||
lags:
|
lags:
|
||||||
syncing: 40
|
syncing: 40
|
||||||
lagging: 20
|
lagging: 20
|
||||||
|
|||||||
@@ -120,31 +120,19 @@ open class EthereumUpstreamValidator @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun validateCallLimit(): Mono<ValidateUpstreamSettingsResult> {
|
private fun validateCallLimit(): Mono<ValidateUpstreamSettingsResult> {
|
||||||
if (!options.validateCallLimit || config.callLimitContract == null) {
|
val validator = callLimitValidatorFactory(upstream, options, config, chain)
|
||||||
|
if (!validator.isEnabled()) {
|
||||||
return Mono.just(ValidateUpstreamSettingsResult.UPSTREAM_VALID)
|
return Mono.just(ValidateUpstreamSettingsResult.UPSTREAM_VALID)
|
||||||
}
|
}
|
||||||
return upstream.getIngressReader()
|
return upstream.getIngressReader()
|
||||||
.read(
|
.read(validator.createRequest())
|
||||||
ChainRequest(
|
|
||||||
"eth_call",
|
|
||||||
ListParams(
|
|
||||||
TransactionCallJson(
|
|
||||||
Address.from(config.callLimitContract),
|
|
||||||
// calling contract with param 200_000, meaning it will generate 200k symbols or response
|
|
||||||
// f4240 + metadata — ~1 million
|
|
||||||
HexData.from("0xd8a26e3a00000000000000000000000000000000000000000000000000000000000f4240"),
|
|
||||||
),
|
|
||||||
"latest",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.flatMap(ChainResponse::requireResult)
|
.flatMap(ChainResponse::requireResult)
|
||||||
.map { ValidateUpstreamSettingsResult.UPSTREAM_VALID }
|
.map { ValidateUpstreamSettingsResult.UPSTREAM_VALID }
|
||||||
.onErrorResume {
|
.onErrorResume {
|
||||||
if (it.message != null && it.message!!.contains("rpc.returndata.limit")) {
|
if (validator.isLimitError(it)) {
|
||||||
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 1_100_000. " +
|
"You need to set up your return limit to at least ${options.callLimitSize}. " +
|
||||||
"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(ValidateUpstreamSettingsResult.UPSTREAM_FATAL_SETTINGS_ERROR)
|
Mono.just(ValidateUpstreamSettingsResult.UPSTREAM_FATAL_SETTINGS_ERROR)
|
||||||
@@ -221,3 +209,63 @@ open class EthereumUpstreamValidator @JvmOverloads constructor(
|
|||||||
.flatMap(ChainResponse::requireStringResult)
|
.flatMap(ChainResponse::requireStringResult)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface CallLimitValidator {
|
||||||
|
fun isEnabled(): Boolean
|
||||||
|
fun createRequest(): ChainRequest
|
||||||
|
fun isLimitError(err: Throwable): Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
class EthCallLimitValidator(
|
||||||
|
private val options: ChainOptions.Options,
|
||||||
|
private val config: ChainConfig,
|
||||||
|
) : CallLimitValidator {
|
||||||
|
override fun isEnabled() = options.validateCallLimit && config.callLimitContract != null
|
||||||
|
|
||||||
|
override fun createRequest() = ChainRequest(
|
||||||
|
"eth_call",
|
||||||
|
ListParams(
|
||||||
|
TransactionCallJson(
|
||||||
|
Address.from(config.callLimitContract),
|
||||||
|
// contract like https://github.com/p2p-org/dshackle/pull/246
|
||||||
|
// meta + size in hex
|
||||||
|
HexData.from("0xd8a26e3a" + options.callLimitSize.toString(16).padStart(64, '0')),
|
||||||
|
),
|
||||||
|
"latest",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun isLimitError(err: Throwable): Boolean =
|
||||||
|
err.message != null && err.message!!.contains("rpc.returndata.limit")
|
||||||
|
}
|
||||||
|
|
||||||
|
class ZkSyncCallLimitValidator(
|
||||||
|
private val upstream: Upstream,
|
||||||
|
private val options: ChainOptions.Options,
|
||||||
|
) : CallLimitValidator {
|
||||||
|
private val method = "debug_traceBlockByNumber"
|
||||||
|
|
||||||
|
override fun isEnabled() =
|
||||||
|
options.validateCallLimit && upstream.getMethods().getSupportedMethods().contains(method)
|
||||||
|
|
||||||
|
override fun createRequest() = ChainRequest(
|
||||||
|
method,
|
||||||
|
ListParams("0x1b73b2b", mapOf("tracer" to "callTracer")),
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun isLimitError(err: Throwable): Boolean =
|
||||||
|
err.message != null && err.message!!.contains("response size should not greater than")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun callLimitValidatorFactory(
|
||||||
|
upstream: Upstream,
|
||||||
|
options: ChainOptions.Options,
|
||||||
|
config: ChainConfig,
|
||||||
|
chain: Chain,
|
||||||
|
): CallLimitValidator {
|
||||||
|
return if (listOf(Chain.ZKSYNC__MAINNET).contains(chain)) {
|
||||||
|
ZkSyncCallLimitValidator(upstream, options)
|
||||||
|
} else {
|
||||||
|
EthCallLimitValidator(options, config)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
id == "local"
|
id == "local"
|
||||||
chain == "ethereum"
|
chain == "ethereum"
|
||||||
connection instanceof UpstreamsConfig.RpcConnection
|
connection instanceof UpstreamsConfig.RpcConnection
|
||||||
with((UpstreamsConfig.RpcConnection)connection) {
|
with((UpstreamsConfig.RpcConnection) connection) {
|
||||||
rpc != null
|
rpc != null
|
||||||
rpc.url == new URI("http://localhost:8545")
|
rpc.url == new URI("http://localhost:8545")
|
||||||
ws != null
|
ws != null
|
||||||
@@ -62,7 +62,7 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
id == "infura"
|
id == "infura"
|
||||||
chain == "ethereum"
|
chain == "ethereum"
|
||||||
connection instanceof UpstreamsConfig.RpcConnection
|
connection instanceof UpstreamsConfig.RpcConnection
|
||||||
with((UpstreamsConfig.RpcConnection)connection) {
|
with((UpstreamsConfig.RpcConnection) connection) {
|
||||||
rpc.url == new URI("https://mainnet.infura.io/v3/fa28c968191849c1aff541ad1d8511f2")
|
rpc.url == new URI("https://mainnet.infura.io/v3/fa28c968191849c1aff541ad1d8511f2")
|
||||||
rpc.basicAuth != null
|
rpc.basicAuth != null
|
||||||
with((AuthConfig.ClientBasicAuth) rpc.basicAuth) {
|
with((AuthConfig.ClientBasicAuth) rpc.basicAuth) {
|
||||||
@@ -215,7 +215,7 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
with(act.upstreams.get(0)) {
|
with(act.upstreams.get(0)) {
|
||||||
id == "remote"
|
id == "remote"
|
||||||
connection instanceof UpstreamsConfig.GrpcConnection
|
connection instanceof UpstreamsConfig.GrpcConnection
|
||||||
with((UpstreamsConfig.GrpcConnection)connection) {
|
with((UpstreamsConfig.GrpcConnection) connection) {
|
||||||
host == "10.2.0.15"
|
host == "10.2.0.15"
|
||||||
auth != null
|
auth != null
|
||||||
with(auth) {
|
with(auth) {
|
||||||
@@ -279,7 +279,7 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
id == "local"
|
id == "local"
|
||||||
chain == "ethereum"
|
chain == "ethereum"
|
||||||
connection instanceof UpstreamsConfig.RpcConnection
|
connection instanceof UpstreamsConfig.RpcConnection
|
||||||
with((UpstreamsConfig.RpcConnection)connection) {
|
with((UpstreamsConfig.RpcConnection) connection) {
|
||||||
rpc != null
|
rpc != null
|
||||||
rpc.url == new URI("http://localhost:8545")
|
rpc.url == new URI("http://localhost:8545")
|
||||||
ws == null
|
ws == null
|
||||||
@@ -451,13 +451,13 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
disableValidation == false
|
disableValidation == false
|
||||||
validateSyncing == true
|
validateSyncing == true
|
||||||
validatePeers == false
|
validatePeers == false
|
||||||
validateCalllimit == true
|
validateCallLimit == true
|
||||||
}
|
}
|
||||||
with(act.upstreams.get(1).options) {
|
with(act.upstreams.get(1).options) {
|
||||||
disableValidation == false
|
disableValidation == false
|
||||||
validateSyncing == false
|
validateSyncing == false
|
||||||
validatePeers == false
|
validatePeers == false
|
||||||
validateCalllimit == false
|
validateCallLimit == false
|
||||||
}
|
}
|
||||||
with(act.upstreams.get(2).options) {
|
with(act.upstreams.get(2).options) {
|
||||||
disableValidation == true
|
disableValidation == true
|
||||||
@@ -496,18 +496,18 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
result.disableValidation == exp
|
result.disableValidation == exp
|
||||||
|
|
||||||
where:
|
where:
|
||||||
base | overwrite | exp
|
base | overwrite | exp
|
||||||
true | true | true
|
true | true | true
|
||||||
true | false | false
|
true | false | false
|
||||||
true | null | true
|
true | null | true
|
||||||
|
|
||||||
false | true | true
|
false | true | true
|
||||||
false | false | false
|
false | false | false
|
||||||
false | null | false
|
false | null | false
|
||||||
|
|
||||||
null | true | true
|
null | true | true
|
||||||
null | false | false
|
null | false | false
|
||||||
null | null | false
|
null | null | false
|
||||||
}
|
}
|
||||||
|
|
||||||
def "Merge options for providesBalance"() {
|
def "Merge options for providesBalance"() {
|
||||||
@@ -518,18 +518,18 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
result.providesBalance == exp
|
result.providesBalance == exp
|
||||||
|
|
||||||
where:
|
where:
|
||||||
base | overwrite | exp
|
base | overwrite | exp
|
||||||
true | true | true
|
true | true | true
|
||||||
true | false | false
|
true | false | false
|
||||||
true | null | true
|
true | null | true
|
||||||
|
|
||||||
false | true | true
|
false | true | true
|
||||||
false | false | false
|
false | false | false
|
||||||
false | null | false
|
false | null | false
|
||||||
|
|
||||||
null | true | true
|
null | true | true
|
||||||
null | false | false
|
null | false | false
|
||||||
null | null | null
|
null | null | null
|
||||||
}
|
}
|
||||||
|
|
||||||
def "Merge options for validatePeers"() {
|
def "Merge options for validatePeers"() {
|
||||||
@@ -540,18 +540,18 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
result.validatePeers == exp
|
result.validatePeers == exp
|
||||||
|
|
||||||
where:
|
where:
|
||||||
base | overwrite | exp
|
base | overwrite | exp
|
||||||
true | true | true
|
true | true | true
|
||||||
true | false | false
|
true | false | false
|
||||||
true | null | true
|
true | null | true
|
||||||
|
|
||||||
false | true | true
|
false | true | true
|
||||||
false | false | false
|
false | false | false
|
||||||
false | null | false
|
false | null | false
|
||||||
|
|
||||||
null | true | true
|
null | true | true
|
||||||
null | false | false
|
null | false | false
|
||||||
null | null | true
|
null | null | true
|
||||||
}
|
}
|
||||||
|
|
||||||
def "Merge options for validateSyncing"() {
|
def "Merge options for validateSyncing"() {
|
||||||
@@ -562,18 +562,18 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
result.validateSyncing == exp
|
result.validateSyncing == exp
|
||||||
|
|
||||||
where:
|
where:
|
||||||
base | overwrite | exp
|
base | overwrite | exp
|
||||||
true | true | true
|
true | true | true
|
||||||
true | false | false
|
true | false | false
|
||||||
true | null | true
|
true | null | true
|
||||||
|
|
||||||
false | true | true
|
false | true | true
|
||||||
false | false | false
|
false | false | false
|
||||||
false | null | false
|
false | null | false
|
||||||
|
|
||||||
null | true | true
|
null | true | true
|
||||||
null | false | false
|
null | false | false
|
||||||
null | null | true
|
null | null | true
|
||||||
}
|
}
|
||||||
|
|
||||||
def "Merge options for timeout"() {
|
def "Merge options for timeout"() {
|
||||||
@@ -589,12 +589,12 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
result.timeout == expValue
|
result.timeout == expValue
|
||||||
|
|
||||||
where:
|
where:
|
||||||
base | overwrite | exp
|
base | overwrite | exp
|
||||||
1 | 2 | 2
|
1 | 2 | 2
|
||||||
3 | 4 | 4
|
3 | 4 | 4
|
||||||
5 | null | 5
|
5 | null | 5
|
||||||
null | 6 | 6
|
null | 6 | 6
|
||||||
null | null | null
|
null | null | null
|
||||||
}
|
}
|
||||||
|
|
||||||
def "Merge options for minPeers"() {
|
def "Merge options for minPeers"() {
|
||||||
@@ -605,12 +605,12 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
result.minPeers == exp
|
result.minPeers == exp
|
||||||
|
|
||||||
where:
|
where:
|
||||||
base | overwrite | exp
|
base | overwrite | exp
|
||||||
1 | 2 | 2
|
1 | 2 | 2
|
||||||
3 | 4 | 4
|
3 | 4 | 4
|
||||||
5 | null | 5
|
5 | null | 5
|
||||||
null | 6 | 6
|
null | 6 | 6
|
||||||
null | null | 1
|
null | null | 1
|
||||||
}
|
}
|
||||||
|
|
||||||
def "Merge options for validationInterval"() {
|
def "Merge options for validationInterval"() {
|
||||||
@@ -621,12 +621,12 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
result.validationInterval == exp
|
result.validationInterval == exp
|
||||||
|
|
||||||
where:
|
where:
|
||||||
base | overwrite | exp
|
base | overwrite | exp
|
||||||
1 | 2 | 2
|
1 | 2 | 2
|
||||||
3 | 4 | 4
|
3 | 4 | 4
|
||||||
5 | null | 5
|
5 | null | 5
|
||||||
null | 6 | 6
|
null | 6 | 6
|
||||||
null | null | 30
|
null | null | 30
|
||||||
}
|
}
|
||||||
|
|
||||||
def "Options with default values"() {
|
def "Options with default values"() {
|
||||||
@@ -636,7 +636,7 @@ class UpstreamsConfigReaderSpec extends Specification {
|
|||||||
def options = partialOptions.buildOptions()
|
def options = partialOptions.buildOptions()
|
||||||
then:
|
then:
|
||||||
options == new ChainOptions.Options(
|
options == new ChainOptions.Options(
|
||||||
false, false, 30, Duration.ofSeconds(60), null, true, 1, true, true, true
|
false, false, 30, Duration.ofSeconds(60), null, true, 1, true, true, true, 1_000_000
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ class EthereumUpstreamValidatorSpec extends Specification {
|
|||||||
def "Doesnt validate chan and callLimit when disabled"() {
|
def "Doesnt validate chan and callLimit when disabled"() {
|
||||||
setup:
|
setup:
|
||||||
def options = ChainOptions.PartialOptions.getDefaults().tap {
|
def options = ChainOptions.PartialOptions.getDefaults().tap {
|
||||||
it.validateCalllimit = false
|
it.validateCallLimit = false
|
||||||
it.validateChain = false
|
it.validateChain = false
|
||||||
}.buildOptions()
|
}.buildOptions()
|
||||||
def up = Mock(Upstream) {
|
def up = Mock(Upstream) {
|
||||||
@@ -344,7 +344,7 @@ class EthereumUpstreamValidatorSpec extends Specification {
|
|||||||
def "Upstream is valid if chain settings are valid"() {
|
def "Upstream is valid if chain settings are valid"() {
|
||||||
setup:
|
setup:
|
||||||
def options = ChainOptions.PartialOptions.getDefaults().tap {
|
def options = ChainOptions.PartialOptions.getDefaults().tap {
|
||||||
it.validateCalllimit = false
|
it.validateCallLimit = false
|
||||||
}.buildOptions()
|
}.buildOptions()
|
||||||
def up = Mock(Upstream) {
|
def up = Mock(Upstream) {
|
||||||
4 * getIngressReader() >> Mock(Reader) {
|
4 * getIngressReader() >> Mock(Reader) {
|
||||||
@@ -366,7 +366,7 @@ class EthereumUpstreamValidatorSpec extends Specification {
|
|||||||
def "Upstream is not valid - specified optimism but got ethereum"() {
|
def "Upstream is not valid - specified optimism but got ethereum"() {
|
||||||
setup:
|
setup:
|
||||||
def options = ChainOptions.PartialOptions.getDefaults().tap {
|
def options = ChainOptions.PartialOptions.getDefaults().tap {
|
||||||
it.validateCalllimit = false
|
it.validateCallLimit = false
|
||||||
}.buildOptions()
|
}.buildOptions()
|
||||||
def up = Mock(Upstream) {
|
def up = Mock(Upstream) {
|
||||||
4 * getIngressReader() >> Mock(Reader) {
|
4 * getIngressReader() >> Mock(Reader) {
|
||||||
|
|||||||
Reference in New Issue
Block a user