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

Optimization : OSTComposer #765

Open gulshanvasnani opened 5 years ago

gulshanvasnani commented 5 years ago
  1. requestStake method in OSTComposer contract should check on the gateway for any open stake for the Staker proxy address of the staker.
  2. stakerProxies and activeStakeRequestCount mappings should be made one object. Make a struct to address it.

Following were the discussion points in the sprint review, documenting it here.

  1. [Research] Check if we can avoid storing the StakeRequest object.
  2. [Research] activeStakeRequestCount may not be needed.
  3. [Research] Check and remove the mutex from the functions wherever it is not needed.
  4. [Research] Check if the selfDestruct function can be called from Composer contract.
  5. [Research] Should selfDestruct be allowed in the gateway still has not progressed stake.
  6. Remove the nonce check from StakerProxy.stake().
  7. [Research] Check if we can avoid stakeRequestHashes mapping. Refer discussion at PR #750

This can be an EPIC

pgev commented 5 years ago

https://github.com/OpenST/mosaic-contracts/issues/763 https://github.com/OpenST/mosaic-contracts/issues/764 https://github.com/OpenST/mosaic-contracts/issues/766 https://github.com/OpenST/mosaic-contracts/issues/767 https://github.com/OpenST/mosaic-contracts/issues/768 https://github.com/OpenST/mosaic-contracts/issues/769 https://github.com/OpenST/mosaic-contracts/issues/770 https://github.com/OpenST/mosaic-contracts/issues/771 https://github.com/OpenST/mosaic-contracts/issues/772 https://github.com/OpenST/mosaic-contracts/issues/773