<?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 Joel Dudley on Medium]]></title>
        <description><![CDATA[Stories by Joel Dudley on Medium]]></description>
        <link>https://medium.com/@joel.dudley?source=rss-802cf3a92bf1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HL1ZQo5IvtdFgEE2ci5LWg.jpeg</url>
            <title>Stories by Joel Dudley on Medium</title>
            <link>https://medium.com/@joel.dudley?source=rss-802cf3a92bf1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 01:24:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joel.dudley/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[The deterministic JVM in action]]></title>
            <link>https://medium.com/corda/the-djvm-in-action-34f3b852e051?source=rss-802cf3a92bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/34f3b852e051</guid>
            <category><![CDATA[corda]]></category>
            <category><![CDATA[r3]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Joel Dudley]]></dc:creator>
            <pubDate>Wed, 15 Apr 2020 11:51:57 GMT</pubDate>
            <atom:updated>2020-04-15T13:43:36.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XB9MZojsOBbTKNsCszAb-Q.png" /></figure><p>A key requirement for any distributed ledger system is the ability to guarantee consensus between ledger participants. Among other things, this means that every ledger participant must agree on whether a given transaction is valid or not, every time it is verified. We refer to this property as <em>determinism</em>.</p><p>To achieve this capability, Corda includes a DJVM — or <strong>D</strong>eterministic <strong>J</strong>ava <strong>V</strong>irtual <strong>M</strong>achine — a component for enforcing determinism in the evaluation of Corda smart contracts (two <a href="https://medium.com/corda/deterministic-contract-verification-97feb54c141e">blog</a> <a href="https://medium.com/@tlil/djvm-behind-the-scenes-2ba7f5cb9275">posts</a> provide more details on why such a component is necessary).</p><p>A partial preview of the DJVM was first delivered in <a href="https://docs.corda.net/docs/corda-os/4.4/release-notes.html#preview-of-the-deterministic-djvm">Corda 4</a>. This preview gave developers the ability to try out the DJVM’s bytecode rewriter. The DJVM uses this rewriter to automatically rewrite bytecode to catch calls to non-deterministic methods. Developers could run this tool against their smart contract code to see what bytecode transformations it performs.</p><p>Now, the release of Corda 4.4 marks a <a href="https://docs.corda.net/docs/corda-os/4.4/key-concepts-djvm.html#trying-out-the-djvm">major milestone</a> for the DJVM:</p><ul><li>Nodes can be configured to use the DJVM for every smart contract they evaluate, either via a configuration file or via the Corda DemoBench. Any nodes configured in this way will automatically detect and reject any non-deterministic transactions they receive</li><li>A new Gradle script plugin allows most non-determinism in smart contracts to be detected at compile time, before a node is even started</li></ul><p>The final step, which has been left for a future release, is to integrate the DJVM with Corda’s consensus rules. This will allow Corda networks to (gradually) enforce the use of the DJVM for all transactions on the ledger, eradicating non-deterministic transactions.</p><p>However, to bring the DJVM to a conclusion, we need your help. Every CorDapp implements smart contracts slightly differently. At one end, there are smart contracts that impose no restrictions at all. At the other are contracts amounting to full XML processing engines. The more complicated the smart contract, the more likely it is to break the DJVM’s rules on non-determinism.</p><p>Some of these rule-breakings will represent actual non-determinism — a smart contract making a network call — but others may not — perhaps a smart contract innocently attempting to use a method from a package that also contains a random number generator. Your input is essential to allow us to understand how real-world smart contracts are written, so that we can modify the DJVM to handle these edge-cases while maintaining the promise of complete determinism.</p><p>So if you’re a CorDapp developer, please <a href="https://github.com/corda/corda/tree/release/os/4.4">download Corda 4.4</a>, <a href="https://docs.corda.net/docs/corda-os/4.4/key-concepts-djvm.html#trying-out-the-djvm">enable the DJVM</a>, and give it a test run! We look forward to hearing how this affects your existing contracts at <a href="/service/mailto:productfeedback@r3.com">productfeedback@r3.com</a>.</p><p><strong>Let’s give it a whirl</strong></p><p>Next, let’s look at a simple demo of the DJVM in action. We’ll start by defining a hopelessly non-deterministic smart contract — in our case, a naïve attempt to prevent from evolving past December 31st 2020:</p><pre>public class DoofusContract implements Contract {<br>     public static final String <em>ID </em>= &quot;com.contracts.DoofusContract&quot;;<br> <br>     @Override<br>     public void verify(LedgerTransaction tx) {<br>         Instant currentTime = Instant.<em>now</em>();<br>         Instant startOf2021 = LocalDate<br>            .<em>parse</em>(&quot;2021-01-01&quot;)<br>            .atStartOfDay(ZoneId.<em>of</em>(&quot;Europe/London&quot;))<br>            .toInstant();<br> <br>         if (currentTime.isAfter(startOf2021)) {<br>             throw new IllegalArgumentException(&quot;Too late!&quot;);<br>         }<br>     }<br> <br>     public interface Commands extends CommandData {<br>         class Action implements Commands {}<br>     }<br> }</pre><p>This contract is problematic. Even apparently-valid transactions committed in 2020 will suddenly stop being valid if they’re re-verified in 2021, compromising the integrity of the entire ledger.</p><p>We configure our node to use the DJVM for all transaction verification by adding the following line to the node’s <em>node.conf</em> file:</p><p><em>systemProperties = { “net.corda.djvm” = true }</em></p><p>Now let’s build a transaction using this contract and watch the sparks fly!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XB9MZojsOBbTKNsCszAb-Q.png" /></figure><p>This is a simple example, but the DJVM prevents a wide range of non-determinism in smart contracts. You can read more about the full set of rules it implements <a href="https://docs.corda.net/docs/corda-os/4.4/key-concepts-djvm.html#non-determinism">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34f3b852e051" width="1" height="1" alt=""><hr><p><a href="https://medium.com/corda/the-djvm-in-action-34f3b852e051">The deterministic JVM in action</a> was originally published in <a href="https://medium.com/corda">Corda</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Corda in the Construction Industry]]></title>
            <link>https://medium.com/corda/corda-construction-takeaways-from-ucls-first-construction-blockchain-consortium-hackathon-80662c2b8785?source=rss-802cf3a92bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/80662c2b8785</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[corda]]></category>
            <dc:creator><![CDATA[Joel Dudley]]></dc:creator>
            <pubDate>Mon, 12 Nov 2018 16:14:17 GMT</pubDate>
            <atom:updated>2018-11-13T15:56:49.654Z</atom:updated>
            <content:encoded><![CDATA[<h4>Takeaways from UCL’s first Construction Blockchain Consortium hackathon</h4><blockquote>“The Construction industries are entering a period of major disruption caused by new technologies such as Blockchain” — Philip Treleaven, Professor of Computing &amp; Director of the Financial Computing Centre, University College London</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QAeslu7o7cS5HjS5527_NQ.jpeg" /></figure><p>In September, University College London’s <a href="https://www.constructionblockchain.org/">Construction Blockchain Consortium</a> (CBC) kicked off its first blockchain hackathon. This was the first in a series of events aimed at bringing together industry experts and software developers to create open-source applications and tools for solving problems in the construction sector (and if you don’t think there are problems in the construction sector — keep reading!).</p><p>For this first hackathon, the CBC decided that the teams would be building their solutions on the <a href="https://www.corda.net/">Corda</a> blockchain platform. Corda is already in use by construction firms (such as Siam Cement Group who used Corda to <a href="https://www.bangkokpost.com/tech/local-news/1538882/r3s-blockchain-technology-tightens-scg-procurement">streamline its procurement process by 50%</a>). It also has key privacy, identity and workflow properties that are a perfect fit for the industry, as we’ll see below. I joined in a mentoring capacity as a member of the Corda developer relations team (if you enjoy traveling and telling crowds of developers how blockchain is totally the next big thing, <a href="https://jobs.lever.co/r3.com/4d3031b4-23dd-46e4-a3ef-515b39699370">we’re hiring</a>).</p><p><em>For a more comprehensive write-up of the hackathon, see </em><a href="https://medium.com/industria-tech/the-construction-blockchain-consortium-hackathon-and-how-industria-helped-the-architecture-ccccdd5bfece"><em>this blog post</em></a><em> by a hackathon participant from our partner </em><a href="https://www.industria.tech/"><em>Industria</em></a><em>.</em></p><p>Unlike most hackathons, which begin with frantic re-readings of the use-case documents and copy-pasting from online code samples, things started leisurely. Abel Maciel, CBC founder and head, had arranged for a first day of talks from construction industry experts. Each took turns detailing the huge challenges facing the construction industry today. Contractors refusing to perform the tasks they’d been contracted for, developers refusing to pay contractors, inspectors failing to perform their duties correctly… But above all, an complete opaqueness about who was being paid to do what and when. In the construction industry, it is common practice for contractors to delegate work to sub-contractors, who then pass this work onto sub-sub-contractors, <em>ad infinitum</em>. Once all various arrangements have been made, tracking a project’s progress accurately was impossible for all but the simplest projects.</p><p>It was a perfect example of a situation where blockchain’s promise of <a href="https://gendal.me/2017/12/04/not-all-business-blockchain-platforms-are-alike-to-succeed-they-need-to-reimagine-business-computing/">You See What I See</a> would save everyone a lot of pain and money. Each firm would be kept completely up-to-date on the progress of the project. But crucially, details such as the sub-contracting arrangements in place couldn’t just be shared with <strong>everyone</strong>. These deals were key strategic information for the contractors delegating the work. This is where Corda’s ability to finely-tune how data is distributed through the network is vital for making blockchain solutions that are palatable for existing industry actors.</p><p>We settled on the creation of a CorDapp to automate construction workflows between developers and contractors. Our design was as follows:</p><ul><li>A developer and a contractor agree on a job. This is represented in Corda as a shared data object called a <em>state</em>. This state ensures that all involved parties have a consistent view of the progress of the job over time</li><li>The state is governed by a <em>contract</em>. This contract enforces that all the participants to the job obey a shared set of rules governing how it evolves over time</li><li>The job is evolved using <em>flows</em> — a flow to propose a new job, a flow to accept a new job, a flow to mark the job as finished… These flows conceal internals such as signing, messaging and database storage from the end-user when using the application</li></ul><p>In the end, we had our initial CorDapp design up-and-running with a few hours to spare. Instead of kicking back at the UCL student café, we decided to go one step further and update the CorDapp so that jobs could be split up into a series of milestones. This allowed contractors to be paid per-milestone instead of per-job. This was another common issue in the construction industry, where cashflows can easily run dry over the course of year-long projects.</p><p>What features of Corda allowed us to build a suitable solution? I’d list four key areas:</p><ul><li>Corda’s state and contract structures allowed us to define shared data structures and shared rules about how these data structures could evolve over time. This prevented disagreements or mistakes between the various project participants</li><li>Corda allowed all the project participants to hold a shared, consistent view of the project’s progress</li><li>Corda’s need-to-know data distribution prevented external parties from discovering details of the project, despite being present on the same network</li><li>Each Corda node has a well-known identity. Developers and contractors are sure which counterparties they are agreeing jobs with and transferring funds to</li></ul><p>As well as the benefits of a blockchain approach, the hackathon highlighted the need for deep industry expertise when creating production blockchain applications. Although we had built a working proof-of-concept, there would be much more to consider in a production solution (I’ve probably mis-articulated the industry’s <em>problems</em> above, let alone how to fix them). In R3’s view, this can be addressed by building an ecosystem of partners who have the required industry expertise to build production blockchain solutions. Check out existing partner solutions <a href="https://marketplace.r3.com/dashboard">here</a> and apply to become a partner <a href="https://marketplace.r3.com/directory/join-network">here</a>.</p><p>It was definitely more than my team could handle in a couple of days, and we were left with a <a href="https://github.com/ConstructionBlockchain/CBC-Hackathon-1#todos">large pile of ToDos</a>. The source code is <a href="https://github.com/ConstructionBlockchain/CBC-Hackathon-1">here</a>, so fork it and see how you get on — there’s probably a little more work required before this CorDapp can replace construction industry tools for real.</p><p>P.S. The CBC is now running a follow-up weeknight hackathon with Martin Jee’s <a href="https://www.meetup.com/Corda-Code-Club/">Corda Code Club</a> to address problems in the construction project financing space. You can track their progress <a href="https://twitter.com/hashtag/CordaCodeClub">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80662c2b8785" width="1" height="1" alt=""><hr><p><a href="https://medium.com/corda/corda-construction-takeaways-from-ucls-first-construction-blockchain-consortium-hackathon-80662c2b8785">Corda in the Construction Industry</a> was originally published in <a href="https://medium.com/corda">Corda</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Re-Designing the Network Map]]></title>
            <link>https://medium.com/corda/re-designing-the-network-map-760f62ae8c62?source=rss-802cf3a92bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/760f62ae8c62</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[corda]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Joel Dudley]]></dc:creator>
            <pubDate>Thu, 15 Mar 2018 17:19:18 GMT</pubDate>
            <atom:updated>2018-03-15T17:19:18.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RstskWwU3ohwo2sEuaf5bQ.jpeg" /></figure><p>Traditional blockchain architectures distribute transactions using a <em>gossip protocol</em>. Each node maintains connections to a handful of peers. When a node creates a transaction, it tells its peers, who tell their peers, and so on, until the transaction has reached every node on the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_kdhf-Z1yXgotcbqcguBg.gif" /><figcaption>A network using a gossip protocol</figcaption></figure><p>This model provides no privacy. Every node sees every other node’s transactions. To allow private communication between nodes, Corda replaces the gossip protocol with direct messaging between nodes based on IP addresses. The messages are encrypted using transport-layer security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDniORSRR_ueWkOS4i96Dw.gif" /><figcaption>A Corda network</figcaption></figure><p>When messaging a peer, how can a node operator determine the counterparty’s IP address? This is achieved using a mapping of legal identities to IP addresses called the <em>network map</em>. The network map has several advantages:</p><ul><li><strong>Ease-of-use.</strong> Node operators can transact in terms of legal identity names, rather than public keys or IP addresses (parties can still optionally be identified by public key <em>only</em> in transactions stored on ledger, for privacy purposes)</li><li><strong>Business requirements.</strong> Node operators can ensure they’re agreeing ledger updates with the correct counterparties</li><li><strong>Joining and leaving the network.</strong> The event of a node joining or leaving the network can be clearly communicated by updating the network map</li></ul><h3>Re-designing the network map</h3><p>In Corda 1.x and Corda 2.x, the network map service was provided by a <em>network map node</em>. Each node would query the network map node for a copy of the network map upon joining the network, and subscribe for future updates.</p><p>This design was only temporary. It had several downsides:</p><ul><li><strong>It doesn’t scale.</strong> A single node is expected to simultaneously maintain open connections to every other node on the network</li><li><strong>It’s unreliable.</strong> If the network map node goes offline, no new nodes can start up</li><li><strong>It’s not secure.</strong> An attacker perform <em>man-in-the-middle</em> attacks by intercepting the traffic from the network map node and modifying its contents</li></ul><p>In Corda 3, the network map node has been replaced with a <em>network map document served over HTTP</em>. At start-up, each node creates and signs a data structure called a <em>nodeInfo</em>. Each nodeInfo contains a node’s legal identities, IP addresses and other information.</p><p>The node uploads this file to the compatibility zone’s network map server (a <em>compatibility zone</em> is a set of nodes and services — notaries, oracles, doorman, network map server — that are configured within a larger Corda network to be compatible with each other). The node then downloads and caches the signed nodeInfos of all the other nodes in the compatibility zone from the same server, which it periodically polls for updates.</p><p>Why the switch to this new design?</p><ul><li><strong>It’s highly available.</strong> The distribution of the nodeInfos can be offloaded to CDNs like Amazon CloudFront or Akamai, which are highly scalable, available and attack-resistant</li><li><strong>It’s tamper-proof.</strong> Man-in-the-middle attackers cannot tamper with the nodeInfos, since they are signed by the nodes themselves</li></ul><h3>Using the new network map</h3><h4>Development networks</h4><p>For rapid prototyping, development networks do not require a network map document to be served over HTTP. Instead, each node’s nodeInfo file is simply placed in an <em>additional-node-infos</em> folder on every other node.</p><p>To automate this process, a <em>bootstrapper</em> tool is provided. The bootstrapper automatically converts a set of node configuration files into a set of nodes, and copies each node’s nodeInfo file into every other node’s <em>additional-node-infos</em> folder. This replicates the new design without the requirement for a separate server.</p><p>The bootstrapper is run automatically when generating a development network using the <a href="https://docs.corda.net/generating-a-node.html#the-cordform-task">Cordform Gradle task</a>. You can also perform the bootstrapping manually by following the instructions <a href="https://docs.corda.net/setting-up-a-corda-network.html#bootstrapping-the-network">here</a>. You must re-run the bootstrapper every time a node leaves or joins the network to ensure the nodeInfo files remain up-to-date.</p><h4>Production networks</h4><p>Production networks must create a network map server that implements the protocol described <a href="https://docs.corda.net/network-map.html#http-network-map-protocol">here</a>. Each network operator will implement this protocol differently based on their network’s on-boarding process.</p><h3>Find out more</h3><p>To find out more, read the <a href="https://docs.corda.net/network-map.html">network map documentation</a> and the <a href="https://docs.corda.net/setting-up-a-corda-network.html#bootstrapping-the-network">bootstrapper documentation</a>, or join the Corda community and dev team on the <a href="http://slack.corda.net/">#cordaledger Slack channel</a>.</p><p>If you encounter any issues with the new network map or other Corda features, post a question <a href="https://stackoverflow.com/questions/tagged/corda">on Stack Overflow using the `corda` tag</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=760f62ae8c62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/corda/re-designing-the-network-map-760f62ae8c62">Re-Designing the Network Map</a> was originally published in <a href="https://medium.com/corda">Corda</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>