NEO Quality Assurance

Lin Peter
The Neo Pulse
Published in
10 min readMar 5, 2019

My presentation in NEO Devcon 2.0 Contineo is about Quality Assurance of NEO.

I’ll introduce what we’ve done to improve NEO quality from 3 aspects: protocol, network, community.

Protocol

So how to improve the quality of NEO’s protocol? Let’s do a brainstorm first. What do you have in mind right now?

For me, I remember that once there was a very famous chemist, he said, “If you want to have a good idea, you need to have a lot of ideas”. It enlightens me a lot. I think, If you want to have a lot of ideas, you need to have a lot of smart souls. That’s why we released “How to Become A NEO Core Developer” in github last year. It shows people how to become NEO’s core developer. Erik even designed a tool by himself to calculate the incentives for core developers of NEO. It’s the first automatic incentives distribution tool that I have ever seen in crypto world. Especially, it’s written by co-founder of NEO, which I think can give community developers a great deal of encouragement to join the development of NEO’s protocol.

We have developers now and what is the next important thing? I think it’s security. No matter how many developers we have, security will always be the first thing we need to think about to build a software. That’s why we have this Bounty Program. After we released NEO Vulnerability Bounty Program, we’ve got at least 10 critical security reports from community. I really appreciate these reporters, they’re guardians of NEO ecosystem.

When we have enough developers, the next thing we need to think about is how to make them work together. It’s project management. When we push it forward, we found that there’re still 2 things missing. They’re version control and branching strategy.

One thing is version control and the other is about branching strategy. This is not a very hard topic, for the version control, there is a good material that we can refer to. It’s semantic versioning specification authored by Tom preston-Werner.

The second thing is about branching strategy. We have a very good material to refer to. Successful Git branching model written by Vincent Driessenn. I have used this model for years. It’s easy and convenient. Honestly, these 2 things I mentioned were discussed before, however, developers haven’t reach consensus yet. We need to get it done ASAP or developers still can’t work together easily.

After we have a good way to let developers work together. The next thing is setting our goal. So what’s our goal? Firstly, We need to define what our product is. Then we need to know how many functions it should have and what makes it a qualified product.

Currently Neo-cli is the most important product. It depends on these 3 projects, one of them is neo protocol, another one is neo-vm, the virtual machine of NEO, the other one is neo-plugins. These 3 parts makes neo-cli the most important project to guarantee the quality of neo protocol.

The main 2 functions are wallet and node. Wallet function makes it a sharp tool to help exchange deal with deposit and withdraw everyday. Node function makes it a basic infrastructure for us to build NEO network, which is the foundation of NEO smart economy.

How to find out the performance of neo-cli if it’s good enough to fulfill its goals? We need testings. In general, these 3 kinds of testings will be enough. They’re system tests, integration tests and unit tests.

We need to design a process to perform these tests systematically. Let me introduce the standard 29119. This Software Testing standard is an internationally agreed set of standards for software testing that can be used within any software development life cycle and by any organization. This is the basic structure of it. It has 3 parts, organization test process, test management process and dynamic test process. NGD is using this standard to organize our testings recently.

This is more detailed structure. I’ll give you 2 examples to explain test management process and dynamic test process for a little bit.

This is the test Planning Processes. For example, the improved consensus algorithm will be released soon. So the most urgent thing for us is to test PR#547 immediately. This process shows how we draw up the test plan.

This is dynamic test Processes. For example, Jeff Solinsky, one of our core developers, made a PR#579. It’s something different but helpful to the improved consensus algorithm. So we need to add this PR to our testing plans. We need to design a new test and prepare a new test environment for it. Then our developer can test it. If anything goes wrong, we also need to check the test incident reporting and find the issues. If no issues found, then it’s done.

These are 2 little examples that I want to show you how this standard works. Here is something bigger. We have unit tests in neo project now, however, we don’t have system testings for neo-cli yet which is the key of network’s stability. That’s why we designed a system tesing framework for neo-cli 3 months ago. For security reason, we haven’t made it open source yet. Currently we’re using it to test neo-cli.

The standard that I mentioned is more from theory level. We also need to think from the perspective of engineering practice. Here is CI/CD process. I think a lot of developers have already been familiar with it. We’ve received some advice about CI/CD from community. Some of them are quite perfect. I believe that if we implement these CI/CD plans can really improve the quality of neo-cli. Nevertheless, we don’t want to make things complicated at first, so we begin with simple things.

Travis CI and github. I think you have already known about it. What we’re doing is to integrate our system testing framework with travis and make system testing automatic.

I think this integration will improve the quality of neo-cli a lot.

Network

The second part of NEO Quality Assurance is Network.

People sometimes are confused about NEO’s decentralization process. So we released this instruction last year. The latest version of this instruction is 1.5. We add the network upgrading process to it.

NEO’s consensus algorithm is dBFT and it provides a 𝑓 = ⌊ (𝑛−1) / 3 ⌋ fault tolerance to a consensus system that comprises n nodes. For now, NEO has 7 consensus nodes, the fault tolerance is 2. If these 2 nodes break down, it will not stop NEO.

There is something new happens. NF voted for Swisscom in the end of August in testnet last year.

According to the instruction of decentralization, after 6 month maintaining of consensus node, NF will make assessments and decide if they’ll vote for Swisscom. So the earliest time that Swisscom can become one of CN in mainnet will be March 4th. At that time, the number of consensus nodes that run by nonNF organization will larger than 2, which means NF cannot recover the network by himself. It’s a big challenge for NEO network.

So we’ve made some preparations for this. This is monitoring system for CN. This tool can help us know details of the consensus process of these 7 nodes. And, of course, if network goes down it can help us find which node is the broken one faster.

This is a simple demonstration of this monitoring system architecture. It’s easy to understand and easy to use. All our CN maintainer have already used it and it turns out quite good.

We have a monitor system for CN. Then we also need a monitor system for our whole network. We have drafted a monitor reference to list all data we think is important to neo network quality. Two development team implement the monitor tool refer to this instruction. If you have used them, you’ll find out that they’re quite important for you to check out the network status.

Community

The third part of NEO Quality Assurance is Community.

We’ll use this feedback loop to improve the quality of basic infrastructure of NEO ecosystem. As you all know about our community, they have developed a lot of basic tools for NEO ecosystem, which is fantastic. But not all basic tools can work well. That’s why NGD will use this feedback loop to guarantee and improve the quality of our basic infrastructure of NEO ecosystem. As our plan, a basic tool developed by the community will be tested by NGD first and we will put it to our website. When we hold hackathons we will recommend developers to use these tools. If this tool is qualified, we will try to make a second round of testing and guarantee that it’s in our website. If this basic tool is not working well, we will just delete it from website, so this feedback loop guarantees the quality of basic infrastructures of NEO.

As you already know, we held some hackathons last year. We have a lot of feedbacks. One of them is Documentation is not enough. We give a solution to this, it’s NEO tutorial. We are recruiting tutors for this project. If you are interested in this project, just send emails to us(liurendong@neo.org).

If you become tutors of this project, you can

1. Drawing up smart contract examples and tutorials with NGD

2. Teaching class in colleage

3. Holding workshop in community

Please send application emails to us so we can make contact with you.

Afer saying all these 3 parts, let’s go back to where we start it. So what’s NEO? From my perspective, NEO is a distributed Turing Complete network for the smart economy. All this protocol and network and community things that I mentioned are quite complicated. A lot of stuff that you need to remember and to deal with.

I need to ask, what’s the ultimate goal of all these? Actually I know your answer. It’s getting to the moon, right?

something interesting about Turing. He proposed a Turing Test. A human questioner gave a series of questions to both computer Respondents and human Respondents. If he can’t tell which one is computer or human, then this computer pass the Turing Test.

I want to propose another test. It’s named by our devecon, I call it Contineo Test. A user send messages to both twitters. One of them is decentralized version of Twitter. After a specific time, if the user cannot tell the difference, then the public chain that this decentralized version of Twitter built on passed the test. I think our ultimate goal is make NEO pass this the Contineo Test.

Can NEO pass the Contineo test? I think this is the problem we need to think about. Let’s work together and make this dream come true.

--

--