Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light client proxy metamask support #1231

Closed
6 tasks done
KonradStaniec opened this issue Sep 20, 2022 · 0 comments
Closed
6 tasks done

Light client proxy metamask support #1231

KonradStaniec opened this issue Sep 20, 2022 · 0 comments

Comments

@KonradStaniec
Copy link
Contributor

KonradStaniec commented Sep 20, 2022

Currently Light client proxy works and offers basic support for retrieving account balance or storage from untrusted source and validating it against light client data. In it self, it is nice proof of concept , but to make it useful it necessary to make proxy compatible with metamask. Next task required to do so are:

  • CORS support in http server.
    Currently Light client proxy does not configure CORS, and to work with browser metamask it is necessary. One note though, current nimbus implementation, does not work with it, as it fails pre flight request. Quick hacky solution would be to implement allow all cors handler, which would unblock other work.
  • Implement eth_chainId endpoint
    It is needed to add network support to metamask. It should compare network id of light client with chainid received from data provider.
  • implement net_version
  • Implement eth_call endpoint.
    Meta mask makes various calls to at startup to contract. For example to https://etherscan.io/address/0xb1f8e55c7f64d203c1400b9d8555d050f94adf39 on mainnet. This endpoint as for now, should just make eth_call to data provider.
  • Support numerical parameters in quantityTag field.
    Metamask at startup checks eth_blockNumber endpoint to retrieve current block number, and then uses this block number in subsequent calls. Easiest implementation would be to cache few past block received by block gossip, and allow its numbers in rpc queries.
  • Support eth_getBlockByNumber query.
    Similar to above, cache few past received block and responds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant