無知

갈 길이 먼 공부 일기

기술 공부/블록체인

스마트 컨트랙트 (10) | NEO, 중국의 이더리움

moozii 2022. 6. 1. 11:07

 

NEO 개요 및 특장점

네오(NEO, 小蚁币)는 중국 최초의 블록체인 기반 암호화폐이다. 몇몇은 '중국의 이더리움'이라는 별명으로 부른다. 중국어로는 샤오이비(小蚁币, 소의폐, Xiao Yi Bi, xiǎo yǐ bì)라고 부른다. 2014년 중국의 다홍페이(Da Hongfei)가 기존 비트코인과 이더리움의 장점을 결합하여 C# 언어로 네오를 개발했다. 네오는 SHA-256과 RIPEMD160 해시 알고리즘 기반으로 한 위임 프랙티컬 비잔틴 장애 허용(dPBFT; delegated Practical Byzantine Fault Tolerance) 방식의 합의 알고리즘을 따른다. 네오 개발팀은 중국 상하이에 있고, 직원은 약 30명이다.

네오(NEO)는 중국 최초의 암호화폐라는 상징성 덕분에 중국 내에서 꽤 유명하다. 네오는 비영리 단체의 오픈 소스 프로젝트로 시작되었다. 네오는 2014년에 앤트셰어(ANS)라는 이름으로 등장했는데, 2017년 7월에 네오(NEO)라는 이름으로 바뀌었다. 리브랜딩한 이유는 글로벌한 스마트 경제를 만들기 위해서 이다. 네오는 이더리움과 마찬가지로 '네오 컨트랙트'라는 독자적인 스마트 계약 시스템을 만들었다. 네오에는 코인인 네오(NEO)와 네트워크에서 연료 역할을 하는 네오가스(NeoGas)라는 두 개의 기본 암호화폐가 있다. 와이스 레이팅스(Weiss Ratings)라는 암호화폐 평가 기관은 2018년 2월 말 발표한 암호화폐 평가 등급에서 네오를 유일한 A등급(A-)코 인으로 평가했다. 중국 정부 산하기관인 전자 정보 산업 개발 연구원도 2018년 8월에 전 세계의 퍼블릭 블록체인 등급을 발표했는데, 네오가 5위를 차지했다. 이렇듯 네오는 기관에서도 높은 평가를 받고 있다. 네오의 시가총액은 2018년 9월 기준으로 12억 달러, 약 1조 3,000억원으로 14위이다.

http://wiki.hash.kr/index.php/%EB%84%A4%EC%98%A4 
 

네오 - 해시넷

네오(NEO, 小蚁币)는 중국 최초의 블록체인 기반 암호화폐이다. 몇몇은 '중국의 이더리움'이라는 별명으로 부른다. 중국어로는 샤오이비(小蚁币, 소의폐, Xiao Yi Bi, xiǎo yǐ bì)라고 부른다. 2014년

wiki.hash.kr

 

 

NEO의 스마트 컨트랙트 시스템이 이더리움과 다른 점은, 이더리움에서는 솔리디티라는 새로운 언어를 통해서 스마트 컨트랙트를 프로그램하게 하는 반면에 Neo에서는 기존의 다양한 언어로 스마트 컨트랙트를 작성할 수 있게 했다는 것. 특히 Java나 C#같이 많이 사용되는 언어를 직접 지원함으로써 더 많은 개발자들을 생태계로 끌어들임.

 

Antshares began in February 2014. It was designed to be a platform for building decentralized apps. The first of its kind in China, Antshares paved the way for future Chinese blockchain projects.

NEO’s technology allows for smart contracts (like Ethereum). However, NEO runs a virtual machine that allows developers to code these contracts in C#, Java, Python, or other popular coding languages. You no longer need to know a new language to code smart contracts.

...

Onchain started seeing some high-speed velocity in 2016, further developing Antshares and becoming the first Chinese blockchain company to join Hyperledger, which has helped to further develop Onchain’s product called DNA. DNA, or Distributed Networks Architecture, enables the integration of business systems and the support of cross-chain interoperability.

...

For context, the relationship between NEO and Onchain is that of Ethereum and Enterprise Ethereum. Onchain works on blockchain projects with large enterprises and has collaborated with the Chinese government in the past, which ultimately helps the NEO ecosystem. The NEO ecosystem develops the platforms for future blockchain growth in China. In the future, as well see later in this article, NEO will bridge the gap between private institutional blockchains and public ones, creating a unified blockchain economy.

https://coincentral.com/cryptocurrency-industry-spotlight-neos-da-hongfei/ 

 

NeoVM is a lightweight virtual machine for executing NEO smart contracts. As the core component of NEO, NeoVM has Turing completeness and high consistency, which can implement arbitrary execution logic and ensure consistent execution results of any node in distributed network, providing strong support for decentralized applications. With the help of NeoCompiler, source code written in Java, C# or other high-level languages can be compiled into a unified NeoVM instruction set, thus achieving cross-platform. Also, it lowers the development threshold for enabling smart contract developers to participate in the application development in Neo ecosystem without learning a new development language. In addition, NeoVM is highly decoupled from the upper-level code and customizable by using techniques such as interop services. NeoVM can be used by simply creating an instance, incredibly easy to use, and can be applied to various blockchain and non-blockchain scenarios.

https://docs.neo.org/docs/en-us/basic/neovm.html 
 

Neo Documentation

Neo Documentation

docs.neo.org

 

 

 

NEO의 역사

 

Da Hongfei is the mastermind behind a renowned blockchain podium for distributed applications called NEO. In addition, he also created a blockchain progress firm named Onchain.

Before he stepped into the universe of blockchain technology, Da Hongfei used to work at IntPass Consulting that was located in Shanghai. He worked there for almost a decade, from 2005 to 2013 to be precise. Before leaving the firm, he was working there as a panel member and the Chief Executive Officer.

Da Hongfei came to know about Bitcoin in 2011. However, he was smart enough to comprehend and identify all the repercussions, both societal and methodical, behind this technology. Since his experience of studying in a university had already provided him a broader view of the world, it also helped in sparking his curiosity for Bitcoin. He shifted his focus towards this technology to learn about it in complete detail.

As we mentioned above, Bitcoin caught the interest of Hongfei in 2011. At that point, he was still working in IntPass consulting. So naturally, nobody then knew who is Da Hongfei and how is he going to bring on a revolution in PRC in the next few years. In 2011, China was not much aware of this technology either. Therefore, there were no dedicated Bitcoin communities anywhere in the country or the whole of Asia. The tiniest bit awareness that a few people had regarding this technology was still in its embryonic stage. This lack of knowledge drove him to start a campaign for letting people know about Bitcoin in his country. His efforts resulted in the creation of an active Bitcoin community in PRC. Seeing that, he doubled his efforts to encourage more and more people to adopt this technology. His enthusiastic attempts ended up in significantly increasing the popularity of Bitcoin all over China. In fact, the true answer of the question, who is Da Honfegi is that he is the guy who introduced Bitcoin and the concept of cryptocurrency to China. It only took him a few years to upturn the growth of this community countrywide to a notable extent. Hongfei doon earned the reputation of being one of the most prominent luminaries in this whole progress.

After the realization of how desperately his country needed a new blockchain podium, Hongfei declared the inauguration of AntShares in the January of 2014. The venture was for the creation of distributed applications. The platform officially unveiled in the following month and instantly became the preferred choice for the majority of blockchain ventures in the country. Hongfei changed the name of the project from Anshares to NEO in 2017. I am sure people who have heard about NEO have already a pretty good idea of who is Da Hongfei. NEO is pretty much like the Ethereum blockchain in many ways. First off, both of them allow the decentralized apps to expand and develop. Secondly, both of them make use of smart contract practices. That’s the reason – NEO is often called Chinese Ethereum. 

However, it is not entirely similar to the Ethereum. It has some unique features as well that make it better than Ethereum. Hongfei and his crew specially designed NEO to a delegated Byzantine Fault Tolerance or dBFT consensus procedure. This first-ever protocol by China was issued as a whitepaper by the team in 2016. The use of this new mechanism enables NEO to provide much swifter and stronger deal optimization performance. NEO can deal with 1000 transactions in a single second. This functionality gives it a remarkable edge over Ethereum that can only take on 15 transactions in a second.

https://101blockchains.com/who-is-da-hongfei-neo-founder/ 
 

Who is Da Hongfei? The Leading Light

If you have some knowledge regarding the blockchain technology, or you have heard of it, you’d surely have come across the name Da Hongfei more than once.

101blockchains.com

 

Neo was founded 2014 and has grown into a first-class smart contract platform. It is backed by a global developer community who continue to drive the blockchain forward.

Neo is an open-source community driven blockchain platform. It is the most feature-complete blockchain platform for building decentralized applications. Neo enables developers to digitize and automate the management of assets through smart contracts. It also provides powerful native infrastructures such as decentralized storage, oracles, and domain name service, creating a solid foundation for the Next-Gen Internet.

Neo was founded by Da Hongfei and Erik Zhang in 2014 under the name Antshares. The original source code was published to GitHub in July 2015 and the MainNet subsequently launched in October 2016.

In 2017, Antshares was rebranded to Neo as it implemented Smart Contracts 2.0. It underwent aggressive global expansion as hundreds of new developers poured onto the blockchain. Neo leadership began distributing NEO token rewards to groups and individuals that contributed to the growth of the Neo platform. Some of the earliest groups to join Neo included COZ, NeoEconoLabs, and O3 Labs.

In 2021, Neo is being upgraded to version 3.0, known as N3. As a project that began in June 2018, the N3 upgrade represents the biggest advancement in Neo’s history. It is aimed at bringing the first all-in-one blockchain development experience to the industry, packed with powerful native features such as distributed storage, oracles, and name services. Neo N3 also boasts a simpler and more modular architecture than its predecessors, along with an improved governance and economic model.

Neo was a pioneer in the early blockchain industry. Not only was it the first public smart contract platform to be founded in China, it was also the first chain to use a dual token model and the first to implement a BFT style consensus mechanism. Further, Neo is still the first and only token sale to return all the original raised funds to its participants once the project had generated enough money to be self-sustaining.

https://neo.org/about 
 

Neo Defined - Neo Smart Economy

Neo Smart Economy

neo.org

 

 

 

Antshares (舊 NEO)의 철학

 

비트코인의 작업 증명 알고리즘이 가져온 탈중앙화에 동의를 하면서도 비트코인이 지향하는 완전한 탈중앙화가 만능이 아님을 주장. 예를 들어서 오픈소스 프로젝트라고 해서 모든 사용자가 소스 코드를 다운받아 직접 빌드해서 사용하지는 않으며 대부분의 사용자들은 컴파일된 버전을 다운받고 이를 의심 없이 사용한다. 마찬가지로 블록체인에서도 모든 노드가 작업 증명 같은 검증을 하는 대신에 보다 간단한 확인 절차만을 거친다면 보다 효율적인 운영이 가능하다.

However, a complete decentralization is not necessary when, with certainty and in an accountable way, conducting simple transactions without discretion. For example, an open-source project does not require everyone to code independently. Compiled versions are there for downloading, while just a handful of people may be actually doing the validation. If the accounting mechanism of the blockchain were to be designed for simple transactions that are with certainty, without discretion and accountable by cryptographic evidence, greater efficiency could be achieved in lieu of a complete decentralization. Bookkeepers of Antshares enjoy much lesser power than Bitcoin miners. In this context, bookkeeping becomes exactly a simple transaction. With this design, Antshares is capable of a settlement window of about 15 seconds.

https://github.com/cmptrx/AntShares/wiki/Whitepaper-1.0#a 

 

또한 기존에 비트코인 네트워크 위에서 디지털 자산을 교환할 수 있었던 카운터파티 (counterparty) 같은 서비스에서는 교환에 들어간 모든 정보가 블록에 기록되는 반면에 antshare에서는 최종 결과만을 기록해서 거래의 효율을 높이겠다고 주장.

Ripple, Bitshares and Counterparty are all Log Blockchains, documenting all user behaviors. For example, to send a bid instruction in the Counterpary, which is based on Bitcoin Blockchain, you have to wait for 10 minutes to have a successful bid placed (not deal). Moreover, the fees you have to pay for a bid is higher than the regular transfer fee. Antshares, on the contrary, is designed as a Settlement Blockchain. That is to say, log transactions like bids and cancels will not be written onto the blockchain. Antshares Blockchain is solely for registering transactions within which asset changes take place. Settlement Blockchains, sacrificing some non-essential information logs, could achieve better throughput, flexibility and user experience. Also, deprived from it, a brand-new type of decentralized transaction mode we call Super-Conducting Transaction emerged.

https://github.com/cmptrx/AntShares/wiki/Whitepaper-1.0#a 

 

마지막으로 비트코인이 현실의 금융 시스템과 별개의 독자적인 방식으로 운영되는데 반해 antshare는 현실 세계의 금융 시스템의 법칙 안에서 동작하게 설계되어 중국 당국의 법과 규정을 고려. 사용자가 개인 키를 잊어버려도 개인 키에 연결된 자산을 찾을 수 있는 방법이
antshare 프로토콜에 포함된다.

Antshares is after the compatibility with the real world. Antshares provides Chinese-law-recognized identity authentication solutions for both individual and corporate users. Digital signatures of the authenticated accounts will be recognized and protected by the Law of Digital Signature of China, and function as regular signs and seals. It is worth noting that identity Authentication is optional, not mandatory. Transfers and trades of assets like stock equities are in fact multi-party-signed e-contracts, so they are recognized and protected by the Contract Law of China.

https://github.com/cmptrx/AntShares/wiki/Whitepaper-1.0#a 

 

NEO가 이더리움 혹은 다른 블록체인과 어떻게 다르냐고 물었을 때 다홍페이의 답은 NEO는 기존 시스템과 같이 공존하려는 설계 철학에 있다고 말한다. 여러 발표장에서 Pragmatic idealism(아이디얼리즘)이란 표현을 썼는데 이는 실용주의와 이상주의 접목을 의미한다.

Q48: What makes Neo unique as a crypto project? And what is Neo’s vision moving forward (short and long term)?

Hongfei: There are many things. It pioneered the dBFT consensus mechanism. It was the first chain to use a dual token model. It has native support for decentralized storage and oracles. It is still the only project to return all raised funds to its token sale participants. Our philosophy of “pragmatic idealism” has helped the project solve many challenges. Neo is a project that has always forged its own path. Short term Neo’s vision is to bring more developers to the ecosystem. Long term it is to become the platform for the Smart Economy.

 

 

NEO로 간 John deVadoss(데비도스)

16 years at Microsoft to the first polyglot blockchain platform in the industry

Another example of a high-profile person leaving big tech for crypto is John deVadoss, former Managing Director (MD) at Microsoft, where he spent about 16 years of his career in a variety of roles, for example General Manager (GM) overseeing the developer platform Microsoft.NET, and most recently building Microsoft Digital from zero to half a billion dollars of business worldwide.

“I built and led Architecture strategy for .NET at Microsoft; I built the first enterprise frameworks and tools for Visual Studio .Net; I lead Microsoft’s first application platform product line and strategy, and I also worked on the Azure developer experience, long before it was called Microsoft Azure,” says deVadoss in an interview with CryptoSlate.

After all these years at Microsoft, deVadoss went for Neo – the “Chinese Ethereum” blockchain with high ambitions indeed. Neo might not be heard of a lot in the general crypto space, but it’s definitely an important blockchain in China.

“I have worked on developer platforms and tools for over 25 years, and it was a natural move to build the blockchain industry’s best developer tools and experience for Neo N3, the first polyglot blockchain platform in the industry and the most developer-friendly,” deVadoss says.

https://cryptoslate.com/why-big-tech-is-losing-talent-to-crypto-web3-projects/ 
 

Why Big Tech is losing talent to crypto, web3 projects | CryptoSlate

Big Tech companies, in Silicon Valley and elsewhere, are seeing an increasing number of their best talents and high profile employees moving into crypto, blockchains and web3.

cryptoslate.com

 

 

 

NEO 3.0

Introducing Neo N3 — the next evolution of the Neo blockchain
2021-03-17

Neo 3.0 was first announced by Erik Zhang in July of 2018. It promised many things, such as a new architecture, native contracts, and an improved economic model. We have delivered these things and so much more. Platform native decentralized storage, oracles, and name service are just some of the features that will make Neo the most complete blockchain development platform available today.

N3 is a contraction of “Neo3,” the term we adopted throughout 3.0 development. It is a nod to our journey and embodies many of the same characteristics as the software version it represents: Bold, refined, simple, and powerful.

It also provides modularity. N3 allows us to separate the version brand from the core Neo brand — something that is impossible with the name “Neo3.” This new brand architecture will enable us to market our major releases to developers, without interrupting the regular user’s relationship with Neo’s core identity.

In the short to medium term, you can expect to see the N3 logo showing up quite a lot as we tell the world there is something new to see over at Neo. In the general sense however, casual users will continue to recognize Neo by its existing brand for years to come.

https://medium.com/neo-smart-economy/introducing-neo-n3-the-next-evolution-of-the-neo-blockchain-b2960c4def6e 
 

Introducing Neo N3 — the next evolution of the Neo blockchain

After two and a half years of development, the next evolution of Neo is on our doorstep.

medium.com

 

https://medium.com/neo-smart-economy/neo3-a-new-beginning-for-pragmatic-idealists-c8d8f607036d

 

[Neo3 — A New Beginning for Pragmatic Idealists]
2020-12-22

1. New features (Oracle, NeoFS, NeoID)
2. New architecture (UXTO changed to account system, Neo VM, dBFT2.0, node and contract upgrades)
3. New economic model (GAS allocation model, transaction costs are significantly reduced due to the increase in TPS, and network deployment costs are also significantly reduced)
4. New ecosystem (Poly Network cross-chain ecosystem, Flamingo-based Defi ecosystem)
5. New governance mechanism (a flexible and manageable mechanism based on dynamic comprehensive democratic voting)

https://medium.com/neo-smart-economy/neo3-a-new-beginning-for-pragmatic-idealists-c8d8f607036d 
 

Neo3 — A New Beginning for Pragmatic Idealists

Hongfei give an in-depth walkthrough of 5 new aspects about Neo3 at the 2nd Nova Global Investment Institutions Summit.

medium.com

 

https://github.com/neo-project/neo

 

GitHub - neo-project/neo: NEO Smart Economy

NEO Smart Economy. Contribute to neo-project/neo development by creating an account on GitHub.

github.com

 

 

 

Neo Development Tools

https://github.com/neo-project/neo-blockchain-toolkit/blob/master/quickstart.md

 

GitHub - neo-project/neo-blockchain-toolkit: Develop, debug, test, deploy, track and manage Neo Blockchain Smart Contracts

Develop, debug, test, deploy, track and manage Neo Blockchain Smart Contracts - GitHub - neo-project/neo-blockchain-toolkit: Develop, debug, test, deploy, track and manage Neo Blockchain Smart Cont...

github.com

 

* Neo Blockchain toolkit을 이용해서 스마트 컨트랙트를 작성 가능

    - Visual Studio Code에 NEO Blockchain toolkit extension을 설치

    - Command line interface tool로 .NET을 설치

    - NEO 개발도구들을 설치한 후에 이들을 사용해서 스마트 컨트랙트를 개발

    - NEO 컴파일러 neon을 설치 (Neon은 NEO 컴파일러로 .NET의 DLL 파일을 NEO virtual machine이
알아들을 수 있는 바이트 코드로 전환시켜주는 컴파일러).

https://neo.org/dev#tooling

 

Developer - Neo Smart Economy

Neo Smart Economy

neo.org

 

* NEO private network에 배포

    - Neo-express는 ganache-cli와 유사한 개발자용 Neo 블록체인.

    - private network은 매 15초마다 새로운 블록을 생성. (NEO의 메인넷에서도 매 15초마다 새로운 블록이 생성.)
    - 생성된 블록 정보는 DevTracker를 통해서 확인 (블록과 트랜잭션을 점검)

 

* NEO에는 9가지 종류의 transaction이 존재

    - Miner transaction은 비트코인에서 coinbase transaction과 유사하게 블록의 맨 처음에 이루어지며 새롭게 생성되는 블록에서
네트워크 비용을 나누어주는 역할

    - Claim Transaction은 GAS를 청구하는 transaction

    - Contract Transaction은 앞에서 본 것처럼 asset 즉 NEO 코인 등을 보낼 때 사용

    - Invocation transaction은 스마트 컨트랙트와 관련되어 스마트 컨트랙트를 deploy 하거나 컨트랙트의 메소드를 호출할 때 사용하는 transaction

    - 그 외의 transaction들은 특별한 경우에 사용되거나 지금은 지원하지 않음.

 

* 토큰 : NEO 블록체인에는 NEO와 GAS 두 개의 토큰이 존재.
    - NEO 토큰은 governance token으로 네트워크를 관리하는 권한을 가짐. 네트워크의 변경이 필요할 경우 투표할 권한이 주어. 첫 번째 블록이 생성될 때 총 1억 개의 토큰이 발행되어 50%는 crowdfunding ICO를 통해서 판매가 되었고 나머지 50%는 NEO foundation에 지불되어 NEO의 개발에 사용.
    - Gas token은 utility token으로 블록체인 네트워크 비용을 지불할 때 사용. 비용을 지불하게 되어 네트워크 자원을 악용하는 것을 방지하면서 또한 네트워크 참여자에게 보상을 주는 목적으로 사용. Gas token은 블록이 생성될 때마다 생성되어 NEO holder에게 지불.

    - 지불된 GAS를 사용하기 위해서는 먼저 claim 즉, 소유권을 청구해야 함. NEO Express context menu에서 Claim GAS 명령을 실행한 후에 gas를 청구할 account를 선택.

https://neo.org/neogas#tokens

 

NEO & GAS - Neo Smart Economy

Neo Smart Economy

neo.org


* deploy 된 contract를 호출

    - NEO Express context menu에서 Invoke contract 명령을 실행.
    - Main Method를 선택하면 debugging 옵션을 포함해서 Invoke 할 것인지 Broadcast invocation transaction을 만들 것인지 선택. 여기서 Broadcast invocation을 선택해서 컨트랙트의 메소드 호출을 블록체인에 기록.
    - GAS 비용이 발생할 경우 이를 지불할 Account로 testWallet을 선택하고 Broadcast 버튼 선택.
    - script를 보면 APPCALL 명령 뒤에 따르는 주소가 컨트랙트의 hash값

 

*  Neo Blockchain toolkit을 사용해서 스마트 컨트랙트가 작성되고 테스트를 거친 후에 Neo 블록체인에 배포

*  배포된 스마트 컨트랙트와 사용자들을 연결시켜줄 front-end 개발

    - 1) wallet plugin에서 제공하는 DAPI를 사용하는 방법.

    - 2) 전자지갑 같은 기능을 포함하는 NEO-SDK를 사용해서 블록체인에 RPC request를 보내는 방법. 다양한 언어별로 SDK 제공. NeoLux는 C# NEO SDK로 C#을 사용해서 쉽게 NEO 블록체인의 스마트 컨트랙트와 연동할 수 있게 해주는 라이브러리.