<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vitor Nazário Coelho on Medium]]></title>
        <description><![CDATA[Stories by Vitor Nazário Coelho on Medium]]></description>
        <link>https://medium.com/@vitornazario?source=rss-be6719f375c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DBUzaK4L6cFBwxZM.</url>
            <title>Stories by Vitor Nazário Coelho on Medium</title>
            <link>https://medium.com/@vitornazario?source=rss-be6719f375c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 14:41:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vitornazario/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[On the difficulty of drawing proofs on byzantine consensus]]></title>
            <link>https://medium.com/neo-smart-economy/on-the-difficulty-of-drawing-proofs-on-byzantine-consensus-62f929720e58?source=rss-be6719f375c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/62f929720e58</guid>
            <category><![CDATA[neo-column]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[consensus]]></category>
            <dc:creator><![CDATA[Vitor Nazário Coelho]]></dc:creator>
            <pubDate>Thu, 29 Oct 2020 15:55:09 GMT</pubDate>
            <atom:updated>2020-11-16T09:31:35.300Z</atom:updated>
            <content:encoded><![CDATA[<p>Formal mathematical proofs on Byzantine inspired consensus dates back 1982 (<em>“The Byzantine Generals Problem”, Lamport, </em>Shostak &amp; Pease). Insights directly applied to distributed consensus over a working prototype were first presented around 1999 (“Practical Byzantine Fault”, <em>Castro &amp; Liskov</em>) and have suffered rebates and corrections few years later, around 2002 (“<em>Proactive Byzantine Fault Tolerance and Proactive Recovery”, Castro &amp; Liskov</em>).</p><p>Now, on 2020, we still struggle to formally specify large-scale operational conditions for pBFT inspired mechanisms for Blockchain.</p><p>With our background on the field of Combinatorial Optimization Problems (“<em>Optframe: a computational framework for combinatorial optimization problems</em>”, Coelho et al.), we have being moving one step forward. But how far did we go?</p><p>A Mixed-Integer Programing Model has been recently announced by our team (NeoResearch) throughout a didactic example that discretizes NEO dBFT consensus. Facing NP-Hard problems is a task that requires the acceptance of imperfect results. However and hopefully, some minimization/maximization problems can still give hope to be optimally solved for testing consensus liveness and finality.</p><p>As far as we went with this model <a href="https://github.com/NeoResearch/milp_bft_failures_attacks/blob/master/dbft2.0/dbft2.0_Byz_Liveness.py">https://github.com/NeoResearch/milp_bft_failures_attacks/blob/master/dbft2.0/dbft2.0_Byz_Liveness.py</a>, we noticed the following exponential behavior on the difficulty of the problem:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*t8QD_sxajLiKWJeGD22TEg.png" /><figcaption>Exponential growth of discretized MILP models for dBFT 2.0</figcaption></figure><p>Besides trying to solve this relatively “small scale” problem, we still face the challenge of solving those questions for a generic case. In addition, the proposed mathematical formulas still can miss assumptions, avoiding or exaggerating on constraints.</p><p>What is the real difficulty? Below we are going to highlight crucial points that decisions makers, researchers and developers need to double think when drawing novel consensus mechanisms:</p><ul><li>Define the limitations in which malicious nodes can affect the network;</li><li>On the other hand, introduce basic assumptions in which honest nodes are going to necessary follow.</li></ul><p>Only based on these two points, the challenge can be set. On the mathematical model we need to define two sets of nodes: R_BYZ and R_OK, where the first one represents all byzantine nodes, and the later the honest ones.</p><p>A basic precaution when defining honest nodes behavior is:</p><blockquote>Specify constraints that R_OK should follow is not a trivial task because it should not interfere on the free will of the global state (this point is of a delicate perspective because constraints can not force any convergence);</blockquote><p>Usually, NP-Hard problems involves trillions of solving possibilities. Similarly, finding a specific atom among the whole universe can be seen as analogous as the difficulty of proofing optimality for some cases. But this does not scare us because we know that solving this problem might be an answer to one of the most peculiar question of our century: “Is P = NP”? Thus, let&#39;s move carefully and compromise only with the tools that we currently posses.</p><p>In this sense, we would like to highlight, in our recent article “A MILP model for a Byzantine Fault Tolerant Blockchain Consensus”, online at <a href="https://www.mdpi.com/1999-5903/12/11/185">https://www.mdpi.com/1999-5903/12/11/</a>185, the recent achievement in developing this MILP model for dBFT 2.0, which is the basins for the development of dBFT 3.0, in which the specification can be found here <a href="https://github.com/NeoResearch/dbft3-specification">https://github.com/NeoResearch/dbft3-specification</a>.</p><p>Neo has established as a solid platform in which proposals for a core mechanism, such as its consensus, can not be done randomly and biased by peculiar modern mechanisms reported by the literature. Why would we pick an unproved asynchronous consensus as our core mechanism? Why to risk that if basic assumptions are not satisfied?</p><p>These trivial questions motivated us to keep simple. Thus, in order to keep designing improvements based on the most simplistic consensus that PBFT presents to be, we propose simple advances. For this reason, a trivial fallback primary is being now explored for dBFT 3.0 and discussions are starting to take place here <a href="https://github.com/neo-project/neo/issues/2029">https://github.com/neo-project/neo/issues/2029</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62f929720e58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/neo-smart-economy/on-the-difficulty-of-drawing-proofs-on-byzantine-consensus-62f929720e58">On the difficulty of drawing proofs on byzantine consensus</a> was originally published in <a href="https://medium.com/neo-smart-economy">The Neo Pulse</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On the importance of Oracles: NEO 3.0 and dBFT]]></title>
            <link>https://medium.com/neo-smart-economy/on-the-importance-of-oracles-neo-3-0-and-dbft-17c37ee35f32?source=rss-be6719f375c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/17c37ee35f32</guid>
            <category><![CDATA[neo]]></category>
            <category><![CDATA[neo3]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[fault-tolerance]]></category>
            <dc:creator><![CDATA[Vitor Nazário Coelho]]></dc:creator>
            <pubDate>Thu, 19 Sep 2019 18:29:50 GMT</pubDate>
            <atom:updated>2019-09-25T07:42:04.888Z</atom:updated>
            <content:encoded><![CDATA[<p>Connecting the dots has been the role of Scientists over the history, in which achievements of past generations are summed up in an effort of finding counter-proofs and improving previous findings.</p><p>With pleasure, we were able to deeply discuss Oracles during the last NEO Community Assembly, held by NGD Shanghai from September 1st to 8th, 2019 (<a href="https://neonewstoday.com/general/neo-hosts-successful-first-community-assembly-in-shanghai/">https://neonewstoday.com/general/neo-hosts-successful-first-community-assembly-in-shanghai/</a>).</p><p>Oracles, as currently being designed for the NEO Blockchain, are a scientific achievement that concatenates:</p><ul><li>The simplicity of dBFT and its Block Finality;</li><li>The multi-agent based designed of NEO Blockchain, composed of different autonomous entities;</li><li>The flexible of C# core code design, which provides simple access to this different layers and entities.</li></ul><h3><strong>NEO Oracles</strong></h3><p>Brainstorming sessions happened at the Community Assembly, in which proposals were considered along with previous knowledge obtained from discussions already held on github:</p><ul><li>Practical Detached State Persistence with Trees and Oracles: <a href="https://github.com/neo-project/neo/issues/769">https://github.com/neo-project/neo/issues/769</a></li><li>Oracles with two execution modes (Neo 3): <a href="https://github.com/neo-project/neo/issues/798">https://github.com/neo-project/neo/issues/798</a></li><li>(neo3 oracles) how to properly hide CN IP address: <a href="https://github.com/neo-project/neo/issues/932">https://github.com/neo-project/neo/issues/932</a></li><li>Design options and use cases for Oracles: <a href="https://github.com/neo-project/neo/issues/967">https://github.com/neo-project/neo/issues/967</a></li></ul><p>A common consensus that could be felt from the community was:</p><blockquote>NEO has an unique and state-of-the-art infrastructure for allowing an innovative and pioneer design for oracles!</blockquote><p>Why? The clear answer is: <strong>“Block Finality assisted by the flexibility of NEO dBFT”</strong></p><p>At this point, it is noteworthy to emphasize the beauty of Bitcoin efforts for making Lightning Network a reality, a scalable and refined mechanism that has been recently adopted by the Bitcoin Community.</p><p>On this same line of reasoning, we highlight how Oracles TXs can interact with NEO Blockchain on the Memory Pool layer in an innovative strategy that merges off-chain and on-chain capabilities and processing power.</p><p>Let&#39;s use some figures from <a href="https://medium.com/neoresearch/understanding-neo-network-in-five-pictures-e51b7c19d6e0">our previous insight</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*DeR_znwsvkXib_3_.png" /><figcaption>Figure 1 — User submits an Oracle Tx A via public RPC node call “sendrawtransaction”</figcaption></figure><p>Oracles transactions would be spread to all peers (red and blue nodes) in a fully distributed manner, until they might reach CN (green nodes).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/0*ypuQqamhGYYbQo9_.png" /><figcaption>Figure 2 — Tx A is propagated to other nodes via P2P protocol</figcaption></figure><p>Here, a trick would happen, Oracle transactions would be firstly found as pending on nodes Memory Pool, until responses from the majority of Oracles nodes is found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/0*ZI7HuCEX5C-cvMqN.png" /><figcaption>Figure 3 — Memory pools will be fulfilled with such oracle txs</figcaption></figure><p>However, here, before proposing a block, as detailed in the Figure 4, Speakers needs to check if an agreement for that specific Oracle TXs was already found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/0*rtvGDdxbEpR6TF_B.png" /><figcaption>Figure 4 —Speaker proposes a new block that can include Oracle Tx A (if so, an additional certificate should be included), only if, an external outer ring, in its majority, has necessary information regarding that Oracle TX data</figcaption></figure><p>Following this speaker proposal, as from the nature of the dBFT protocol, backups will need to validate such Oracle Tx, which should be coherent with the certificate proposed by Speaker for that specific Oracle TX.</p><h3>NEO Oracle Applications</h3><blockquote>Emission of certificates. Those who want to publish certificates of their specific data could use an smart contract that contains links to a list of documents. Based on this documents URLs, invocations would triggers oracles to get the current state of that information.</blockquote><p>These certificates are surely one of the most wanted applications by many entities of the public sector.</p><p>In addition, NEO Oracle will be a path that could be generalized for several other similar strategies, such as Lambda functions and third-party applications that could run as black-box functions.</p><p>Much more applications can be expected from this important connection of Blockchain and the external world of the internet.</p><p><em>A special thanks goes to distinct contributors of the NEO Community, in particular, to Igor Machado Coelho, Belane &amp; Shargon (Red4Sec), Researchers of NGD Shanghai and Researchers of SPCC Russia.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17c37ee35f32" width="1" height="1" alt=""><hr><p><a href="https://medium.com/neo-smart-economy/on-the-importance-of-oracles-neo-3-0-and-dbft-17c37ee35f32">On the importance of Oracles: NEO 3.0 and dBFT</a> was originally published in <a href="https://medium.com/neo-smart-economy">The Neo Pulse</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[dBFT 2.0–3 months, no sporks]]></title>
            <link>https://medium.com/neo-smart-economy/dbft-2-0-3-months-no-sporks-e2ab9fe1065b?source=rss-be6719f375c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2ab9fe1065b</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[neo3]]></category>
            <category><![CDATA[byzantine-fault-tolerance]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[distributed-ledgers]]></category>
            <dc:creator><![CDATA[Vitor Nazário Coelho]]></dc:creator>
            <pubDate>Thu, 29 Aug 2019 10:21:10 GMT</pubDate>
            <atom:updated>2019-08-29T13:50:49.528Z</atom:updated>
            <content:encoded><![CDATA[<p>As our dear friend <a href="https://github.com/edgedlt">EdgeDLT</a> used to say, sporks were single block hash duplications that were happening on the NEO network with the original dBFT 1.0. The origin of the term is not really known by us, thus, please correct if you have further information.</p><p>Edited: Edge just provided us with the source of that! And also gave us a review over of post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*YPlNbFP7CSJ7rvk2IOcYwQ.png" /></figure><p>Almost three months have already passed since the deployment of dBFT 2.0 into the Mainnet, around 3rd June. It is a great celebration time for us, because the investigations undertaken in designing a new cryptographic protected level for the dBFT consensus proved worthwhile!</p><p>In addition to the aforementioned new cryptographic layer (a commit phase triggered by a Byzantine Agreement), researchers from the of optimization, cryptography, and top-level C# developers contributed their efforts to ensure the liveness of the consensus mechanism in the most extreme cases. Thus, different recovery mechanisms and basic fault detection procedures were designed.</p><p>A mathematical programming model was even created for discretizing the consensus states, in an effort to mathematically prove the correctness of the consensus logic, <a href="https://github.com/NeoResearch/milp_bft_failures_attacks.">https://github.com/NeoResearch/milp_bft_failures_attacks.</a> However, such a model was not yet completed, since experimental science was demonstrated to be quicker (but not so powerful)…</p><p>On the other hand, these efforts have opened incredible paths for us to move forward, in which comprehension of partially synchronous consensus was further improved. Currently, a fully dedicated state model for the dBFT 2.0 is being implemented in C++ library, currently undergoing a testing phase and adjustments: <a href="https://github.com/NeoResearch/libbft">https://github.com/NeoResearch/libbft</a></p><p>The library provides a promising path for state guided communication of autonomous agents, for which the literature has already presented incredible efforts in the form of complex and important mathematical proofs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*qRv_j3jQecHt0KktOqvwSQ.jpeg" /><figcaption>A draft of the dBFT 2.0 state machine, extracted from <a href="https://github.com/NeoResearch/yellowpaper">https://github.com/NeoResearch/yellowpaper</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2ab9fe1065b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/neo-smart-economy/dbft-2-0-3-months-no-sporks-e2ab9fe1065b">dBFT 2.0–3 months, no sporks</a> was originally published in <a href="https://medium.com/neo-smart-economy">The Neo Pulse</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Latest Advances on NEO — Operational Perspectives II: How to audit Neo with a $10 machine]]></title>
            <link>https://medium.com/neo-smart-economy/latest-advances-on-neo-operational-perspectives-ii-how-to-audit-neo-with-a-10-machine-65176a5138d9?source=rss-be6719f375c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/65176a5138d9</guid>
            <category><![CDATA[state]]></category>
            <category><![CDATA[rpc]]></category>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Vitor Nazário Coelho]]></dc:creator>
            <pubDate>Wed, 24 Oct 2018 03:25:48 GMT</pubDate>
            <atom:updated>2018-10-24T03:41:18.155Z</atom:updated>
            <content:encoded><![CDATA[<h3>Latest Advances on NEO — Operational Perspectives II: How to audit Neo with a $10 machine</h3><p>First of all, it is impossible to not mention the great happiness in seeing the MainNet achieving blocks around 15s, without any forecasting strategy or consensus fine-tuning. As we previously mentioned on <a href="https://medium.com/neo-smart-economy/latest-advances-on-neo-operational-perspectives-58d306ba2e41">Latest Advances Part I</a>:</p><blockquote>“We imagine that everybody in the community expect the blocks to be carved always within 15s (one can surely expect a big improvement after 2.9.0 entering the mainnet, however, there is still some possibilities for ensuring a precise block time in most of the time). (…)”</blockquote><p>The synchronization of these nodes happened around last Sunday, 20th of October.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*muqXmQT4Q5iMRc4qKlu5Dw.png" /><figcaption>Neo Mainnet carving blocks around 15s</figcaption></figure><p>Now, let&#39;s talk about Storage, a precious piece of our smart contracts logic.</p><h3><strong>Neo storage history</strong></h3><p>In the Blockchain, events should be reproduced concisely and precisely. For this purpose, states can be stored on the Blockchain.</p><p>For this purpose, NeoResearch team, in partnership with Erik Zhang, designed a Dump script for getting the state of Neo Blockchain Storage during the whole history.</p><p>A particular script, and a minor addition of 4 bytes overhead on the local storage items, is now able to provide us with the latest height in which a given storage key was modified (an useful tool for exchanges, digital identity and transparency). With this tool at hand, a <a href="https://github.com/NeoResearch/neo-tests/tree/master/simple-rpc-node">simple-rpc-</a>node is being used for re-syncing the Blockchain and generating all history of Neo storage during these last 2 years, published and being updated at <a href="https://github.com/NeoResearch/neo-storage-audit">https://github.com/NeoResearch/neo-storage-audit</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W-W1CJq_JtGYFSUrBTAnDw.png" /><figcaption>Github repository that is being made available with Neo storage states</figcaption></figure><p>By using a simple droplet from Digital Ocean (Ubuntu 18.04.1 x64, 1 vCPUs, 2GB / 50GB Disk), that costs $10/month, we have been able to start the synchronization 13 hours ago. Now, we are around the block 1829000 and we expect that the process will reach the latest height in some more couple of hours/days.</p><p>Interesting facts:</p><ul><li>The first storage made available was around the block height <a href="https://raw.githubusercontent.com/NeoResearch/neo-storage-audit/master/BlockStorage_1500000/dump-block-1445000.json">1444843</a>;</li><li>All storage&#39;s transitions can be summed up to 111MB (until block 1829000).</li></ul><p>We believe that with these simple but useful initiatives Neo will keep its place as one the top blockchain systems.</p><p>Furthermore, considering the current advances and multilateral contributions from developers from all over the world, we keep our faith and efforts to achieve Da Hongfei&#39;s goal/mission of 100,000 tps before 2020.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65176a5138d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/neo-smart-economy/latest-advances-on-neo-operational-perspectives-ii-how-to-audit-neo-with-a-10-machine-65176a5138d9">Latest Advances on NEO — Operational Perspectives II: How to audit Neo with a $10 machine</a> was originally published in <a href="https://medium.com/neo-smart-economy">The Neo Pulse</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Latest Advances on NEO — Operational Perspectives]]></title>
            <link>https://medium.com/neo-smart-economy/latest-advances-on-neo-operational-perspectives-58d306ba2e41?source=rss-be6719f375c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/58d306ba2e41</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Vitor Nazário Coelho]]></dc:creator>
            <pubDate>Mon, 17 Sep 2018 15:15:32 GMT</pubDate>
            <atom:updated>2018-09-18T12:30:04.662Z</atom:updated>
            <content:encoded><![CDATA[<p>While researchers have been extensively investigating novel consensus paradigms, the real implementation of those mechanisms is limited when real-world systems are the focus. Pseudo-codes are usually the main guidelines for turning that into reality, thus, an arduous and meticulous task is left to programmers.</p><p>Following the same reasoning, one can propose several smart and complex negotiation protocols for multi-agent systems. On the other hand, when we look at reality, vehicles (massive use of IoT devices) are not yet smartly communicating with traffic lights and sensors during their routes, and there is still a gap between the academic literature and the construction of these protocols in our digital/smart cities.</p><p>In this brief note, we are going to highlight the brilliant advances on Neo core library, with better timings and deep attention on the details of a simple Byzantine Fault Tolerance implementation.</p><h3><strong>A journey inside Neo dBFT Consensus protocol</strong></h3><p>While other developers can be in favor of other complex, and claimed, more efficient consensus mechanism, NeoResearch team has been defending the fine-tuning of the current dBFT. Inspired by the well-known literature mechanism <a href="http://pmg.csail.mit.edu/papers/osdi99.pdf">Practical Byzantine Fault Tolerance — pBFT</a>, a simple protocol proposed around 1999 by Castro &amp; Liskov, the current Neo dBFT improves that concepts to the Blockchain reality.</p><p>In particular, two groundbreaking changes are going to the highlighted here: one related to an impressive achievement of Neo Consensus stability and a second related to a rare situation that is currently being solved.</p><h3><strong>1 — Efficiency using the Akka framework — Neo 2.9.0</strong></h3><p>Mostly, developers have in their hands pseudo-codes and previous experience (for themselves or from the beautiful sea of open knowledge that, nowadays, we have).</p><p>The abstraction for each specific case is done by the imagination of those who conceptualize that. In the old time, while programming C/C++ Optimization codes, memory leaks were hard to deal when dealing with pointers and references. On the other hand, the great advance of tools such as <a href="http://valgrind.org/">Valgrind</a> made the testing and verification tests easier.</p><p>On the same line of reasoning, parallel computing techniques have been evolving. The ability to use them and visualize where each technique or framework should be applied is the magic. That is why we are thankful to Erik Zhang for his brilliant dedication to the project and great catch that he has been having in improving Neo in a precise manner.</p><p><strong>Improving the consensus response times</strong></p><p>While understanding the stages of the Consensus procedure can be easy to some experts, fully comprehend the effort in each step is not a trivial aspect.</p><p>That is why Igor focused on developing a simple tool for drawing consensus messages (states), <a href="https://github.com/NeoResearch/neo-tests/tree/master/consensus-draw">https://github.com/NeoResearch/neo-tests/tree/master/consensus-draw</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gQtZcHm6UAMZhIYW.png" /><figcaption>Figure 1 — Communication before Akka framework</figcaption></figure><p>In Figure 1, we can see that the each step of the Block Generation (phases of the dBFT) were taking some time to reach other nodes, even in a local environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZiP59xC6qXuM2ojN.png" /><figcaption>Figure 2 — Communication after improvements and Akka framework</figcaption></figure><p>After seeing and analyzing the graphs, such as the one present at Figure 2, we even needed to change the <a href="https://github.com/neo-project/neo-plugins/commit/b7bcde5bb7eccad0aeb8dde1832151eee9911334">CN Logger to milliseconds,</a> on 13th of August, because precision has improved around 100x to 1000x!</p><p><strong>Why did it happen?</strong></p><p>Some important aspects are:</p><ul><li>Better control of the communication between nodes, using: smart ordering and filters.</li></ul><p>We mention smart ordering in terms of queuing the messages regarding priorities. Differently than other protocols, reaching a consensus requires several types of communication and a “smart conversation” between agents. We can see this family of protocol as an environment composed of several selfish autonomous agents.</p><p>At this point, one can imagine that each agent can prioritize its own objectives. Furthermore, each agent can perform a specific task on the network.</p><p>It is noteworthy that the current improvements were able to better organize these broadcasted messages throughout the network. Thus, each participant is now much more able to get exactly what is needed to accomplish a global objective, which is: generate the blocks in a trusted manner.</p><p><strong>It is a optimal solution? </strong>No, we do not think so, there is a huge sea of possibilities for optimization and, perhaps, better communication fine-tuning. In this sense, we are still motivated to keep understanding and studying new strategies for making this “simple” consensus to work as a state-of-the-art example of how agents can communicate in an efficient massively decentralized P2P network ecosystem, the Neo Blockchain.</p><h3>2 — “fork” tests</h3><p>The first implementation of the dBFT did not considered, for the sake of simplicity, a commit phase of those validators involved in the block generation.</p><p>Shargon, Belane and Erik already worked on the prototype of an additional phase aligned with the reasoning of the dBFT: <a href="https://github.com/neo-project/neo/pull/320">https://github.com/neo-project/neo/pull/320,</a> which is now being ported to meet the currently changes made to Neo 2.9.0 clients.</p><p>In a extremely rare situation, with delay and several communication losses between nodes, a specific node could stay with a “forked” block. The main reason is:</p><p><strong>1 </strong>— because of the nonce that is generated differently by each primary;</p><p><strong>2 — </strong>and/or the possible new coming transactions that arrived while that specific node lost connection (exactly when the necessary amount signatures was achieved and the node assumed that all others would follow the same block).</p><p>An effort done by the Security team and NeoResearch was to reproduce such scenario (a difficult task, mainly because of the fine-tuned communication with the Akka refactoring). For this purpose, the scripts available at <a href="https://github.com/NeoResearch/neo-tests/tree/master/forking-tests">https://github.com/NeoResearch/neo-tests/tree/master/forking-tests</a> were created.</p><p>On the night of 21th, August, NeoResearch team was able to concisely reproduce such scenario (only interfering in external conditions such as network delays), opening doors for facilitating the validation of the ongoing solution, e.g, automated testing.</p><h3>3 — Fine-tuning the consensus time</h3><p>We imagine that everybody in the community expect the blocks to be carved always within 15s (one can surely expect a big improvement after 2.9.0 entering the mainnet, however, there is still some possibilities for ensuring a precise block time in most of the time). That is why a precise fine-tuning is currently going on at <a href="https://github.com/neo-project/neo/pull/268">https://github.com/neo-project/neo/pull/268</a>.</p><p>We believe that with some precise changes and a kind of Kalman Filter we might be able to ponder trade-offs that are inherent to the system.</p><p><em>It is a great pleasure to share some insights with all of you here. <br>Finally, we would to really thanks this brilliant and united community that has been essential for ensuring improvements aligned with the desires and wishes of several decentralized involved agents.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58d306ba2e41" width="1" height="1" alt=""><hr><p><a href="https://medium.com/neo-smart-economy/latest-advances-on-neo-operational-perspectives-58d306ba2e41">Latest Advances on NEO — Operational Perspectives</a> was originally published in <a href="https://medium.com/neo-smart-economy">The Neo Pulse</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mission Impossible IV: In the search for multiples paths]]></title>
            <link>https://vitornazario.medium.com/mission-impossible-iv-in-the-search-for-multiples-paths-c33798e0f8a9?source=rss-be6719f375c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c33798e0f8a9</guid>
            <category><![CDATA[neo]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Vitor Nazário Coelho]]></dc:creator>
            <pubDate>Tue, 29 May 2018 22:25:07 GMT</pubDate>
            <atom:updated>2018-05-29T22:29:04.459Z</atom:updated>
            <content:encoded><![CDATA[<p>By: Igor M. Coelho and Vitor N. Coelho</p><p>Multiple paths were possibly found. A reward has been offered to the backpacker who could discover which path should be taken in an intersection.</p><p>Due to the connection and possible use cases on Ontology, which is an ecosystem being designed for multi-language and cross-chain interactions, some ONT tokens were made available.</p><p>Following the tradition, this mission has been released for 48 hours and known by many blockchain experts (<a href="https://github.com/NeoResearch/open-challenges/blob/master/1st_NeoBlockchain_Challenge.md">https://github.com/NeoResearch/open-challenges/blob/master/1st_NeoBlockchain_Challenge.md</a>), but nobody took it. So it deserves the title of Mission Impossible IV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*JJHODD6ue8hTNh1X1vtJFg.jpeg" /></figure><p>Here, the idea was to exploit analysis that could lead the chain to break.<br>The idea/concept of breakage discussed here is dealt in the context of different clients understanding a transaction in different manners.</p><p>In particular, Neo is a multi-cultural project and, as consequence, its current available tools are nowadays interconnected in a multi-language manner.</p><p>NeoResearch Community contributed for the insights presented here. Their is on improvements and the development of cutting edge technologies, but, since several tools developed by the community are considered, different challenges are faced and tackled by them during their researching journey.</p><p>In this episode, we gonna show how neo-python clients, <a href="https://github.com/CityOfZion/neo-python">https://github.com/CityOfZion/neo-python</a>, can see the chain differently from the original c# neo based ones, <a href="https://github.com/neo-project/neo">https://github.com/neo-project/neo</a> + <a href="https://github.com/neo-project/neo-cli">https://github.com/neo-project/neo-cli</a></p><p>While it does not represent any vulnerability or problem in projects deploy on the MainNet, we would like to increase awareness about these issues.</p><ol><li><strong>CheckWitness Chain Break</strong></li></ol><p>Here is a simple example (the same code can be produced in C#):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*1Pyn1K2XekOCxDPn4rZ3VQ.png" /></figure><blockquote>from boa.interop.Neo.Runtime import Notify, CheckWitness<br> from boa.interop.Neo.Storage import Get, Put, Delete, GetContext<br> from boa.interop.Neo.Runtime import Notify</blockquote><blockquote>def Main():<br> OWNER=b’031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a’<br> result = CheckWitness(OWNER)<br> if result:<br> print(“OWNER is caller..”)<br> Put(GetContext(), “test”, “This is Python!”);<br> return True<br> else:<br> print(“OWNER is not caller..”)<br> Put(GetContext(), “test”, “This is C#!”);<br> return True<br> return False</blockquote><p>When this contract a contract with this characters is deployed, different storage values will be reported by the neo-cli RPC or neo-python.</p><p>This is current happens due to a simple line that allow public address with 66 or 44 lenght. Something that returns false in the original Neo library design.</p><p>Multiples paths:</p><p><a href="https://github.com/CityOfZion/neo-python/blob/42e0bb41866d0b2c7aa3ee460a8f8ce3ae2f1f22/neo/SmartContract/StateReader.py#L279">https://github.com/CityOfZion/neo-python/blob/42e0bb41866d0b2c7aa3ee460a8f8ce3ae2f1f22/neo/SmartContract/StateReader.py#L279</a></p><p><a href="https://github.com/neo-project/neo/blob/242ebb8600f3b16bebd462b4d33bc6609f2cfcc2/neo/SmartContract/StateReader.cs#L231">https://github.com/neo-project/neo/blob/242ebb8600f3b16bebd462b4d33bc6609f2cfcc2/neo/SmartContract/StateReader.cs#L231</a></p><p><strong>2) Contract return type as void, possibly bigIntenger problems</strong><br><strong><em>Previous insights:</em></strong> <a href="https://github.com/CityOfZion/neo-python/issues/217">https://github.com/CityOfZion/neo-python/issues/217</a> and <a href="https://github.com/CityOfZion/neo-python-core/issues/49">https://github.com/CityOfZion/neo-python-core/issues/49</a></p><p>This is another issue currently exploited that makes the neo-python understand the storage from the blockchain differently than the original design.</p><p><strong>Considerations</strong></p><p>It is noteworthy that Neo achieved a high level of development, counting with experts from different/distinct fields. The Ecosystem currently represents a state-of-the-art in the field of Blockchain and Fully Distributed communication between agents.</p><p>On the other hand, with the flexibility proportionate by the brilliant design, developers should be attentive when testing their contracts.</p><p>Neo promotes an unique environment for the use of Dapps, with a paradigm that proportionate the growth of projects not possible to be implemented/deployed before.</p><p>Finally, we would like to communicate that NeoResearch is doing huge efforts towards a platform that will automatically test some of the aforementioned points.</p><p>Previous Missions Impossible:</p><ul><li><a href="https://medium.com/neweconolab/neo-smart-contract-development-1-mission-impossible-3d25d3ca3bd4">https://medium.com/neweconolab/neo-smart-contract-development-1-mission-impossible-3d25d3ca3bd4</a></li><li><a href="https://medium.com/neweconolab/neo-smart-contract-development-ii-an-additional-exploration-of-mission-impossible-119b49666b1d">https://medium.com/neweconolab/neo-smart-contract-development-ii-an-additional-exploration-of-mission-impossible-119b49666b1d</a></li><li><a href="https://medium.com/@igormcoelho/mission-impossible-iii-distributed-payments-on-neo-platform-58398b0d77d3">https://medium.com/@igormcoelho/mission-impossible-iii-distributed-payments-on-neo-platform-58398b0d77d3</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c33798e0f8a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>