Be a crypto hero in the market by logging in
Don't you have an account? Sign in
Market trends report
Vostok’s approach addresses many of the shortcomings of public-blockchain smart contracts when applied to a private network.
The blockchain is evolving from payment systems, to enabling the platforms that allow underpin decentralised applications. Charles Hoskinson provides a good explanation: when Ethereum was developing their platform they realised that the transfer of assets has a story behind it, which can consist of different terms and conditions to be fulfilled for transfer to be finished. Consequently, with further technological development blockchain users realised that more than transferring is possible and started to build various useful and even funny decentralised applications. As far as the public blockchain goes the main use cases are:
With the growth of adoption and popularity of public blockchain platforms, enterprise companies understood that blockchain technology could actually be very efficient for some of their business processes. That progress and focus on business needs had an influence on smart contract development as well. Now, given our experience with the corporate customers, we can provide popular use cases in which smart contracts can shine in the private blockchain arena:
As you might imagine, there is a difference between smart contracts for public and private blockchains. On a private blockchain the key differences are:
The answer to this question is relatively simple — they want to translate their complex business processes into blockchain logic with a minimum amount of pain. In order to satisfy the needs of our customers, we conducted research and formulated questions to understand what has to be done with our smart contracts:
As you might know, Waves has the RIDE language, which is really convenient and well-integrated to the blockchain — but it is useful only when the logic of the application is confined to the chain. For applications which need to operate with a lot of different documents, RIDE is inconvenient and we should use something more friendly for developers.
2. Q: Can the system easily express complex business rules?
For most languages the answer is, unfortunately, no. There are many reasons for this. Corporate developers do not know blockchain specifics and languages for smart contract development, and the relevant languages aren’t able to work with off-chain data.
3. Q: Can we upgrade contracts in the future without rewriting all blockchain structures?
Again, no for most approaches on the market (except Hyperledger Fabric). The main reason is that contracts are integrated into the blockchain too closely, which is inherited from public networks where another integration poses a direct threat to system security.
4. Q: How easy is it to integrate smart contracts into existing customer infrastructure and work with other business applications?
Unfortunately, most of the business applications or their APIs have to be redesigned and it is hard to use them from smart contracts, which introduces additional costs for businesses when adopting blockchain within their project.
In the next section, we will describe how we approached all these problems and what our complete solution is.
So, what smart contracts are available for Vostok Platform?
As you already know, Vostok support RIDE and relatively soon will adopt RIDE 4 dAps. But RIDE, like almost any other smart contract language that was developed for the public platform initially, lacks the ability to work with off-chain data. Given that RIDE is very fast and well-integrated to the blockchain we propose to use RIDE for implementation of simple logic that doesn’t involve data processing from external sources. So, for example, public auctions, public voting, public insurance could all be implemented using the RIDE language. Otherwise, we recommend using our new feature — Docker smart contracts.
Vostok Docker smart contracts are actually programs wrapped into the Docker container. The Docker container is placed in the Docker registry (one or many). Each container has an address on the blockchain and an image hash associated with it (obviously to ensure that we are using the valid container we publish the image hash beforehand with the DockerCreate transaction: more on this can be found in our documentation). To execute a contract, a blockchain transaction is made with the required call parameters, and the contract will also write the results on the blockchain. Since we are using Docker containers, any programming languages and frameworks can be used, unlike Hyperledger Fabric, where developers are limited by the SDK. Note that Docker isolates the application from the Vostok node and we do not have access to the node at the Code level, but we do have a network connection so are able to execute HTTP or RPC requests when we need to. This means we are able to request not only our node but almost any other service we know. To summarise our previous statements, the key advantages of Vostok’s Docker smart contracts are:
As explained in the previous section we have some code in the docker container. But what actually happens, when someone puts a call transaction in the Node transaction pull? The procedure is as follows:
If you are interested in seeing examples and the necessary steps of deploymen,t you can check this guide in our official documentation.
The advantages do we gain from these technological solutions are important, so here we will discuss how our Docker smart contracts compare with other popular smart contracts.
1. Ethereum has a strong community and has dominated for a long period of time as the number one dApp development platform in the public blockchain arena. It has also been modified for private blockchain use (for example Quorum and Masterchain). But Solidity and EVM languages in general, for the sake of execution on a public network, have serious limitations which Vostok Docker contracts do not have.
a) Gas. EVM languages are Turing complete, but in order to be stable in case of an attack, which would paralyse the system by executing infinite calculations, there is a limit to how many operations EVM can perform per contract execution and how complex operations can be. As a result, if we have a complex contract we may get an Out of Gas Error. This is impractical for a private network, because we require that business processes will be completed.
b) Off-chain data. You can put some data in the Ethereum smart contracts, but the storage is quite limited and expensive. You can not, for example, write a contract for example, that requests current prices from an exchange, and uses them for other operations. In other words, you can not create a small web server using Solidity, but you can do it with Vostok — and even with your favourite programming language and framework.
2. Hyperledger Fabric is currently the best-known platform for private blockchain solutions, and also brings to the table smart contracts in Docker containers. However, they are limited by the SDK and only available for Go, JS, etc. Developers have to handle a lot of low-level operations like dispatch and argument discovery, making even the simplest ‘hello world’ programme on Go 90 lines of code. This might be impractical for many developers.
We are constantly working on improving our technology and have already started work on some of the key features we will release in the coming months. To start with, we are working on security enhancements for the current protocol. In the future, smart contracts may require a multi-signature by miners involved in contract execution. We are also enhancing our mining process to support parallel mining of Docker smart contracts and ordinary transactions, along with mining multiple Docker contracts in parallel.
Smart contracts for the private blockchain network was originally published in Waves Platform on Medium, where people are continuing the conversation by highlighting and responding to this story.
잘한다다 3 시간전
이오스랙스 신청 접수 되는지요
Community | [중요] 이오스 렉스 참여방법 (EOS 입금부터 수익금 확인방법까지)
숨쨩 8 시간전
Community | 레아 프로토콜 이벤트 당첨금이 바뀌었네요 ㅠㅡㅠ
숨쨩 8 시간전
Community | 레아 프로토콜 이벤트 당첨금이 바뀌었네요 ㅠㅡㅠ
hukyong33 12 시간전
320개 준다던 레아를 ;;; 8000원 상당 레아로 준다고요 ....?
Community | 레아 프로토콜 이벤트 당첨금이 바뀌었네요 ㅠㅡㅠ
늘 즐거운 날들 되세요
Community | 스포와이드공지 잘 확인하세요
fastest rising posts
Write a post
Are you sure you want to delete this post?
Are you sure you want to delete this comment?
Purchase has been completed.
닉네임을 설정 후 작성해주세요.