Closed gjtrowbridge closed 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.
Closing this because all of this is included in #27
This commit implements all of the methods from the initial Simulation interface.
Notes:
notion-server/src/ethereum/mod.rs
. In a future diff,notion-server/src/ethereum/mod.rs
will be removed entirely, and the server logic innotion-server
will instead point toeth2/simulation/
.notion-server
(eg. Rocket).Next Steps:
notion-server
to use theSimulation
logic in theeth2/simulation
repository.Simulation
logic fromnotion-server
.notion-server
is working and satisfies all current user needs.notion-server
. This will allow other projects to easily communicate withnotion-server
without needing to "manually" write HTTP requests.notion-server
, SDK, andSimulation
interfaces as-necessary as user needs change.