Occasional blogger, social media moderator, reformed troll.
Posts made by jb395
Qtum Series Development Course Enters Golden Academy
Global Digital Identity Project IAME Hosts Qtum Encryption Technology Night
At present, the innovation of encryption technology is mainly used to protect data transmission between two or more nodes in the network but does not solve the problem of an increase in the number of nodes in the perceptual data network. As the number of electronic transactions by a person increases, the number of nodes in the personal data network also increases exponentially, thus increasing the number of exploitable vulnerabilities. What kind of preservation method makes your information security never leaked? Decentralized storage helps you make no worries about information leakage.
The IAME identification network is built on the Qtum Quantum Chain, which passes a person's identity fragmentation message to multiple independent third parties outside the transaction side for verification.
See the full article (use Google Translate) at https://mp.weixin.qq.com/s/kYk5EbuBZu-TF2CTfwERPw
Qtum Research Institute: Detailed Explanation of Plasma Expansion Scheme
(Google Translation from original WeChat article https://mp.weixin.qq.com/s/XuG1ZW3S9qTBq3Iaj39dJg)
In the recent twitter poll issued by the famous bitcoin investor Olivier Janssens, Vitalik Buterin expressed his support for the ERC20 CBDC (Central Bank Digital Currency). When asked about the ability to scale, Buterin replied that the upcoming Plasma deployment could solve such problems, so the blockchain network would be sufficient to support the capacity that the central bank needed.
The theme of this year's research institute is to explain in detail how the Plasma expansion solution can support extremely high transactions and become the most popular landing technology solution in the industry.
What is Plasma?
Plasma is a blockchain expansion scheme proposed by Joseph Poon and Vitalik Buterin. Plasma refers to running a series of smart contracts on the root blockchain or the main chain (for example, the Ethereum blockchain), which will formulate relevant rules. The blockchain extended based on the contract deployed on the root blockchain is called a sub-chain, and the state trading rules formulated in the contract will be used for the sub-chains, and these sub-chains can further derive their own sub-chains.
In most cases, the sub-chain can perform a large number of calculations, and only periodically broadcasts the normal state Merkle certificate to the root chain. The root chain only needs to process a small number of requests from the sub-chain, which can greatly expand the capacity of the entire system.
The root and sub-chains form a tree-like layered structure, as shown in the following figure. The submission of the block flows down in turn. When the user wants to exit the Plasma sub-chain, the exit request can be submitted to any parent chain and eventually submitted to the main chain.
Plasma block chain tree structure
Plasma is similar to a court system, and the Plasma blockchain at different tree depths is like a court at all levels. A higher court can deny the outcome of the lower court, and the root chain is the highest court. It is generally tried by a lower court, and if the user does not agree with the outcome of the trial, he can return to a higher court. This maximizes the availability of lower courts and minimizes the cost of non-consensus status.
The Game Mechanism Contained in Plasma
Plasma makes the entire blockchain system work by creating economic incentives and rewards and punishments. In the Plasma blockchain, the subchain has its own consensus algorithm and is independent of the root chain. Similar to the existing blockchain, there is also a block producer in the sub-chain, called the operator of the Plasma chain. But these block producers need to mortgage a portion of the assets, and if they remain honest and correctly record the block content of the sub-chain, they will receive financial rewards; and if they have bad fraud, the mortgaged assets will be destroyed.
In a Plasma sub-chain, the validator or operator is responsible for notifying the root chain of the relevant activities of the sub-chain. To save storage space, only the hash of the block header is submitted to the root chain, and other information is stored on the sub-chain.
To use the Plasma chain, users need to deposit funds into the Plasma chain. The user moves funds from the root chain to the corresponding sub-chain by moving the funds to the Plasma Smart Contract deployed on the root chain.
In the plasma blockchain, the root chain is the enforcer of all global calculations and is only punished for giving fraudulent operators. If the user in the Plasma sub-chain finds that the operator submitted the forged information to the root chain, they can submit relevant fraud proof data to the root chain to prove that the data provided by the operator is forged. Once the proof is successful, the block of the Plasma sub-chain will roll back to the state before the forgery, and the operator will also be punished.
How to Get Back the Pledged Assets
If the user wants to retrieve their assets, or if the user has a crisis of trust in their own Plasma chain, they want to transfer the assets back to the root chain or the Plasma parent chain. The user can initiate a withdrawal transaction or an exit transaction, i.e. a Merkle certificate that the user submits their transaction history to prove that they have a certain amount of funds.
Generally, there are two types of withdrawals. One is a simple withdrawal, which unilaterally retrieves assets from the sub-chain; the other is a large number of withdrawals (mass withdrawal), which means that multiple parties retrieve their assets from the sub-chain.
Simple withdrawals include the following steps:
The user submits a signed withdrawal transaction (withdrawal transaction) to the root chain or the Plasma parent chain. The user needs to attach a deposit as a bonus while initiating the withdrawal transaction.
Enter a challenge period after submitting the withdrawal transaction. During the challenge period, anyone can submit a fraud certificate to challenge the user's asset statement, proving that the user's asset claim is invalid or expired. If the challenge is successful, the withdrawal transaction will be cancelled, and the challenger will receive the bonus provided by the user.
- If no one can provide a fraud certificate until the end of the challenge period, then the withdrawal transaction is determined to be correct, the user can redeem the funds on the root chain or the Plasma parent chain, and the reward will be returned to the user.
For a large number of withdrawals, the situation is obviously more complicated.
When multiple users submit withdrawal transactions to the root chain or the Plasma parent chain at the same time, the root chain or parent chain processes the user's withdrawals according to the user's UTXO or account creation time, from the initial transaction to the latest transaction sequence. This order of processing can prevent fraud to a certain extent and will be explained later by way of example when talking about Minimal Viable Plasma.
The Qtum Institute will conduct regular technical courses from now on, with one topic per issue. Here we use the most professional perspective to interpret the current hot topic of blockchain technology. The first issue of the theme: Lightning Network, as early as November 2017, Qtum will introduce lightning network first. For details, see "Introduction and Test of Lightning Network Function Based on Qtum Quantum Chain"
In recent months, the transaction fees of the Bitcoin network have soared, reaching a record high of over $30, but in 2018, a new expansion solution may save the digital currency kingdom.
When the block size is limited to 1MB, the Bitcoin network only supports about 7 transactions per second on the whole network, which is much lower than the traditional financial transaction system. At the same time, every 10 minutes for a block, the transaction needs to be securely confirmed to require at least 6 blocks, making the transaction confirmation slow.
In order to improve the performance of the Bitcoin network, the community proposed different solutions such as chain expansion and chain expansion. The expansion of the chain is mainly to increase the size of the block, so that each block can contain more transactions, thereby increasing the transaction capacity; the expansion scheme under the chain is the lightning network, and the design idea is to put a large number of transactions into the bitcoin. Execution outside the blockchain, only the key links are placed on the chain for confirmation. The design of Lightning Network was first proposed in the paper "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" in February 2015.
Lightning Network mainly improves the trading channels under the chain by introducing the idea of smart contracts. It is based on the evolution of micro-payment channels and creatively designs two types of trading contracts: Revocable Sequence Maturity Contract (RSMC). ) and Hashed Timelock Contract (HTLC, Hash Time Lockout Contract). RSMC solved the problem of confirmation of the chain transaction, and HTLC solved the problem of the payment channel. In the previous section we only talked about a trading contract - RSMC.
Lightning Network – RSMC
RSMC (Revocable Sequence Maturity Contract)
The RSMC is designed to create a two-way micropayment channel by co-funding between the two parties.
The following is an example of Alice and Bob to explain RSMC.
Assuming that Alice and Bob are partners, there are often bitcoin transactions, so they decided to take 0.5BTC into the channel to facilitate business.
The following figure shows the structure of the RSMC transaction. The left side is Alice's perspective, the right side is Bob's perspective, and the middle Funding Tx is common. The signature with the <> sign in the figure indicates that the signature has been successfully signed, and the <> sign indicates that the signature is to be signed.
Structure diagram of RSMC transaction
Both parties take out 0.5BTC, build Funding Tx (funds pool), and output 2/2 multi-signatures for Alice and Bob. At this point, Funding Tx is not signed and cannot be broadcast into the main chain.
Alice constructs Commitment Tx: C1a (Commitment Tx 1a) and RD1a (Revocable Delivery 1a) and hands it over to Bob for signature. The first output of C1a is the multi-signature address, Alice's other private key Alice2 and Bob's 2/2 multi-signature, and the second output is Bob 0.5BTC.
RD1a is the first transaction of C1a, and is output to Alice0.5BTC, but this type of transaction has sequence, which is to prevent the current transaction from entering the block. Only when the forward transaction has sequence confirmation can it enter the block.
Bob constructs Commitment Tx: C1b (Commitment Tx 1b) and RD1b (Revocable Delivery 1b) and hands it to Alice for signature. The structure is symmetric with C1a and RD1a.
Bob signs C1a and RD1a and signs it to Alice. Similarly, Alice signs C1b and RD1b and gives Bob when done. At this time, since the Funding Tx is not signed, neither party can do evil, and neither party will suffer any loss.
After both parties have completed the signature and exchange of the commit Tx, they will then sign and exchange the Funding Tx. At this point, Funding Tx is a complete transaction that can be broadcast into the main chain.
The above is the whole process of creating RSMC.
Both parties to the transaction pre-store a portion of the funds into the micro-payment channel. In the initial case, the distribution plan of the two parties is equal to the pre-existing amount. Every time a transaction occurs, it is necessary to confirm the result of the fund allocation after the transaction, and the signature invalidates the old version of the distribution plan. If any party needs to withdraw it, it can be confirmed by writing the transaction results signed by both parties in the blockchain network.
Any party can withdraw cash at any time, and it is necessary to provide a fund allocation plan signed by both parties. Within a certain period of time, if the other party produces a certificate indicating that the scheme has been revoked (not the latest transaction result), the funds are not penalized to the challenger; otherwise, the distribution is based on the result of the proposer. The penalty mechanism ensures that no one will deliberately take an old transaction result to withdraw.
In addition, even if both parties have confirmed a withdrawal, first of all, the withdrawal of the funds from one party is later than the other party, which encourages everyone to complete the transaction outside the chain as much as possible. Through RSMC, a large number of intermediate transactions can occur outside the chain.
Alice and Bob each have a balance of 0.5 BTC. At this time Alice purchased a commodity from Bob for 0.1 BTC, then the balance should be changed to Alice 0.4 BTC and Bob 0.6 BTC. So create a new Commitment Tx, which is C2a and RD2a for Alice and C2b and RD2b for Bob. The process is similar to the above.
Transaction structure when the transaction is updated
At this point both states are valid, then the most core problem comes, because C1a and C1b are already processed transactions, C2a and C2b are the latest trading status, how can we completely discard C1a and C1b? RSMC uses a very clever method. In the first output of C1a, Alice2 and Bob's multiple signatures are used. Alice hands Alice2's private key to Bob, which means that Alice gives up C1a and acknowledges C2a. In the same logic, Bob hands Bob2's private key to Alice, which means Bob gives up C2a and acknowledges C2b.
Multi-signature when the transaction is updated
Alice surrenders Alice2's private key to Bob, then Bob can modify the output of RD1a and output the output of RD1a to Alice's BTC to himself, forming a new transaction BR1a (Breach Remedy 1a). If Alice breaks the contract and still broadcasts C1a in the presence of C2a, then Alice's penalty is to lose all her coins. Alice surrenders Alice2's private key, or signs the transaction BR1a, which is equivalent and is a waiver of C1a. Vice versa, Bob surrenders Bob2's private key to Alice, which means giving up C1b, but only C2b.
The purpose of introducing the sequence is to prevent the subsequent transaction (RD1a) from entering the main chain and give an implementation penalty window. When the other party is found to be destroying the contract, there may be 1000 blocks of confirmation time to implement the penalty transaction, that is, broadcast BR1a instead of RD1a. If you miss 1000 block time windows, you can no longer implement the penalty (RD1a enters the main chain).
Close the RSMC and construct a Commitment TX directly according to the final balance. For example, the output is Alice 0.1BTC, Bob 0.9BTC, no need to set multiple signatures, construct penalty transactions, and so on.
(translated and cross posted from Qtum WeChat)
Qtum University Research
Qtum and the Tallinn University of Technology in Estonia conduct academic research in the field of blockchain, and jointly explore the application and application of smart contracts in blockchain technology in various commercial fields.
Hidden in the Nordic smart city “Utopia” – Estonia, a small but innovative Nordic country, is not well known to the people of the country, but its level of urban informatization is amazing.
Estonia has a world-leading e-government office system in countries such as information technology, Internet access and infrastructure far beyond China and the United States.
In collaboration with Tallinn University of Technology (TTU), Professor Alex Norta studied the topics in three directions:
- Mobile Smart-Contracts Lifecycle Management (Management of the smart terminal life cycle of the mobile terminal)
- Smart contract language development (development of smart contract programming language)
- How to create self-aware human-readable contracts for peer-to-peer (P2P) commerce (Decentralized Autonomous Business Application System)
At present, three doctoral students based on Qtum blockchain technology research papers are now included in the IEEE International Association.
As the world's largest information professional association, IEEE is committed to promoting technological innovation. It has also been rooted in blockchain technology for many years. Among them, IEEE's technical literature in electrical engineering, computer science and electronic technology accounts for one-third of the world. A major contributor to many international standards for telecommunications, information technology and power generation products and services.
As one of the most influential projects in the world, Qtum is also engaged in technological research and commercial innovation and is committed to being the industry's leading technology position as the wave of blockchain technology erupts.
It has developed blockchain technology research with four technical colleges at home and abroad to explore blockchain technology. Global collaboration has enabled blockchain technology to enter thousands of households.
The Tallinn University of Technology (TTU), founded in 1918, is the oldest and largest university in Tallinn, Estonia, and the largest national science and engineering university in Estonia. The school offers interdisciplinary higher education, innovation and technological development, and is the only comprehensive university of science and technology in Estonia with a focus on information technology, business administration and engineering. Tallinn Institute of Technology has 8 colleges and 10 research institutes. There are currently 14,000 students, including 800 international students. There are 128 subjects available for undergraduate, master's and doctoral degrees; there are three languages of instruction: English, Estonian and Russian.
Alex Norta graduated from the Technical University of Eindhoven and later worked as a postdoctoral researcher at the SOAMeS project in the Department of Computer Science at the University of Helsinki. His main research interests are Business-process aware cross-sociotechnical system collaboration with means of service-oriented cloud computing. Smart contract related research work.
(crosspost and translation from Qtum Wechat)
RE: How to get the method's return value of a sendtocontract call?
You may only get the transaction ID back.
Here is another reference from Bodhi https://bodhiproject.github.io/wiki/bodhi_token/qtum_cli/