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

Feature request: Submit Block RPC #24

Open
soc1c opened this issue Aug 7, 2019 · 0 comments
Open

Feature request: Submit Block RPC #24

soc1c opened this issue Aug 7, 2019 · 0 comments

Comments

@soc1c
Copy link
Contributor

soc1c commented Aug 7, 2019

Imported from ethereumproject/go-ethereum#719

New JSON-RPC method submitBlock

Purpose

I would like to be able to submitWork, but have the address used be one other than the etherbase of the node the work is being submitted by.

This would allow signing of new blocks to occur outside of the client, similar to sendRawTransaction allows you to externally sign a tx.

Proposed solution

Named as per @sorpaas suggestion, perhaps this could be done as a submitBlock.
It would look as follows:
image

Here is an OpenRPC describing the method doc if you want to play with it.

{
  "openrpc": "1.1.8",
  "info": {
    "version": "1.0.0",
    "title": "Example submitBlock"
  },
  "methods": [
    {
      "name": "parity_submitBlock",
      "summary": "Submit a new block proposal",
      "description": "Given a new block, it will validate the block, and broadcast it to connected peers.",
      "params": [
        { "$ref": "https://raw.githubusercontent.com/etclabscore/ethereum-json-rpc-specification/master/openrpc.json#/components/contentDescriptors/Block" }
      ],
      "result": {
        "name": "isBlockAccepted",
        "schema": {
          "type": "boolean"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "OpenRPCDocument": {
        "title": "OpenRPC Document",
        "description": "an open rpc document as defined by https://spec.open-rpc.org."
      }
    }
  }
}
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