<?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 Surya Rastogi on Medium]]></title>
        <description><![CDATA[Stories by Surya Rastogi on Medium]]></description>
        <link>https://medium.com/@theimperialduke?source=rss-64f640684b93------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ui2FdYls8lai0L0xWTDpkg.jpeg</url>
            <title>Stories by Surya Rastogi on Medium</title>
            <link>https://medium.com/@theimperialduke?source=rss-64f640684b93------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 14:33:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@theimperialduke/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[Ethereum Traces, not Transactions]]></title>
            <link>https://medium.com/@theimperialduke/ethereum-traces-not-transactions-3f0533d26aa?source=rss-64f640684b93------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f0533d26aa</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Surya Rastogi]]></dc:creator>
            <pubDate>Mon, 26 Mar 2018 16:22:37 GMT</pubDate>
            <atom:updated>2018-03-26T18:41:26.362Z</atom:updated>
            <content:encoded><![CDATA[<p>The Bitcoin and Ethereum blockchains have been called “the world ledger” and “the world computer”, and this extends to their transactions as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AMBh-PXVr4lqaGRGfn2Xmg.png" /><figcaption>A ledger and a punch card computer</figcaption></figure><h4>Bitcoin Transactions vs Ethereum Transactions</h4><p>In Bitcoin, a transaction can be thought of as a row in a double-entry ledger. It is an atomic step that brings the blockchain to a new state. Calculating a balance for an address at any state is trivial with the ledger, you can just apply all the transactions (rows) involving an address. This, however, does not work in Ethereum.</p><p>In Ethereum, a transaction can be thought of as a punch card for a <em>machine</em>. The <em>machine</em> takes a transaction as an input. The transaction is then executed, changing the <em>machine </em>state, which potentially could trigger more executions that may continue to change the <em>machine</em> state. In order to calculate a balance, a <em>machine</em> is needed to apply all the preceding punch cards. Calculating a balance in this case is tricky, because the changes in <em>machine</em> state, including updates to a balance, are obfuscated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PknrK2tMdcMz8fz2SQh9BQ.png" /></figure><h3>Ethereum Virtual Machine Traces</h3><p>The <em>machine</em> mentioned above refers to the Ethereum Virtual Machine. Transactions can trigger smaller atomic actions that modify the internal state of the EVM. Information about the execution of these actions is logged and can be found stored as an EVM execution trace, or just a <em>trace</em>.</p><p>Some block explorers try to represent this abstraction with the concept of “internal transactions<em>”</em> however I feel that this is inaccurate and slightly confusing. You will not be able to accurately recalculate balances using only transactions and “internal transactions”<em>. </em>I believe that the human readable abstraction of <em>traces</em> provided by the Parity node implementation is a better representation.</p><p>By using the three main trace types (call, create, suicide), we can generalise the type of ether transfers that can occur:</p><ul><li><strong>call</strong>: Used to <strong>transfer</strong> ether from one account to another and/or to call a smart contract function defined by parameters in the data field. This trace also encompasses <strong>delegatecall</strong> and <strong>callcode</strong>.</li><li><strong>create</strong>: Used to create a smart contract, and ether is <strong>transferred</strong> to the newly created smart contract</li><li><strong>suicide</strong>: Used by an owner of a smart contract to kill the smart contract. Triggers a <strong>transfer</strong> of ether for a refund for killing a contract. Additionally, killing a smart contract can free memory in the blockchain, which can also affects the value transferred.</li></ul><h3><strong>Final Thoughts</strong></h3><p>I therefore believe that block explorers and other Ethereum analysers should adopt the convention of the <em>trace</em> data type instead of “internal transactions”.</p><p><strong>Stay tuned for our follow up, on more nuances of balances and transfers.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f0533d26aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualizing Bitcoin Transactions]]></title>
            <link>https://medium.com/@theimperialduke/visualizing-bitcoin-transactions-dd0e67d8e104?source=rss-64f640684b93------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd0e67d8e104</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Surya Rastogi]]></dc:creator>
            <pubDate>Fri, 16 Mar 2018 14:36:35 GMT</pubDate>
            <atom:updated>2018-03-21T13:05:49.608Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*74Nuhyhyb1SdGt0Mquc4SA.png" /><figcaption>FBI seizure of bitcoin from the Silk Road (orange elements), and subsequent sale (blue elements)</figcaption></figure><p>To complete my <em>BEng in Computing</em> degree at Imperial, I chose to complete a thesis conducting a visual analysis of the Bitcoin blockchain. My thesis extended upon the work done by Imperial’s <a href="https://www.imperial.ac.uk/data-science/">Data Science Institute</a> (DSI) and <a href="https://www.imperial.ac.uk/cryptocurrency">Centre for Cryptocurrency Research and Engineering</a> (IC3RE) in their paper <a href="https://www.liebertpub.com/doi/10.1089/big.2015.0056">here</a>.</p><p><strong>Note: These visualizations are from 2016, and the network has changed considerably since then.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vgXylkkUQnneuR5OHEl7xA.jpeg" /><figcaption>The goal of the project was to create Bitcoin related visualizations for the DSI’s Global Data Observatory (GDO)</figcaption></figure><h3>Elements in the Network Graph</h3><p>These visualizations focus on Bitcoin transactions, which have <em>n</em> inputs, represented in orange, and <em>n</em> outputs, represented in blue. The size of the node is relative to the amount in the input/output.</p><p>The transaction itself is represented as a green or red node. The node is green if the <a href="https://en.bitcoin.it/wiki/Confirmation#Confirmation_Times">confirmation time</a> is less than 20 mins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vCftfZJPmF641AyR6glKKA.png" /><figcaption>Common Bitcoin transaction forms: Sending bitcoin and change back to oneself, Aggregating bitcoin, Disaggregating bitcoin</figcaption></figure><p>In these graphs, address reuse is highlighted by grey edges from inputs/outputs to inputs/outputs. Below I have highlighted the address reuse edges in red, showing some of my first transactions using bitcoin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qP61jAiUh-e4OCGj_lRkBQ.png" /></figure><p>In the three leftmost transactions I am receiving bitcoin from <em>Circle </em>to my address, and in the rightmost I am spending bitcoin from my address on <em>Steam</em> via <em>BitPay.</em></p><p>General address reuse will appear as grey edges in the network graphs.</p><h3>Visualizing Blocks</h3><p>Using these visualization techniques, I visualized blocks from the Bitcoin blockchain. Below are visualizations of the blockchain under light load conditions, and heavier use conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5JEhy0Xl6g8wMrHyhC8OiQ.png" /><figcaption>Under light usage many transactions are included in blocks within 20 mins of propagation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MY6Xq5HMBhlc2a9pPyDo4g.png" /><figcaption>Under heavy usage some transactions are not included in blocks within 20 mins of propagation</figcaption></figure><h3>Visualizing Programmed Addresses</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0n5OQxVzTPvVBwgWLwB95w.png" /><figcaption>2000 SatoshiDICE Transactions</figcaption></figure><p><a href="https://satoshidice.com/">SatoshiDICE</a> and <a href="https://luckyb.it/">LuckyBit</a> are two provably fair betting games that managed their addresses in different ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5GTWaujENcaAL1g4McfnYQ.png" /><figcaption>2000 LuckyBit Transactions</figcaption></figure><p>SatoshiDICE paid out directly from the same wallet that received funds, while LuckyBit transferred the funds to another address.</p><h3>FBI Seizure of the Silk Road</h3><p>The <a href="https://blockchain.info/address/1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX">FBI</a> seized around 144,000 bitcoin from <a href="https://en.wikipedia.org/wiki/Silk_Road_(marketplace)">Silk Road</a> <a href="https://en.bitcoin.it/wiki/Hot_wallet">hot wallets</a>. The seizure occurred around block #261269. After applying this visualization to those blocks, I found two connect subgraphs. One I believe is a tumbler, and the other is the FBI seizing assets from the Silk Road hot wallets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e3IOQ2tzHJrB3dhdpdUdoA.png" /></figure><p>By focusing on this area and expanding the network graph, the two subgraphs become connected meaning that someone was at the time tumbling bitcoin and directly depositing it in a wallet that would soon be seized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GnP1lL-8Fi_XSXMezF5CGg.png" /><figcaption>Expanded Transaction Network Graph</figcaption></figure><h3>Final Thoughts</h3><p>These visualizations allow thousands of transactions to be analyzed at a glance. They can provide insights into how services on the Bitcoin blockchain manage and use their Bitcoin addresses.</p><h3>More visualizations to come…</h3><p>These visualizations were generated using <a href="https://gephi.org/">Gephi</a>’s <a href="https://github.com/gephi/gephi/wiki/Force-Atlas-2">ForceAtlas2</a> algorithm, and my plugin based on FA2 called <em>MultiGravity ForceAtlas2</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5I-kH0qAGyGn12TemD5BQ.gif" /><figcaption>MultiGravity ForceAtlas2 on a set of Bitcoin blocks</figcaption></figure><p>Receive weekly updates on the crypto economy by subscribing our newsletter, the <a href="https://chainalysis.activehosted.com/f/28">Weekly Brief.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd0e67d8e104" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>