Upgrade node version to 18 in watcher-ts Dockerfile

This commit is contained in:
Prathamesh Musale 2023-10-05 14:33:25 +05:30
parent 002da5b345
commit d3f85f7bac
4 changed files with 22 additions and 30 deletions

View File

@ -99,7 +99,7 @@
rpcProviderMutationEndpoint = 'REPLACE_WITH_CERC_ETH_RPC_MUTATION_ENDPOINT' rpcProviderMutationEndpoint = 'REPLACE_WITH_CERC_ETH_RPC_MUTATION_ENDPOINT'
[upstream.ethServer.payments] [upstream.ethServer.payments]
paidRPCMethods = ["eth_getBlockByHash", "eth_getStorageAt"] paidRPCMethods = ["eth_getBlockByHash", "eth_getBlockByNumber", "eth_getStorageAt"]
amount = 'REPLACE_WITH_UPSTREAM_NITRO_PAY_AMOUNT' amount = 'REPLACE_WITH_UPSTREAM_NITRO_PAY_AMOUNT'
[upstream.ethServer.payments.nitro] [upstream.ethServer.payments.nitro]

View File

@ -1,4 +1,4 @@
FROM node:16.17.1-alpine3.16 FROM node:18.17.1-alpine3.18
RUN apk --update --no-cache add git python3 alpine-sdk jq RUN apk --update --no-cache add git python3 alpine-sdk jq

View File

@ -25,22 +25,18 @@
* Check the payment channel status: * Check the payment channel status:
```bash ```bash
npm exec -c 'nitro-rpc-client get-payment-channel <WATCHER_UPSTREAM_PAYMENT_CHANNEL> -h <hostname> -p <port>' docker exec payments-nitro-rpc-client-1 npm exec -c "nitro-rpc-client get-payment-channel $WATCHER_UPSTREAM_PAYMENT_CHANNEL -h go-nitro -p 4005"
# Expected output: # Expected output:
# { # {
# "jsonrpc": "2.0", # ID: '0x8c0d17639bd2ba07dbcd248304a8f3c6c7276bfe25c2b87fe41f461e20f33f01',
# "id": 1, # Status: 'Open',
# "result": { # Balance: {
# "ID": "0xfe1231722d6c2cd7af8606afe039582ebc438ee5ca2b956f8284cb497597583f", # AssetAddress: '0x0000000000000000000000000000000000000000',
# "Status": "Open", # Payee: '0xaaa6628ec44a8a742987ef3a114ddfe2d4f7adce',
# "Balance": { # Payer: '0xbbb676f9cff8d242e9eac39d063848807d3d1d94',
# "AssetAddress": "0x0000000000000000000000000000000000000000", # PaidSoFar: 0n,
# "Payee": "0xaaa6628ec44a8a742987ef3a114ddfe2d4f7adce", # RemainingFunds: 1000000000n
# "Payer": "0xbbb676f9cff8d242e9eac39d063848807d3d1d94",
# "PaidSoFar": "0x0",
# "RemainingFunds": "0x3b9aca00"
# }
# } # }
# } # }
``` ```
@ -114,7 +110,7 @@
* Perform phisher status check queries now that a payment channel is created: * Perform phisher status check queries now that a payment channel is created:
* Check the watcher logs for received payments * Check the watcher logs for received payments
* Check the payment proxy server logs for charged RPC requests (`eth_getBlockByHash`, `eth_getStorageAt`) made from watcher to upstream ETH server * Check the payment proxy server logs for charged RPC requests (`eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getStorageAt`) made from watcher to upstream ETH server
* Change the amount besides `PAY` button to `>=100` for phisher reports next * Change the amount besides `PAY` button to `>=100` for phisher reports next
@ -123,22 +119,18 @@
* Check the watcher - eth-server payment channel status after a few requests: * Check the watcher - eth-server payment channel status after a few requests:
```bash ```bash
npm exec -c 'nitro-rpc-client get-payment-channel <WATCHER_UPSTREAM_PAYMENT_CHANNEL> -h <hostname> -p <port>' docker exec payments-nitro-rpc-client-1 npm exec -c "nitro-rpc-client get-payment-channel $WATCHER_UPSTREAM_PAYMENT_CHANNEL -h go-nitro -p 4005"
# Expected output ('PaidSoFar' should be non zero): # Expected output ('PaidSoFar' should be non zero):
# { # {
# "jsonrpc": "2.0", # ID: '0x8c0d17639bd2ba07dbcd248304a8f3c6c7276bfe25c2b87fe41f461e20f33f01',
# "id": 1, # Status: 'Open',
# "result": { # Balance: {
# "ID": "0xfe1231722d6c2cd7af8606afe039582ebc438ee5ca2b956f8284cb497597583f", # AssetAddress: '0x0000000000000000000000000000000000000000',
# "Status": "Open", # Payee: '0xaaa6628ec44a8a742987ef3a114ddfe2d4f7adce',
# "Balance": { # Payer: '0xbbb676f9cff8d242e9eac39d063848807d3d1d94',
# "AssetAddress": "0x0000000000000000000000000000000000000000", # PaidSoFar: 30000n,
# "Payee": "0xaaa6628ec44a8a742987ef3a114ddfe2d4f7adce", # RemainingFunds: 999970000n
# "Payer": "0xbbb676f9cff8d242e9eac39d063848807d3d1d94",
# "PaidSoFar": "0x2710",
# "RemainingFunds": "0x3b9aa2f0"
# }
# } # }
# } # }
``` ```

View File

@ -12,7 +12,7 @@ repos:
- github.com/cerc-io/go-nitro@ts-interop # TODO: Update after fixes - github.com/cerc-io/go-nitro@ts-interop # TODO: Update after fixes
# mobymask watcher repos # mobymask watcher repos
- github.com/cerc-io/watcher-ts@v0.2.63 - github.com/cerc-io/watcher-ts@v0.2.63
- github.com/cerc-io/mobymask-v2-watcher-ts@v3 # TODO: Update - github.com/cerc-io/mobymask-v2-watcher-ts@v0.2.2
- github.com/cerc-io/MobyMask@v0.1.3 - github.com/cerc-io/MobyMask@v0.1.3
# mobymask app repos # mobymask app repos
- github.com/cerc-io/mobymask-snap - github.com/cerc-io/mobymask-snap