Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-genesis feature #1307

Closed
xgreenx opened this issue Aug 16, 2023 · 1 comment
Closed

Re-genesis feature #1307

xgreenx opened this issue Aug 16, 2023 · 1 comment
Assignees
Labels
epic An epic is a high-level master issue for large pieces of work. regenesis SDK team The issue is ready to be addressed by SDK team

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Aug 16, 2023

Our primary strategy to support the upgradability of the network is to create a fork of the network. A new forked network should contain all previous states from the old network in the genesis block. The name for the whole process is "Regenesis".

Adding new features/opcodes, changing how mempool works, block production, p2p communication, block synchronization, and API changes don't require a regenesis. We want to do regenesis in several cases:

  • Discovering critical vulnerabilities/exploits leading to incorrect smart contract work or allowing hack contracts.
  • The state transition was incorrect due to some bug in the codebase, and we need to revert the state of the blockchain.
  • The private key of the block producer was compromised, and a bad actor controls the network.
  • The breaking change on the VM, charging model, database side, data structure, and transaction layout.
  • Change the consensus algorithm and support a new feature like the DA layer.

The transition should be smooth and unnoticeable for the users and developers:

  • All previous contracts should contain the same state and balances.
  • All unspent messages should remain, and API should produce valid proofs for withdrawing that work with the forked version.
  • Regenesis should prevent double-spent attacks where users withdraw data/tokens from an old and new network.
  • We need to figure out the transition strategy for the application that requires the whole history of events/receipts/transactions(fuel-indexer) from old and new networks.
  • We must decide what to do with VM-breaking changes and contracts that cannot execute in a forked version.

The list of related issues to achieve the goals above:

@xgreenx xgreenx self-assigned this Aug 16, 2023
@xgreenx xgreenx added the SDK team The issue is ready to be addressed by SDK team label Aug 16, 2023
@xgreenx xgreenx removed their assignment Aug 26, 2023
@xgreenx xgreenx added the epic An epic is a high-level master issue for large pieces of work. label Feb 4, 2024
@xgreenx
Copy link
Collaborator Author

xgreenx commented Mar 7, 2024

The main functionality is done in #1693.

The remaining sub-issues are already tracked as independent epics.

@xgreenx xgreenx closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic An epic is a high-level master issue for large pieces of work. regenesis SDK team The issue is ready to be addressed by SDK team
Projects
None yet
Development

No branches or pull requests

4 participants