I have a contract that will implement a client/server-like functionality through the use of of events (peers have event listeners and make method calls depending on the events they are listening to).

If each peer listens to a an event bound to a method that all remaining peers call then the respective peer will get flooded with log data. I was thinking about writing multiple method with different names but same argument list and functionality and use a scheduler to select one based on a seed provided by the caller. Are there any large scale contracts with thousands of interacting peers? If yes, how is complexity managed?

  • 1
    Are you sure that this is a problem? Emitting logs is expensive, listening to logs is practically free. So if there is a bottleneck it should be the contract, not the peers. – ComandanteCheth Aug 23 '16 at 17:36
  • 1
    Adding to @ComandanteCheths comment, plus these are there by design. – niksmac Aug 24 '16 at 1:11
  • I know that listening to logs is not costly but I was asking in the case of a scenario that each client is notified by the remaining peers in the network given that each peers calls a contract method meant to be called by clients thus causing broadcasts of events to all peers listening to an event bound to that method. – Sebi Aug 24 '16 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.