forked from MetaMask/web3-provider-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
285 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
- web3 | ||
- engine | ||
- sources | ||
### 'zero-client' web3 provider | ||
|
||
Here’s an explanation of what I’m currently working on: | ||
|
||
remote-data adds caching | ||
a 'zero-client' web3 provider — it is very modular and works via a stack of ‘sub-providers’ which are like normal web3 providers but only handle a subset of rpc methods, specified via `subProvider.methods = [‘eth_call’, ’etc...']`. The intention is to handle as many requests locally as possible, and just let data lookups fallback to some data source ( hosted rpc, blockapps, etc ). Categorically, we don’t want / can’t have the following types of RPC calls go to the network: | ||
* id mgmt + tx signing (requires private data) | ||
* filters (requires a stateful data api) | ||
* vm (expensive, hard to scale) | ||
The subproviders can emit new rpc requests in order to handle their own; e.g. `eth_call` may trigger `eth_getAccountBalance`, `eth_getCode`, and others. | ||
|
||
'zero-client' web3 provider also handles caching of rpc requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.