ethereum / cbc-casper

GNU Affero General Public License v3.0
229 stars 44 forks source link

Refactor network delay functions to be more dynamic #181

Open naterush opened 6 years ago

naterush commented 6 years ago

Issue

Currently, we define some constants that the network delay functions use to calculate the delay on certain messages. These constants will also include the peer connectivity matrix, when it is created.

However, we have no way of changing these parameters. Ideally, we would be able to change these constants given some command line parameters.

Proposed Implementation

Either define these functions as closures or as classes to allow them to store state. Add command line options for passing further information to these functions to change from the defaults.

staccDOTsol commented 1 year ago

Thank you for bringing up this issue. I agree that it would be beneficial to make the network delay functions more dynamic and allow for the ability to change the parameters.

One possible implementation approach could be to define these functions as closures or classes, which would enable them to store state and be more flexible in terms of parameter customization. Additionally, introducing command line options to pass information to these functions would provide a convenient way to change the defaults.

By implementing these changes, we can enhance the adaptability and configurability of the network delay functions, allowing for more dynamic simulations and testing scenarios.