You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logic in GitConsensus could be seen as changeable (e.g. to do mint() vs. transfer() functionality in #29), which really is a no-go for immutable contracts. Any upgrades to the GitConsensus contract would wipe all state (previously saved commits/tags).
To avoid this, we should keep the GitConsensus ridiculously simple.
rewardByMint(addresstokenAddr, bytes20[] hashes, uint256[] values)
rewardByTransfer(addresstokenAddr, bytes20[] hashes, uint256[] values)
// some other rewardance mechanisms, potentially coupled with tags/releases
It is hard imagine a scenario is which the new IGitConsensus.sol would need to be updated now (basically just setters & getters that mirror what Git does). By isolating GitConsensus, we can create and update other logical contracts while leaving the state of this consistent, which is really important because we don’t want to remove saved hash state.
This is also going to make it easier to propose just GitConsensus interface as an future EIP / ERC to the Ethereum board, which eventually we want to do with either method.
The text was updated successfully, but these errors were encountered:
mattstam
changed the title
Refactor: Decouple GitConsensus to only commit/tag state, use seperate contracts for rewards
🎨 Refactor: Decouple GitConsensus to only commit/tag state, use seperate contracts for rewards
Sep 28, 2022
Logic in GitConsensus could be seen as changeable (e.g. to do
mint()
vs.transfer()
functionality in #29), which really is a no-go for immutable contracts. Any upgrades to the GitConsensus contract would wipe all state (previously saved commits/tags).To avoid this, we should keep the GitConsensus ridiculously simple.
From
IGitConsensus.sol:
* builds on the assumption of #36
to
IGitConsensus.sol:
IDistribution.sol:
It is hard imagine a scenario is which the new IGitConsensus.sol would need to be updated now (basically just setters & getters that mirror what Git does). By isolating GitConsensus, we can create and update other logical contracts while leaving the state of this consistent, which is really important because we don’t want to remove saved hash state.
This is also going to make it easier to propose just GitConsensus interface as an future EIP / ERC to the Ethereum board, which eventually we want to do with either method.
The text was updated successfully, but these errors were encountered: