Code Monkey home page Code Monkey logo

Comments (19)

willscott avatar willscott commented on August 25, 2024 2

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

The easiest first step would be to make a new RPC namespace in the current gateway and do the signing there. Eventually we can pull it out into its own service if we deem necessary. @willscott thoughts?

from oasis.js.

willscott avatar willscott commented on August 25, 2024

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

Agreed we should do that. As an MVP, however, I think it'd be more efficient to lean on all the gateway machinery we already have. Once we're happy we can easily extract it out.

from oasis.js.

willscott avatar willscott commented on August 25, 2024

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

The gateway is effectively a relay already. I think we can just use everything there. It seems unnecessary to go through an intermediary relay server when that server can just be a gateway with different CLI args. Am I missing something here?

from oasis.js.

willscott avatar willscott commented on August 25, 2024

from oasis.js.

nhynes avatar nhynes commented on August 25, 2024

we should write it in golang. As much as I love rust, it's not great for everything. Seems like a simple enough service, right? It's just making rpc calls into the enclave anyway.

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

I don't care about the language. My point was to avoid rewriting code thats already written. All this has to do is

  • receive RPCs
  • maybe make a dashboard request for whitelists?
  • estimate gas
  • sign transactions
  • use the ekiden client to send to the runtime

Am I missing anything here? I'm happy for us to do something new in Go if necessary.

from oasis.js.

nhynes avatar nhynes commented on August 25, 2024

The gateway code is not as maintainable as I'd like it to be. It also depends on umpteen traits from parity rpc, which won't exist when, at some point, we cut over from parity. The functionality of the new gateway service seems limited enough in scope that it's a green field project that would benefit from a new stack.

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

Do we have a Go ekiden runtime client, i.e., a Go version of https://github.com/oasislabs/runtime-ethereum/blob/master/gateway/src/client.rs#L136? Generated by https://github.com/oasislabs/runtime-ethereum/blob/master/gateway/src/lib.rs#L91.

from oasis.js.

willscott avatar willscott commented on August 25, 2024

where would that be used? i thought the dev signing proxy would talk to the current gateway? (if not be integrated with it) - so could just have a geth web3 client?

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

I was hoping that, if we did the proxy in Go, then we could make an RPC to the runtime like the gateway does--so that we can avoid having to deal with failures between signing proxy <--> gateway.

from oasis.js.

willscott avatar willscott commented on August 25, 2024

i don't know that protocol well. doesn't seem unreasonable to have the dev proxy take on that extra work - though i would imagine it would be separated from pre-compute work, and shouldn't need to have a full runtime embedded.

The dev wanting to control their own wallet is a different motivation from why someone might pay infura or some service to be a gateway on their behalf.

from oasis.js.

peterjgilbert avatar peterjgilbert commented on August 25, 2024

A few clarifications: the 100-second websocket timeout is a cloudflare limitation--it has nothing to do with the runtime-ethereum gateway. Also if we define new json-rpc endpoints in the gateway, they can use whatever errors they want--there is no requirement that they use web3 error semantics.

from oasis.js.

peterjgilbert avatar peterjgilbert commented on August 25, 2024

Ultimately the mvp could probably be implemented as a couple hundred loc in the gateway--but it would also be straightforward to have a golang relay server that simply sends txns to an existing gateway. I think it's fine either way.

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

I can imagine it to be desirable to want to run both the proxy signer and the gateway together. If we do the Go server, we might consider packaging it together with the gateway.

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

Scoping this issue to HTTP only.

from oasis.js.

armaniferrante avatar armaniferrante commented on August 25, 2024

Rescoping the issue to just be RPC execution. Event subscriptions and getPublicKey are not yet completed in the developer gateway, so moving them to new issues. See #38 and #37.

This was handled here #34. Event subscriptions and a getPublicKey implementation should follow from the work there.

from oasis.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.