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

agent: Improve Pantheon support #37

Open
3 of 5 tasks
shazow opened this issue Jun 18, 2019 · 2 comments
Open
3 of 5 tasks

agent: Improve Pantheon support #37

shazow opened this issue Jun 18, 2019 · 2 comments
Labels
Someday Good idea but might not be the right time for it yet

Comments

@shazow
Copy link
Member

shazow commented Jun 18, 2019

Support for https://github.com/PegaSysEng/pantheon nodes in the vipnode agent.

Bulk of the work would be implementing support in the ethnode module: https://github.com/vipnode/vipnode/tree/master/ethnode

We'll need to make an implementation of the EthNode interface for the Pantheon RPC. This likely requires some non-web3-standard RPC calls, such as for whitelisting. Pantheon will need to support this.

  • Confirm that Pantheon has the necessary RPC methods available to implement EthNode. If not, work with the Pantheon team to add them.
  • Implement EthNode interface for Pantheon nodes.
  • Confirm it's working. 👨‍🏭

Nice to haves:

  • Add CheckCompatibility to make sure admin_* RPC is enabled with appropriate instructions.
  • Automatically find Pantheon node key ($PANTHEON/key, includes 0x prefix)
@shazow shazow added the Good First Issue Good for newcomers label Jun 18, 2019
@shazow
Copy link
Member Author

shazow commented Jun 19, 2019

Did a bit of looking at Pantheon docs:

  • Add/Remove Peer are there ☑️
  • Add/Remove trusted or reserved peer are not really there. They have whitelisted peers, but sounds like that restricts all other peers? What we really need is to add peers in a way that bypasses the internal limits (which is how geth's trusted peers and parity's reserved peers work) so that said inbound peers are able to connect even if the node is otherwise "full" of normal peers.
    Update: Chatted with the Pantheon team on Gitter, sounds like admin_addPeer does both outgoing and incoming connection whitelisting (and also retrying), so it should do the trick.

@shazow shazow changed the title Pantheon support agent: Pantheon support Jun 20, 2019
@shazow shazow added the Soon Candidate for the next major release label Jun 24, 2019
@shazow shazow mentioned this issue Jun 24, 2019
@shazow
Copy link
Member Author

shazow commented Jun 24, 2019

Turns out there's no way to run Pantheon with default RPCs exposed to the public and admin RPC accessible locally-only (such as using IPC/unix sockets on geth).

Related gitter discussion: https://gitter.im/PegaSysEng/pantheon?at=5d113b8330cc05479fbb623f

image

Related issue on their end: https://pegasys1.atlassian.net/browse/PAN-2839

This is fine if you don't need to expose any RPCs to the public, then you can --rpc-ws-api=ETH,NET,WEB3,ADMIN bound to 127.0.0.1 and the vipnode agent will use it from the same machine. But if you need to access the public node RPCs from an unauthenticated environment, then we can't have both.

Another alternative is to write a small JSONRPC2 muxer that just whitelists methods (I have some of that code in-progress, might repurpose it beyond mini-Infura) to workaround this limitation. Not a clean solution, but could be an acceptable temporary workaround.

For now, we'll have to assume that admin_* is enabled over websocket RPC. We should add an extra check/error with instructions if this is not the case.

shazow added a commit that referenced this issue Jun 25, 2019
Adds preliminary Pantheon support.

Turns out there's no way to run Pantheon with default RPCs exposed to the public and admin RPC accessible locally-only (such as using IPC/unix sockets on geth).

More details here, with possible workarounds: #37 (comment)
@shazow shazow removed the Good First Issue Good for newcomers label Jun 25, 2019
@shazow shazow changed the title agent: Pantheon support agent: Improve Pantheon support Jul 16, 2019
@shazow shazow added Someday Good idea but might not be the right time for it yet and removed Soon Candidate for the next major release labels Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Someday Good idea but might not be the right time for it yet
Projects
None yet
Development

No branches or pull requests

1 participant