1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/app/scripts/controllers/network
Mark Stacey f6f8edfd15
Update eth-json-rpc-middleware to v9.0.1 (#16096)
This update includes fixes for our `block-ref` and `retry-on-empty`
middleware.

The `block-ref` middleware resolves the block reference `latest` to a
specific block number, the latest one we are aware of. This is meant to
protect against situations where the network gives inconsistent answers
for what the latest block number is due to some nodes being out-of-sync
with each other (this was a frequent problem years ago with Infura).

It was broken in that the `latest` resolution was failing, and we were
submitting an additional redundant request to Infura for each request.

The `retry-on-empty` middleware is meant to retry certain methods
when they return an empty response. This was also meant to deal with
network synchronization issues that were more common years ago. This
middleware works by making a "child" request over and over until either
a retry limit is reached, or a non-empty response is received.

It was broken in that the final response recieved was thrown away, so
it's as though the middleware was not used. Except that it did result
in additional redundant network requests.

As a result of this update we should see that the extension is more
resilient to certain network synchronization issues. But this is
difficult to test, and these issues may not happen in production
anymore today.

We should see a reduction in requests to Infura as well. This should
be easier to test.
2022-10-10 13:16:58 -02:30
..
middleware
provider-api-tests Update eth-json-rpc-middleware to v9.0.1 (#16096) 2022-10-10 13:16:58 -02:30
createInfuraClient.js
createInfuraClient.test.js Add remaining tests for createInfuraClient (#15717) 2022-09-29 10:39:35 -06:00
createJsonRpcClient.js
createMetamaskMiddleware.js
index.js
network-controller.test.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
network.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
pending-middleware.test.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
util.js
util.test.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00