quilt / simulation

A tool to simulate Ethereum 2.0 execution
12 stars 2 forks source link

Create an API #2

Open SamWilsn opened 5 years ago

SamWilsn commented 5 years ago

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 commented 5 years ago

Endpoints:

Examples

Create a beacon block with crosslinks

POST to /beacon/blocks/

{
    "crosslinks": [
        {"shard": 0},
        {"shard": 2},
        {"shard": 3, "block": 44}
    ],
    "transactions": []
}
villanuevawill commented 5 years ago

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 :)