ethereum / sharding

Sharding manager contract, and related software and tests
480 stars 105 forks source link

Validator manager contract v2, without `txToShard` #6

Closed mhchia closed 7 years ago

mhchia commented 7 years ago

The simple version of the validator manager v2 with its utils and tests, based on the doc.md, without the implementation of txToShard(To be implemented in the next step).

Description

  1. sharding/contracts/validator_manager.v.py

Contains the contract validator_manager written in viper, with functions deposit, withdraw, sample, add_header, get_ancestor(commented), get_ancestor_distance(not yet implemented), get_collation_gas_limit

  1. sharding/validator_manager_utils.py

Contains the utils functions of the contract validation_manager, including the series of call_xxx functions, most of all, the create_valmgr_tx and mk_initiating_contracts, which create validator manager contract transaction and its dependent contracts and transactions.

  1. sharding/tests/test_validator_manager.py

The tester of the contract validator_manager

  1. sharding/tests/test_validator_manager_utils.py

The test for sharding/validator_manager_utils.py

TODO

  1. Finish txToShard in validator_manager and its utils and tests.
  2. Add USED_RECEIPT_STORE and finish the logic for Receipt-consuming transactions

Dependency versions