OpenST / mosaic-contracts

Mosaic-0: Gateways and anchors on top of Ethereum to scale DApps
https://discuss.openst.org/c/mosaic
MIT License
114 stars 31 forks source link

OST' Composer contract #740

Closed deepesh-kn closed 5 years ago

deepesh-kn commented 5 years ago

I am not sure if this ticket needs to be broken into the smaller ticket.

Composer contract: Please note: the contract is referred to Composer, but this is not final name. Suggest a better name.

abhayks1 commented 5 years ago

Was going through the epic 📔 . Few comments:

Not all methods of Composer need events. In acceptStakeRequest Gateway.stake is called which already emits StakeIntentDeclared event. Facilitators can listen to this event and take appropriate actions. Similarly for revertStake.

deepesh-kn commented 5 years ago

Was going through the epic 📔 . Few comments:

👍 We can use mutex where ever it is necessary.

  • All events of the composer contracts must be sufficient for the facilitator to decide if they want to accept or ignore the facilitation.

Not all methods of Composer need events. In acceptStakeRequest Gateway.stake is called which already emits StakeIntentDeclared event. Facilitators can listen to this event and take appropriate actions. Similarly for revertStake.

To be more specific, an event from requestStake should have all parameters so that facilitator can decide if it needs to acceptStakeRequest or ignores it. revokeStakeRequest and rejectStakeRequest should also have events. It will be fine for acceptStakeRequest to not have an event as StakeIntentDeclared will be emitted

schemar commented 5 years ago

@deepesh-kn should I add a mutex to the proxy's stake method?