neo: Start a new chain from genesis block for NEO 3.0

I’m considering whether to start a new chain from genesis block for NEO3.0. Here are some ideas for your reference and discussion.

Why do we need to start a new chain?

Here are several reasons.

  1. Stale code

    We created NEO from the code of Antshares, with a large number of deprecated features that are contained in current code and block chain. This makes it difficult for new developers to understand NEO’s code, and new tools have to parse the data generated by features that are no longer supported. If we give up the old data, we can have a cleaner start.

  2. Difficult to make architectural adjustments

    The community has made some improvement proposals that cannot be implemented without making huge structural adjustments. One of the more important proposals is to transform neo and gas into NEP-5 assets and to abolish the concept of global assets. I will explain these proposals in detail in the following paragraphs.

  3. To decouple NEO and NeoVM

    In order to decouple NEO and NeoVM, some of the instructions in NeoVM need to be removed, which will cause the old contracts to fail, and it would be best if it could be done together in NEO 3.0.

What new features can we implement in NEO 3.0?

  1. Abolition of UTXO and global assets

    In NEO 2.x, we have two different ways to create assets, the first is to create a global asset based on UTXO, and the other is to create a NEP-5 token that is stored in a contract. For a long time, the biggest challenge in the development of smart contracts on NEO is to handle global assets in contracts.

    Why don’t we put the global assets into the smart contract in NEO 3.0? As a result, the development of smart contracts will become very easy. The only problem is that it is difficult to transform neo and gas into NEP-5 tokens under the existing architecture.

  2. Unique type of transactions

    In NEO 2.x, we have many different types of transactions:

    • MinerTransaction
    • IssueTransaction
    • ClaimTransaction
    • EnrollmentTransaction
    • RegisterTransaction
    • ContractTransaction
    • StateTransaction
    • PublishTransaction
    • InvocationTransaction

    Most of them are obsolete, and the remaining types of transactions can be easily implemented in smart contracts. The only thing we need to keep is InvocationTransaction.

  3. Redesign the instruction set of NeoVM

    Currently, the contract invocations are done through the APPCALL instruction (and the corresponding stack isolation instructions), and NeoVM will directly look for the target contract. This is very unreasonable for NeoVM, because the list of smart contracts on the blockchain should not be directly visible to NeoVM.

    We need to create a new API to invoke contracts in a SYSCALL and discard the original APPCALL instructions.

    There are other instructions that increase coupling, such as CHECKSIG and CHECKMULTISIG. They are widely used in the current system.

What about NEO 2.x?

When the NEO 3.0 mainnet is started, the 2.x network will be stopped and the data is retained, but no new blocks are generated. The data/assets on the 2.x network need to be migrated to 3.0 network.

The affected populations are:

  1. neo or gas holders

    The NEO Foundation will distribute new neo and gas to the holders on the NEO 3.0 network, these new neo and gas are based on NEP-5 standard. The users do not need to do anything. Historical transactions are not migrated to the 3.0 network, but users can query them on 2.x network at any time.

  2. Other tokens/assets holders

    For those who hold global assets or NEP-5 tokens, they need to swap or accept airdrops on the NEO 3.0 network with the help of the project party.

  3. Global assets

    If you’ve ever registered a global asset on the NEO 2.x network, the NEO Foundation will assist you in migrating it to the NEO 3.0 network and registering a new NEP-5 token for free.

  4. Smart contracts

    If you’ve ever created a smart contract on the NEO 2.x network, the NEO Foundation will help you redeploy it to the 3.0 network for free. But you need to migrate the data manually.

  5. Exchanges

    Exchanges need to swap tokens for the users, including neo, gas and other tokens.

When will this happen?

NEO 3.0 development is a long-term process that takes at least 1-2 years to develop and test. Once the NEO 3.0 mainnet is ready to start, we will announce at least 2 months in advance and provide all the help needed for the migration.

During NEO 3.0 development, any DApp development should be based on NEO 2.x and no compatibility issues need to be considered.

Where to discuss?

If you have any thoughts on NEO 3.0, please discuss it below this post.

If you have any good ideas for the development of NEO 3.0, you are welcome to send your proposals at https://github.com/neo-project/neo/issues. I will organize and label the proposals related to NEO 3.0 for discussion.

If you want to track the progress of NEO 3.0, you can visit our milestone on GitHub.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 27
  • Comments: 38 (15 by maintainers)

Commits related to this issue

Most upvoted comments

What parts of NEO 3.0 are truly unique to the NEO platform? …for example, the chosen consensus algorithm(s) …and plug these directly into the existing highly-composable Stratis Platform C# blockchain framework?

public class Program
{
    public static async Task Main(string[] args)
    {
        try
        {
            var nodeSettings = new NodeSettings(protocolVersion:ProtocolVersion.ALT_PROTOCOL_VERSION, args:args);

            IFullNode node = new FullNodeBuilder()
                    .UseNodeSettings(nodeSettings)
                    .UseBlockStore()
                    .UsePosConsensus()
                    .UseMempool()
                    .UseWallet()
                    .AddPowPosMining()
                    .UseApi()        
                    .UseApps()
                    .AddRPC()
                    .Build();

            if (node != null)
                    await node.RunAsync();
        }
        catch (Exception ex)
        {
            Console.WriteLine("There was a problem initializing the node. Details: '{0}'", ex.Message);
        }
    }
}

Reference: https://github.com/stratisproject/StratisBitcoinFullNode/blob/master/src/Stratis.StratisD/Program.cs

@ashrolls

NEO 3.0 development is a long-term process that takes at least 1-2 years to develop and test.

[…] new features that are compatible with 2.x will be developed first and merged into the 2.0 version.

With NEO 3.0 in the spotlight as “NEO’s big update”, instead of these individual updates being perceived as positive, rapid development, they will be perceived by many as “part of the road to NEO 3.0, which will take a very long time”. That’s a negative underlying premise.

Companies that are looking for a suitable public blockchain will not be favorable towards a platform where this is the general premise for the next 12-24 months.

But this doesn’t have to be the case.

My proposal is that these new updates (which build towards what will eventually be NEO 3.0) are to be introduced as their own individual and respectable updates (think Ethereum Casper, EOS Dawn 1.0, 2.0 etc), so as to eliminate the impression that they are merely stepping stones towards NEO 3.0.

This way the individual updates could be received in a more positive manner by the community and potential new projects, without unnecessary concerns for NEO 3.0.

Tl;dr: Take the one big spotlight away from NEO 3.0, and shine it upon individual updates instead.

NEO 3.0 will come when it comes, and should not be a concern or talking point with every new update for 2 years to come.

First of all, I like most of the ideas that are proposed in NEO 3.0, so don’t get me wrong here.

I think before creating a new blockchain–cause that’s what NEO 3.0 actually is-- we need to set some things right. (1) for the people that believed in this project in the first place. (2) for the people that actually deployed smart contracts and building their businesses on the NEO blockchain.

  1. Adding more network instrumentation/metrics will let us monitor the network more in-depth, this to optimize the p2p network and its known issues. Hence also reflects on the current consensus implementation, with more in-depth instrumentation/metrics we can detect, improve and enhance the current consensus protocol much faster and more accurate. NEO doesn’t need 100k TPS it needs a stable platform first. dBFT is not a bad consensus protocol it is just not very well executed/optimized enough today.

  2. Fix all the known VM issues that can potentially cause security vulnerabilities ASAP.

  3. Smart contract development on NEO is a pain in the ass. We need to incentive and allocate more resources to developers that will improve this. Think about a truffle framework. We don’t need 10 smart contract languages, we only need 1 good implementation with full documentation. The former can be done after we have stabilized.

  4. We have enough block explorers and monitors.

  5. We (the community) need to help writing a global documented specification for NEO. It is still too hard to find the right documentation, especially for creating new implementations of the protocol. We need a loud and clear NEO whitepaper that new implementations can follow from start to end.

  6. I don’t care about decentralization for now but let people vote for consensus nodes. this is promised to the community a long time ago.

  7. I’m pretty certain we can implement a lot of the new features that are proposed for NEO 3.0 without even to rebuild this from scratch. Let’s start with getting the foundation of the architecture stable and build from there.

Peace brothers

Let’s go for the new NEO 😄 you can count on us!

I can’t speak from a technical perspective (will have to wait for the developers to explain any issues that may arise), but on paper I support the concept. As long as all users receive precisely the tokens they had on 2.x, and all existing projects can migrate their contracts for free, I think it’s fine if the technical benefits are worth it.

EDIT: One thing I’d like to know is what happens to NEO 2.0 improvements during NEO 3.0 development? If we leave NEO in the current state for 1-2 years, we may be discouraging developers from launching on NEO until after 3.0 and falling behind our competitors.

In the ideal world, NEO delivers Neo 3.0 on Neo project and CoZ delivers NeoSharp totally compatible (Neo 2.0) and modular, covered with tests and ready to plug in all new features. It depends on time and resourcing where we would meet but maybe Neo 4.0 could be NeoSharp based. It addresses all concerns people raised about timeline if NGD does Neo 3.0 on its own and gives NGD plenty of time to make a shift without the community pressure but with CoZ international team benefits.

One thing I’d like to know is what happens to NEO 2.0 improvements during NEO 3.0 development? If we leave NEO in the current state for 1-2 years, we may be discouraging developers from launching on NEO until after 3.0 and falling behind our competitors.

Don’t worry about this, those new features that are compatible with 2.x will be developed first and merged into the 2.0 version.

I am also for these changes. UTXO model needs to be retired. The biggest concern I have about NEO 3.0 is resource allocation. It seems like the dev community is often running blind on what the best things to develop are, and their efforts seem wasted.

Clear, Concrete, projects and objectives are needed in the roadmap for 3.0.

Looking forward to the next phase of NEO’s evolution 👍

I show 100% support for this long-term vision.

I absolutely want to give it “more chance to explore” but I can’t see our direction.

First, decentralization by the end of 2017 and NeoX & NeoID in first half of 2018.

Then:

Now, new chain with new genesis block in 2 years. These different explorations create confusion to me.

@neo-project/core This looks done, shouldn’t we close this? Because I can’t see what we are waiting for, can anyone clarify? If there are other tasks to be done, can’t we create a new issue? Thanks

The no-limit-transaction is better in the block 1, because the block 0 is on memory every time

Yeah let’s do this 😄 But keep it between us.

Will you add some storage verification mechanisms to nep5 in NEO3? Since in the NEO 2.x, even the chain is synchronized, the storage might still be different(transaction executing error due to different versions in different nodes), and no exception will be thrown.

Hey, @erikzhang. Great news in such reasonable and honest words. I fell that it represents an important path for the future of the Neo Ecosystem. In particular, considering the point you mentioned about keep applying all compatible improvements during the journey. Congratulations to you and your team for this insight and direction.

PS: If some problem happen, do not worry, we can keep the 2.0 working and freeze the NGD tokens…aehauehauheauea 👯‍♂️ 💃 Just kidding! Count with us.

Allow genesis’s transactions 0 gas fee and transactions size higher than the current maximum size

I think the core team has a consensus that this is going to be implemented. We will need a “large” genesis block to make sure all data is present.

Do you guys want to rename this issue or create a more “focused” one? We should care about data migration by the end of the year only. @neo-project/core opinion? We are doing this, right?

In addition to free redeployment of smart contracts, we should probably consider some GAS/NEO contributions to any smart contract developers that will need to update their contracts to be compatible with changes.

We should also look for automatic data transfer solutions. As @deanpress mentioned on the Discord, smart contracts will not remain trustless with manual transfers (introduces an attack vector and the chance of data manipulation/loss during migration).

NEO3 should be a revolution, not an optimized NEO2.x. I believe a lot of new advanced features are simply not compatible with NEO2.x and thus can’t be transmitted to NEO2.x. NEO is still a rapidly developing project, give it more chance to explore.

I couldn’t agree more with @deanpress. We can’t unveleid the Neo 3.0 (decentralization, voting system, economy model, neo-sharp, tps etc etc) at the beginning of July and after one month discuss about a new chain for Neo. I’m not a developer, I’m a fan of Neo project since Jan 2017. I saw the Neo growth day by day, I saw the first messages of CoZ and I saw the coin value touch 200$.

As a community member I think Neo has to improve its tech step by step. Thinking a one big jump of 24 months waiting the new chain, it could be a negative impact to our community and make no-sense every improvement to Neo 2.x or any new project/partnership in this “waiting period”.

Today there is an ama on reddit. Which is the link between the community’s questions and this discussion?

I apologyze for my input, take in consideration also the community sentiment. Go Neo!

I’d hate to see NEO lose it’s UTXO architecture. I still think UTXO is more robust than the current NEP-5 implementation.

You can still implement UTXO in smart contracts.

If you’ve ever created a smart contract on the NEO 2.x network, the NEO Foundation will help you redeploy it to the 3.0 network for free. But you need to migrate the data manually.

A fundamental aspect of blockchain is that data is permanent and immutable.

Manual smart contract/data migration raises 2 questions:

  1. If data must be migrated manually by the owner, what will be the methods in place to verify that the owner hasn’t manipulated any of the data prior to migration?
  2. What if the owner of a popular closed-source smart contract has become unresponsive? Does this mean the smart contract cannot be migrated and can only be kept alive on a hard fork?

What should those who are building the nodes do? If the nodes are built for 2.x , if will be redunadant code in 1-2 years.

Can the changes be done with a series of hard forks?

Edit:

Can you provide information regarding the consensus protocol; are there plans to change it?