Continuing the discussion from Will SHA-Gate be ready for the May 15th upgrade? on an improved miner voting covenant for sidechain bridging:
I’m finally open-sourcing the improved version of the first SHA gate contract! The contract is well commented so as to make it readable and invite review! Here it is: https://github.com/mr-zwets/upgraded-SHA-gate/blob/main/sha-gate-improved.cash
As mentioned in the thread
- better architecture solves Bitmain firmware issue, requires way less voting and makes monitoring the contract way easier (!)
- actually enforces only miners in a certain window can vote (!)
- allows withdrawals of arbitrary amount (!)
- changed variable voting period to fixed length
- 5 operators (increase from 3)
- removed unnecessary op_return message
There’s also a second smart contract in the repo for the sidechain withdrawals.