problem: ChainLink client fails because eth_getLogs is not available

rel: #136
This commit is contained in:
Igor Artamonov
2021-12-25 12:35:02 -05:00
parent f2b471c56f
commit b397a907b1
2 changed files with 10 additions and 11 deletions

View File

@@ -157,7 +157,7 @@ Dshackle currently supports
=== Ethereum Methods === Ethereum Methods
.By default an ethereum upstream allows calls to the following JSON RPC methods: .By default, an ethereum upstream allows calls to the following JSON RPC methods:
- `eth_gasPrice` - `eth_gasPrice`
- `eth_call` - `eth_call`
- `eth_estimateGas` - `eth_estimateGas`
@@ -180,6 +180,7 @@ Dshackle currently supports
- `eth_getTransactionReceipt` - `eth_getTransactionReceipt`
- `eth_getUncleByBlockNumberAndIndex` - `eth_getUncleByBlockNumberAndIndex`
- `eth_feeHistory` - `eth_feeHistory`
- `eth_getLogs`
.Plus following methods are answered directly by Dshackle .Plus following methods are answered directly by Dshackle
- `net_version` - `net_version`
@@ -193,8 +194,8 @@ Dshackle currently supports
- `eth_hashrate` - `eth_hashrate`
- `eth_accounts` - `eth_accounts`
It's possible to enable additional methods that are available on upstream, or disable an existing method.For that purpose It's possible to enable additional methods that are available on upstream, or disable an existing method.
there is `methods` configuration: For that purpose there is `methods` configuration:
[source, yaml] [source, yaml]
---- ----
@@ -210,19 +211,16 @@ upstreams:
- name: eth_getBlockByNumber - name: eth_getBlockByNumber
---- ----
Such configuration option allows to execute method `trace_transaction` and also disables `eth_getBlockByNumber` on that Such configuration option allows executing method `trace_transaction` and also disables `eth_getBlockByNumber` on that particular upstream.
particular upstream.If a client requests to execute method `trace_transaction` then it will be scheduled to that upstream (or If a client requests to execute method `trace_transaction` then it will be scheduled to that upstream (or any upstream with such method enabled).
any upstream with such method enabled).
NOTE: It's especially useful when used together with upstream labels.If an archive upstream has label `archive: true` it's NOTE: It's especially useful when used together with upstream labels.If an archive upstream has label `archive: true` it's possible to specify that the client wants to execute method `trace_transaction` only on an archive node(s), which has complete historical data for tracing.
possible to specify that the client wants to execute method `trace_transaction` only on an archive node(s), which has
complete historical data for tracing.
=== Static Methods === Static Methods
You can overwrite existing methods or add new ones using a static response: You can overwrite existing methods or add new ones using a static response:
[source, yaml] [source,yaml]
---- ----
upstreams: upstreams:
- id: my-node - id: my-node

View File

@@ -49,7 +49,8 @@ class DefaultEthereumMethods(
"eth_getTransactionByBlockHashAndIndex", "eth_getTransactionByBlockHashAndIndex",
"eth_getStorageAt", "eth_getStorageAt",
"eth_getCode", "eth_getCode",
"eth_getUncleByBlockHashAndIndex" "eth_getUncleByBlockHashAndIndex",
"eth_getLogs"
) )
private val specialMethods = listOf( private val specialMethods = listOf(