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

Create an API #2

Open
SamWilsn opened this issue Nov 14, 2019 · 2 comments
Open

Create an API #2

SamWilsn opened this issue Nov 14, 2019 · 2 comments

Comments

@SamWilsn
Copy link
Contributor

The first step of this task is to design an architecture, and create sub-tasks to track the implementation.

The simulation needs to be driven by some outside input provided by the user or client program. The specifics of the API are fairly open. Some possible avenues could include HTTP, grpc, or whatever else suits the data and use case.

The API provided by the simulation itself doesn't necessarily have to conform to the input to the client tooling.

Important features of the API include the synthesis and inspection of chain state.

@SamWilsn
Copy link
Contributor Author

SamWilsn commented Nov 14, 2019

Endpoints:

  • beacon
  • beacon/blocks
  • beacon/blocks/{block_id}/transactions
  • shards
  • shards/{shard_id}/blocks
  • shards/{shard_id}/blocks/{block_id}/transactions

Examples

Create a beacon block with crosslinks

POST to /beacon/blocks/

{
    "crosslinks": [
        {"shard": 0},
        {"shard": 2},
        {"shard": 3, "block": 44}
    ],
    "transactions": []
}

@villanuevawill
Copy link
Contributor

villanuevawill commented Nov 14, 2019

You may consider also modeling it off the https://github.com/ethereum/wiki/wiki/JSON-RPC rpc spec in eth 1. Although... lets just ship and keep things simple for now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants