gridcoin-community / Gridcoin-Tasks

Gridcoin community tasks repository
https://gridcoin.us
MIT License
24 stars 5 forks source link

proposal: Transition to a New Blockchain #174

Closed tomasbrod closed 4 years ago

tomasbrod commented 6 years ago

This protocol extends on the idea by @cm-steem to transfer Gridcoin to new codebase and blockchain. It has been show by Martin Grothe that some private information can be recovered from the blockchain and since we can't just change a data in a blockchain (a Hash List) we need to somewhat transfer the account balances to new chain. This protocol aims to do this process securely, that is without a single entity governing the process. Instead, the users of Gridcoin will have a share on validating the whole transition.

From some block, two chains will run in parallel. The new chain will start with genesis as normal coins do. But the mint mechanism on the new chain will be absolutely new thing. No PoW not PoS, but blocks on the new cahin will be secured by blocks from the old. Blocks on the old chain are signed by the same key as coinstake kernel input. How the new blocks will be created:

User A founds a kernel on the old chain, he will:

Conflict resolution:

  1. blocks on new chain that don't satisfy rules are rejected
  2. if hash of this bad block ends up in block on old chain, it is ignored, but the block is still let in the old chain (as nodes that don't run this dual-chain would fork with higher weight)
  3. if block on new chain is signed by different key than corresponding block (by heigh) on the old chain, then it is rejected
  4. Rule 2 must be enforced even for existing blocks on new chain, as the old can experience reorganizing

Sharedrop is a process of translating unspent transactions from the old chain in the new blocks. Since the old chain continues to run, this new transactions must be translated too. Transactios on new chain have different hash than on old, some lookup table must be used. When transcoding a new transaction:

For sharedropping old UTXOs:

When all the transactions from old chain will be transcoded, both chains will continue running for a while. By some event the new chain will switch from this sharedrop minting protocol to classic PoS protocol and transaction transcoding will be disabled. At this point the old chain will become independent and should be abandoned.