ethereum / sharding

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

Collation gas limit #17

Closed hwwhww closed 6 years ago

hwwhww commented 7 years ago

Description

  1. Use the collation_gas_limit from validator manager contract as the gas limit for collations.
  2. When the collators create the collation, check the collation gas limit.
  3. When the validators verify the collation, check the collation gas limit.
  4. Set shard state state.gas_limit to the collation_gas_limit after initialize the state from block.
  5. A lots of tests were been modified because in this case, all the ShardChain need to have the class member ShardChain.main_chain and the validator manger contract has already been deployed on these MainChain.

How to test

pytest sharding/tests/test_state_transition.py::test_collation_gas_limit

Cute Animal Picture

polar_bears