quilt / simulation

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

Finish implementing initial Simulation interface #26

Closed gjtrowbridge closed 4 years ago

gjtrowbridge commented 4 years ago

This commit implements all of the methods from the initial Simulation interface.

Notes:

Next Steps:

  1. Update notion-server to use the Simulation logic in the eth2/simulation repository.
  2. Remove Simulation logic from notion-server.
  3. Verify that notion-server is working and satisfies all current user needs.
  4. Write an SDK library that can be imported into 3rd party projects and which abstracts out communication with notion-server. This will allow other projects to easily communicate with notion-server without needing to "manually" write HTTP requests.
  5. Continue updating the notion-server, SDK, and Simulation interfaces as-necessary as user needs change.
jrhea commented 4 years ago

This is fantastic. The code is super easy to follow and the tests demonstrate how the interface will be used. The simulation interface is definitely functional, but it would be convenient if I didn't necessarily have to know about SSZ and other spec types in order to interact with it.

For example, when calling create_shard_block() I have to know about the ssz type VariableList in order to create a ShardTransaction. You could make this easier by either changing the CreatShardBlock struct to this:

    pub struct CreateShardBlock {
        pub shard: Shard,
        pub shard_transactions: Vec<u8>,
    }

or providing a helper method called create_shard_transaction() that accepts some bytes and an index.

gjtrowbridge commented 4 years ago

Closing this because all of this is included in #27