status-im / status-go

The Status module that consumes go-ethereum
https://status.im
Mozilla Public License 2.0
728 stars 246 forks source link

Feat/restore connector service #5403

Closed MishkaRogachev closed 3 months ago

MishkaRogachev commented 3 months ago

Description

Restore https://github.com/status-im/status-go/pull/5375

Changes:

This PR is a continuation from 5375

Tests

To test I had to update some non-committed file to enable the connector service.

🟢 Tested (example for account eth_accounts above) 🟠 (In progress) Tried command without required parameters 🔴 Not supported

Method State Comments
eth_requestAccounts 🔴 the method eth_requestAccounts does not exist/is not available
eth_sendTransaction 🔴 method is unsupported by RPC interface
eth_chainId 🔴 the method eth_chainId does not exist/is not available
eth_protocolVersion 🟢
eth_accounts 🟢
eth_syncing 🟢
eth_coinbase 🟠 The method eth_coinbase does not exist/is not available'. run error was 'etherbase must be explicitly specified
eth_mining 🟢
eth_hashrate 🟢
eth_gasPrice 🟢
eth_maxPriorityFeePerGas 🟢
eth_feeHistory 🟢
eth_blockNumber 🟢
eth_getBalance 🟢
eth_getStorageAt 🟢
eth_getTransactionCount 🟠 fallback failed with 'missing value for required argument 0'. run error was 'Relay request failed validation: invalid relay request: invalid eth_getTransactionCount parameters object: empty params array
eth_getBlockTransactionCountByHash 🟠 fallback failed with 'missing value for required argument 1'. run error was 'missing value for required argument 0
eth_getBlockTransactionCountByNumber 🟠 fallback failed with 'missing value for required argument 1'. run error was 'missing value for required argument 0
eth_getUncleCountByBlockHash 🟠 fallback failed with 'missing value for required argument 0'. run error was 'missing value for required argument
eth_getUncleCountByBlockNumber 🟠 fallback failed with 'missing value for required argument 0'. run error was 'missing value for required argument 0
eth_getCode 🟠 fallback failed with 'missing value for required argument 0'. run error was 'Relay request failed validation: invalid relay request: invalid eth_getCode parameters object: empty params array
eth_sendRawTransaction 🟠 fallback failed with 'invalid parameters: not enough params to decode'. run error was 'missing value for required argument 0
eth_call 🟠 fallback failed with 'missing value for required argument 0'. run error was 'Relay request failed validation: invalid relay request: invalid eth_call parameters object: empty params array
eth_estimateGas 🟠 fallback failed with 'missing value for required argument 0'. run error was 'Relay request failed validation: invalid relay request: invalid eth_estimateGas parameters object: empty params array
eth_getBlockByHash 🟠 fallback failed with 'missing value for required argument 2'. run error was 'missing value for required argument 0
eth_getBlockByNumber 🟠 fallback failed with 'missing value for required argument 2'. run error was 'missing value for required argument 0
eth_getTransactionByHash 🟠 fallback failed with 'missing value for required argument 1'. run error was 'missing value for required argument 0
eth_getTransactionByBlockHashAndIndex 🟠 fallback failed with 'missing value for required argument 2'. run error was 'missing value for required argument 0
eth_getTransactionByBlockNumberAndIndex 🟠 fallback failed with 'missing value for required argument 2'. run error was 'missing value for required argument 0
eth_getTransactionReceipt 🟠 fallback failed with 'missing value for required argument 2'. run error was 'missing value for required argument 0
eth_getUncleByBlockHashAndIndex 🟠 fallback failed with 'missing value for required argument 2'. run error was 'missing value for required argument 0
eth_getUncleByBlockNumberAndIndex 🟠 fallback failed with 'missing value for required argument 2'. run error was 'missing value for required argument 0
eth_getLogs 🟠 fallback failed with 'Invalid params: invalid length 0, expected a tuple of size 1.'. run error was 'Relay request failed validation: invalid relay request: invalid eth_getLogs parameters object: empty params array
eth_getWork 🟠 fallback failed with 'the method eth_getWork does not exist/is not available'. run error was 'not supported, consensus engine is not ethash
eth_submitWork 🟠 the method eth_submitWork does not exist/is not available'. run error was 'missing value for required argument 0
eth_submitHashrate 🟠 fallback failed with 'the method eth_submitHashrate does not exist/is not available'. run error was 'missing value for required argument 0
net_version 🟢
net_peerCount 🟢
net_listening 🟢
status-im-auto commented 3 months ago

Jenkins Builds

Click to see older builds (10) | :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result | |-|-|-|-|-|-|-| | :heavy_check_mark: | 84952bfc97bde466a510b5cadfec848285fe7177 | [#1](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5403/1/) | 2024-06-21 14:04:41 | ~3 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240621-140049-84952bfc97bde466a510b5cadfec848285fe7177-pr5403.zip) | | :heavy_check_mark: | 84952bfc97bde466a510b5cadfec848285fe7177 | [#1](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5403/1/) | 2024-06-21 14:05:55 | ~5 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240621-140049-84952bfc97bde466a510b5cadfec848285fe7177-pr5403.zip) | | :heavy_check_mark: | 84952bfc97bde466a510b5cadfec848285fe7177 | [#1](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5403/1/) | 2024-06-21 14:06:38 | ~5 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240621-140049-84952bfc97bde466a510b5cadfec848285fe7177-pr5403.aar) | | | | | | | | | | :heavy_multiplication_x: | 84952bfc | [#1](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5403/1/) | 2024-06-21 14:06:00 | ~5 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5403/1//consoleText) | | | | | | | | | | :heavy_check_mark: | c28d4387ae3c588ccac9710a1a1043971682a805 | [#2](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5403/2/) | 2024-06-21 17:11:33 | ~3 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240621-170812-c28d4387ae3c588ccac9710a1a1043971682a805-pr5403.zip) | | :heavy_check_mark: | c28d4387ae3c588ccac9710a1a1043971682a805 | [#2](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5403/2/) | 2024-06-21 17:12:25 | ~4 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240621-170812-c28d4387ae3c588ccac9710a1a1043971682a805-pr5403.zip) | | :heavy_check_mark: | c28d4387ae3c588ccac9710a1a1043971682a805 | [#2](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5403/2/) | 2024-06-21 17:13:50 | ~5 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240621-170812-c28d4387ae3c588ccac9710a1a1043971682a805-pr5403.aar) | | | | | | | | | | :heavy_check_mark: | 32d0de3560fd7cf32847a214f34728404227d122 | [#3](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5403/3/) | 2024-06-21 17:38:50 | ~2 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240621-173627-32d0de3560fd7cf32847a214f34728404227d122-pr5403.aar) | | :heavy_check_mark: | 32d0de3560fd7cf32847a214f34728404227d122 | [#3](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5403/3/) | 2024-06-21 17:39:04 | ~2 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240621-173627-32d0de3560fd7cf32847a214f34728404227d122-pr5403.zip) | | :heavy_check_mark: | 32d0de3560fd7cf32847a214f34728404227d122 | [#3](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5403/3/) | 2024-06-21 17:40:26 | ~3 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240621-173631-32d0de3560fd7cf32847a214f34728404227d122-pr5403.zip) |
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: c28d4387 #2 2024-06-21 17:52:12 ~43 min tests :page_facing_up:log
:heavy_check_mark: 32d0de35 #3 2024-06-21 18:34:04 ~41 min tests :page_facing_up:log
kounkou commented 3 months ago

Tested that everything works as expected

curl -X POST http://127.0.0.1:8545      -H 'Content-type: application/json'      -d '{
         "jsonrpc": "2.0",
         "id": 37,
         "method": "connector_callRPC",
         "params": ["{\"method\": \"eth_accounts\", \"params\": []}"]
     }' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   292  100   128  100   164   118k   151k --:--:-- --:--:-- --:--:--  285k
{
  "jsonrpc": "2.0",
  "id": 37,
  "result": "{\"jsonrpc\":\"2.0\",\"id\":0,\"result\":[\"0x6f29cea3011904b143dea3a09f736f8cbf83c0c1\"]}"
}
kounkou commented 3 months ago

Approved on @MishkaRogachev behalf since he opened the PR

MishkaRogachev commented 3 months ago

I can't review this PR since i've opened it. @kounkou i think you can merge it!