Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

ECIP-1024: A CarbonVote and MinerVote Contract for Consensus Soft and Hard Forks #65

Closed
wants to merge 5 commits into from

Conversation

sorpaas
Copy link
Contributor

@sorpaas sorpaas commented Jun 28, 2017

(Rendered)

See also ECIP-1023/ECIP-1022, which provides the same functionality as ECIP-1024.

This ECIP proposes a way to use solely smart contracts for all miners and stake holder voting. However, as miners are required to add a new transaction at every block they mined, this may result in discouragement in adopting new hard forks from miners' side (as it affects the block-level gasLimit).

@sorpaas
Copy link
Contributor Author

sorpaas commented Jun 28, 2017

Wow gosh, seems that I accidentally commit something that does not belong to here. Will remove.

@sorpaas
Copy link
Contributor Author

sorpaas commented Aug 4, 2017

Any way we can push this forward? @splix

I can remove the exact contract and only leave the interface. But the general idea is to allow both miners and coin owners to vote. So we basically have four functions: minerYes, minerNo (executed on every new block mined), and coinYes, coinNo.

Besides exchanges and big coin owners, CarbonVote has another downside that is vulnerable for attack, though. Consider a hard fork that miners all want to vote No but coin owners all want to vote Yes. Miners can jointly selectively not including any coinYes transactions into their blocks. This makes it as if nobody supports the hard fork, despite coin owners who are supporting it.

Not all ETC clients will need to implement this protocol. After the voting period, the proposal becomes active. At that time, there will be a known block number for the proposal to be in force. Those clients that wish to stay using hard-coded block numbers for simplicity can just insert that block number then, given we have a sufficiently long locked-in period.

I suggest we continue on with this by a simple test run -- a supposed hard fork that does not actually hard fork.

@Dexaran
Copy link
Member

Dexaran commented Aug 4, 2017

Is here a source code of Vote contract somewhere on github?

@sorpaas
Copy link
Contributor Author

sorpaas commented Aug 5, 2017

@Dexaran You can always refer to the classic but controversial CarbonVote (https://github.com/consenlabs/carbonvote).

@splix
Copy link
Contributor

splix commented Aug 5, 2017

My suggestions just to leave interface required for a node implementation. The voting process is unrelated to a process of activation by a node.

What I mean is that we have to write a code for Geth that will real a contract every X block and update activation flag for a chain config. For example for Geth it could be:

"chainConfig": {
   "forks": [
       {
          "name": "FooBarFork",
          "activate": {
              "type": "ecip1024",
              "contract": "0xe5ad04a036612f493dd5fed1ff394b4eb2b89156"
          }
          "features": [{....}]
      }
   ]
}

Basically by such ECIP we should describe how a node could use such way to activate a fork. Which method it expects from a contract, what value it can return and what a node should interpret/react to this value. So by reading this ecip 1) a node developer can write code for activation 2) a fork developer can write a contract with interface that can be processed by a node

Different implementations of a fork contract and voting process are out of the scope, should be discussed only within a particular fork implementation. It may make sense to give an example, but it should not limit developers. And you correctly noticed that a particular implementation can have vulnerabilities, so better to move implementation out of the scope of ECIP.

@sorpaas sorpaas closed this Jun 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants