<?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 Umesh Prabushitha Jayasinghe on Medium]]></title>
        <description><![CDATA[Stories by Umesh Prabushitha Jayasinghe on Medium]]></description>
        <link>https://medium.com/@prabushitha?source=rss-9d1d95499d71------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xLdb2dWDGCfuYE1IaUf31w.jpeg</url>
            <title>Stories by Umesh Prabushitha Jayasinghe on Medium</title>
            <link>https://medium.com/@prabushitha?source=rss-9d1d95499d71------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 16:56:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prabushitha/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[GSoC 2018 Stories 06 : Producer-Consumer Architecture of EtherBuilder]]></title>
            <link>https://medium.com/@prabushitha/gsoc-2018-stories-06-producer-consumer-architecture-of-etherbuilder-804044d60e64?source=rss-9d1d95499d71------2</link>
            <guid isPermaLink="false">https://medium.com/p/804044d60e64</guid>
            <category><![CDATA[etherbeat]]></category>
            <category><![CDATA[etherbuilder]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[gsoc-2018]]></category>
            <dc:creator><![CDATA[Umesh Prabushitha Jayasinghe]]></dc:creator>
            <pubDate>Sat, 04 Aug 2018 12:37:33 GMT</pubDate>
            <atom:updated>2018-08-04T12:39:14.212Z</atom:updated>
            <content:encoded><![CDATA[<p>In my <a href="https://medium.com/@umeshprabushithajayasinghe/gsoc-2018-stories-04-analyzable-blockchain-structure-7342c05435cc">4th GSoC 2018 with ScoreLab article</a>, I’ve mentioned about building an analyzable blockchain structure with the help of sqlite3 (RDBMS) and rocksdb (Key-value). The tool <a href="https://github.com/prabushitha/EtherBeat/tree/parser/tools/EtherBuilder">EtherBuilder</a> is implemented in order to achieve this goal. What EtherBuilder does is, it retrieve blocks one by one through <a href="https://github.com/prabushitha/EtherBeat/tree/parser/tools/EtherExtractor">EtherExtractor</a> and stores that information in sqlite3. All the blocks, transactions, transaction receipts are indexed and the indexes corresponding to the hashes are saved in rocksdb database.</p><p>It means that it has to iterate all ethereum mainnet blocks (6,086,692 blocks - 04/08/2018) which may need some performance boost in accessing and storing. To cater this, producer-consumer architecture has been used in the tool EtherBuilder. Currently it uses 1 master and 1 worker. What master does is extract blocks, create block information storing sqlite3 transaction. Worker is responsible to store block’s transaction related information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/0*Dv2VNUyzHsdb6v_-.png" /><figcaption>Producer-Consumer problem. Credit : <a href="https://howtodoinjava.com/core-java/multi-threading/producer-consumer-problem-using-blockingqueue/">howtodoinjava.com</a></figcaption></figure><p>This keeps a single buffer (queue) which can store 1000 transactions. Once master extract a block, it places all the block’s transactions in the buffer where the worker thread (consumer) process the transactions in the buffer. If the buffer is full, master waits till the consumer takes out any transaction (a rare case, since the size of buffer is large and not every block contains transactions). Consumer signals everytime when a transaction has been taken out to process. Similarly when the buffer is empty, consumer waits while master signals when transactions are ready in the buffer. Also it keeps a mutex lock to avoid consumer from using the buffer at the time master is writing to the buffer and avoid master to use the buffer at the time consumer is taking out a transaction. Implementation of this architecture has been done using <strong>pthreads</strong>.</p><p>A design challenge was tracking indexes of transactions and blocks. Since block’s index is same as the block number much complexity has been burnt. Still if we’re using multiple consumers it need to have a lock on the transaction indexing. Currently ‘1 producer — 1 consumer’ has been used in EtherBuilder.</p><p>Click here for the <a href="https://medium.com/@umeshprabushithajayasinghe/gsoc-2018-stories-05-sqlite-multiple-insertions-batch-insertions-eeaa13d9522b">Previous Article</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=804044d60e64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2018 Stories 05: SQLite multiple insertions (batch insertions)]]></title>
            <link>https://medium.com/@prabushitha/gsoc-2018-stories-05-sqlite-multiple-insertions-batch-insertions-eeaa13d9522b?source=rss-9d1d95499d71------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeaa13d9522b</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[sqlite]]></category>
            <category><![CDATA[cpp]]></category>
            <dc:creator><![CDATA[Umesh Prabushitha Jayasinghe]]></dc:creator>
            <pubDate>Sun, 01 Jul 2018 07:46:57 GMT</pubDate>
            <atom:updated>2018-07-01T07:46:57.930Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*KoZ8UHIbWI9-Y7qu.png" /><figcaption>Image Courtesy : <a href="https://pixabay.com/en/sqlite-database-logo-sql-feather-183454/">pixabay</a></figcaption></figure><p>In my gsoc story series with Score Lab organization, I’m writing a bit different article today. This would be a very short article comparing 2 scenarios of insertions. In order to store data in sqlite I had to find a way to execute insertion queries. In my head there are 2 ways.</p><p><strong>Scenario 1</strong> : Creating a string with large set of insert statements and execute the query once.</p><p><strong>Scenario 2</strong> : Use transactions.</p><p>At first I thought 1st option would give more performance, but I was completely wrong when I implemented and run sample program.</p><p>Following is an abstraction of the code which I ran to test the 1st scenario. When I use 100000 as <em>numberOfInsertions,</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*Jd1lC7GTr2-5qXn2h_nhhw.png" /><figcaption>Scenario 1 : Plane insertions with single string</figcaption></figure><p>above code segment gave a execution time of <strong>148.909</strong> <strong>seconds</strong>.</p><p>Below code is to test the insertions using transactions. For 100000 as <em>numberOfInsertions,</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*KA71jA6wBDyDNVOoOh05aA.png" /><figcaption>Scenario 2 : Using transactions</figcaption></figure><p>above code segment gave a execution time of <strong>0.415 seconds</strong>!</p><p>Using transactions is the option!</p><p>Look at the performance gain. My initial thoughts were an utter failure. Seems like I have missed my database lectures! I would post a separate article on how transactions work if time permits.</p><p>Hope above comparison would help someone.</p><p><strong><em>Hint : Use sqlite3 transactions with prepared statements (sqlite3_prepare) which will boost the performance even higher.</em></strong></p><p>Click here for the <a href="https://medium.com/@umeshprabushithajayasinghe/gsoc-2018-stories-04-analyzable-blockchain-structure-7342c05435cc">Previous article</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeaa13d9522b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2018 Stories 04: Analyzable blockchain structure]]></title>
            <link>https://medium.com/@prabushitha/gsoc-2018-stories-04-analyzable-blockchain-structure-7342c05435cc?source=rss-9d1d95499d71------2</link>
            <guid isPermaLink="false">https://medium.com/p/7342c05435cc</guid>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <dc:creator><![CDATA[Umesh Prabushitha Jayasinghe]]></dc:creator>
            <pubDate>Wed, 27 Jun 2018 12:32:06 GMT</pubDate>
            <atom:updated>2018-06-27T18:32:37.226Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o3xWlb-yAN9CpmWM.jpg" /><figcaption>Image Courtesy : <a href="https://www.behance.net/gallery/43970483/NET-Magazine-Cover-illustration-Num284">Behance</a></figcaption></figure><p><strong>Recap</strong></p><p>As a part of GSoC 2018, I’m working with <a href="http://www.scorelab.org/">Score Lab organization</a> on optimizing the extraction of blockchain and implementing a parser for <a href="https://github.com/scorelab/EtherBeat">EtherBeat project</a>. Now we don’t need to use RPC or IPC endpoints to extract the important blockchain information of ethereum. We have developed a ethereum blockchain <strong>extractor</strong> API to get blockchain information from leveldb files of the ethereum blockchain. C++ implementation of the extractor can be found <a href="https://github.com/prabushitha/EtherBeat/tree/parser">here</a>. If you’ve any doubts you can read my previous articles where I’ve posted key challenges which I had to face when implementing the extractor.</p><p><strong>What’s new!</strong></p><p>Next task is to implement a <strong>builder </strong>which uses the extractor API (which we have already implemented) to transform the blockchain into an analyzable structure. For that we use <strong>sqlite</strong> and <strong>rocksdb</strong>. In here we iterate through all blocks one-by-one to take block information and all the transactions (yes, again iterate through block’s transactions). Then each block information is stored in a sqlite <em>block table</em> while transactions are stored in sqlite <em>transaction table</em>. Each transaction is stored under an id starting from 1. Therefore <strong>transaction hash -&gt; id </strong>mapping should be done. Id corresponding to a transaction hash is stored in Rocksdb. A prefix <strong>tx_</strong> has been added before the hash avoid the mixup between transaction hashes and other hashes. Otherwise we’ll have to use several rocksdb databases for each mapping which I don’t think necessary. Similarly block hashes are mapped with block numbers. Transactions related to a block are kept in another table having transaction id and block id. In addition <strong>block hash -&gt; id</strong> mapping with key prefix <strong>block_</strong> has been used to get the block number from blockhash.</p><p>Main reason for assigning a numerical unique id starting from 1 is to support fast querying. Sqlite uses binary search to find the index. (since blockchain doesn’t change no intermediate record will be removed. Should check whether if there’s a possibility on making this a direct search with O(1) performance)</p><p>Transaction receipts are also stored in transaction receipt table. We don’t need to map transaction receipts with transactions as receipt and transaction is having 1–1 relationship. We keep transaction receipt id identical to the transaction id.</p><p>Similarly, each account (external address and contract address) will be assign a unique id value as well. Account addresses are discovered from transactions (from and to values). That means from a single normal transaction we can find 2 accounts. Here we have to be careful because same account address can appear in different transactions, but it shouldn’t give a new id. It must use the existing id related to that address. Once the ids are assigned to the addresses in a transaction, we store sender, receiver, amount and transaction id in a separate sqlite table called fromto table. Finally we will have to index this table on sender id to run queries fast. <br>Rocksdb mapping of <strong>address hash -&gt; address id</strong> also performed. Prefix used for the key is <strong>address_</strong>.</p><p>Implementation of the builder which has been explained above can be found <a href="https://github.com/prabushitha/EtherBeat/tree/builder">here</a> which is again written in C++.</p><p>Next step would be to check the performance and optimizing the process.</p><p>Click here for the <a href="https://medium.com/@umeshprabushithajayasinghe/gsoc-2018-stories-03-recover-sender-from-ethereum-transaction-41b38d97c56f">Previous article</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7342c05435cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2018 Stories 03: Recover sender from ethereum transaction]]></title>
            <link>https://medium.com/@prabushitha/gsoc-2018-stories-03-recover-sender-from-ethereum-transaction-41b38d97c56f?source=rss-9d1d95499d71------2</link>
            <guid isPermaLink="false">https://medium.com/p/41b38d97c56f</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <dc:creator><![CDATA[Umesh Prabushitha Jayasinghe]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 20:15:53 GMT</pubDate>
            <atom:updated>2018-06-15T07:27:19.027Z</atom:updated>
            <content:encoded><![CDATA[<p>As I explained in the last article, ethereum blockchain doesn’t store the sender address of an transaction. But you can use signature related values to recover the sender public key and then the address.</p><h4>Generating Sender Ethereum Address from a Transaction</h4><p>Here’s how we can get the sender public key, then the sender address out from a transaction.</p><ol><li>Take v, r and s by rlp decoding the transaction</li><li>Get the transaction hash</li><li>Use ECDSA with secp256k1’s curve to recover the public key from tx hash and v, r, s values</li><li>Take the Keccak-256 hash of the public key</li><li>Take the last 40 characters / 20 bytes of this public key (Keccak-256). Or, in other words, drop the first 24 characters / 12 bytes. These 40 characters / 20 bytes are the address. When prefixed with 0x it becomes 42 characters long.</li></ol><p>Now let’s see how we can implement this using a psuedo code. Inorder to understand the lines, I’ve explained brief in comments.</p><pre>recoverTxSender() {<br>  chainId = v[0]; // 1st byte of v<br>  if (chainId &gt; 0) {<br>    chainId = (v[0]-35)/2;<br>  }</pre><pre>  // RLP encode selected transaction attributes<br>  encoded_tx;<br>  if (chainId &gt; 0) {<br>    encoded_tx = RLP::encode(nonce, gasPrice, gasLimit, to, value,     init, v, s, r);<br>  } else {<br>    encoded_tx = RLP::encode(nonce, gasPrice, gasLimit, to, value, init);<br>  }</pre><pre>  // get the keccak256 hash of the encoded transaction<br>  txKeccak = keccak_256(encoded_tx);<br>  <br>  // calculate the new v value<br>  new_v = v[0];<br>  if (chainId &gt; 0) {<br>     new_v -= (chainId * 2 + 8);<br>  }</pre><pre>  // recover the public key from keccak256 hash and signature values<br>  public_key = recover(new_v, r_bytes, s_bytes, txKeccak);<br>  if (public_key.empty()) {<br>    return {};<br>  }<br>  <br>  // extract address from public key <br>  address = public_key[12:40];<br>  return &#39;0x&#39;+address;<br>}</pre><p>Here’s the underlying mechanism of recovery function</p><pre><br>recover( v_new, r, s, txKeccak)<br>{<br> //correct r and s with 32 in size (leading 0s if size mismatch)<br> if (r.size() &lt; 32) {<br>    r = left_pad_with_0s(r, 32-r.size()); <br> }<br> if (s.size() &lt; 32) {<br>    r = left_pad_with_0s(r, 32-s.size()); <br> }<br> </pre><pre> // reserve 65 byte memory for the signature<br> signature;<br> signature.reserve( 65 ); <br> <br> signature[0:32] = r; // 32 bytes<br> signature[32:64] = s; // 32 bytes<br> signature[64] = v_new; // 1 byte</pre><pre>int v = v_new-27;<br>if (v &gt; 3 || v &lt; 0){<br> // invalid<br> return {};<br> }</pre><pre> // get recoverable signature<br> rawSig = secp256k1_ecdsa_recoverable_signature_parse_compact(signature, v);<br> if(!rawSig) return error;</pre><pre> // recover raw public key<br> rawPubkey = secp256k1_ecdsa_recover(rawSig, _message);<br> if(!rawPubkey) return error;</pre><pre> // encode the raw public key <br> hashPubkey = secp256k1_ec_pubkey_serialize( rawPubkey, SECP256K1_EC_UNCOMPRESSED);</pre><pre> // Create the Public key skipping the header.<br> return hashPubkey[1:];<br>}</pre><p>You can find the C++ implementation for this in my GSoC 2018<a href="https://github.com/prabushitha/EtherBeat/tree/master/tools/parser"> project repository</a></p><p>During the 1st evaluation period, I could able to develop the basic blockchain <strong><em>parser</em></strong> from leveldb files of geth synced blockchain and write unit tests alongwith. I’ve planned to develop the <strong><em>builder </em></strong>which structure and store data to facilitate ethereum analysis.</p><p>Click here for the <a href="https://medium.com/@umeshprabushithajayasinghe/gsoc-2018-stories-parse-ethereum-raw-blocks-34bf13116552">Previous Article</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41b38d97c56f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2018 Stories 02: Parse Ethereum Raw Blocks]]></title>
            <link>https://medium.com/@prabushitha/gsoc-2018-stories-parse-ethereum-raw-blocks-34bf13116552?source=rss-9d1d95499d71------2</link>
            <guid isPermaLink="false">https://medium.com/p/34bf13116552</guid>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[gsoc-2018]]></category>
            <category><![CDATA[etherbeat]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Umesh Prabushitha Jayasinghe]]></dc:creator>
            <pubDate>Sun, 27 May 2018 08:52:32 GMT</pubDate>
            <atom:updated>2018-05-29T08:53:40.191Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Related image" src="https://cdn-images-1.medium.com/proxy/1*VGMSZ0ISMEsSutCIexIIdQ.jpeg" /><figcaption>Image Courtesy : <a href="https://medium.com/u/6876705ffef2">Jamie Skella</a>’s <a href="https://medium.com/horizonstate/how-to-buy-and-store-ethereum-9d4b3fe67d67">post</a></figcaption></figure><p>I’m here with my 2nd article on GSoC 2018 experience. It’s almost the end of 2nd week after the coding period officially started. There were pretty interesting things happened during this period and lots of learning too. As discussed with the <strong>SCoRe organization</strong> mentors, the first phase of the Etherbeat project is to <strong>develop a C++ parser</strong> which extracts data from ethereum <strong>leveldb blockchain storage</strong>.</p><p>There are limited resources and articles on ethereum leveldb storage, as most resources are using RPC endpoint to extract data. Mostly, I had to go through the Go-Ethereum code (written in GO, which is the official and most popular ethereum client) in order to understand the underlying mechanism. I got my concerns clarified through ethereum-go forum. It took me several days of the week to understand and generate keys, work with bytes , RLP encoding and decoding.</p><p>Ok, now let’s start from the begining. We’re not going to use RPC or IPC endpoints to work with the blockchain, instead directly interacting with blockchain files. Ethereum blockchain is saved in a leveldb database. Once connected with leveldb, you can iterate through the keys and values to see how the data really stored. I didn’t get any clue on what this data means, I initially thought they are some dummy values.</p><p>Actually, keys are present in a specific format.</p><blockquote><strong>Block Hash Key (10 bytes) =&gt;</strong><br>byte(‘h’) + 8 byte big endian notation block number + byte(‘n’)</blockquote><blockquote><strong>Block Header Key (41 bytes) =&gt; </strong><br>byte(‘h’) + 8 byte big endian notation block number + 32 byte block hash</blockquote><blockquote><strong>Block Body Key (41 bytes) =&gt; </strong><br>byte(‘b’) + 8 byte big endian notation block number + 32 byte block hash</blockquote><p>Example Byte string of the block hash key for block number 28 would be,<em><br></em><strong><em>Block Hash Key = “h\000\000\000\000\000\000\000\034n”<br></em></strong><em>If we convert the above hash key to it’s hex representation it would look like this.<br></em><strong>Hex(Block Hash Key) = 68000000000000001c6e</strong> <em>WHERE 68 = hex for ‘h’, 000000000000001c = big endian 8 byte hex for 28, 6e = hex for ‘n’</em></p><p>Byte string should be passed as the key for leveldb.</p><p>So in leveldb, there’s specific values correspond to the each key.</p><p>By using the <em>Block Hash Key, </em>we can get the <em>block hash</em>. <br>By using the <em>Block Header Key,</em> we can get the <em>RLP encoded header of the block</em>.<br>By using the <em>Block Body Key,</em> we can get the<em> RLP encoded body</em> (transactions and ommers) of the block.</p><p>Psuedocode to extract data,</p><pre>block_number = 28</pre><pre>hash_key = create_hash_key(block_number)<br>block_hash = leveldb_get(hash_key)</pre><pre>header_key = create_header_key(block_number, block_hash)<br>rlp_header = leveldb_get(header_key) </pre><pre>body_key = create_body_key(block_number, block_hash)<br>rlp_body = leveldb_get(body_key)</pre><p>Once we obtain RLP encoded header and RLP encoded body, we need to decode them to find the positions of meaningful data. Yes, RLP decoding gives you the offset and length of each and every meaningful data, so you’ve to slice the raw byte array accordingly.</p><p>In RLP decoded block header you’ll find 15 elements <em>(parentHash, sha3Uncles, beneficiary, stateRoot, transactionsRoot, receiptsRoot, logsBloom, difficulty, number, gasLimit, gasUsed, timestamp, extraData, mixHash, nonce)</em>. In RLP decoded block body first two elements would be the list of transactions and list of ommers.<br>In a single transaction it has 9 elements <em>(nonce, gasPrice, gasLimit, to, value, init | data, v, r, s)</em> but you won’t find the sender’s address there. Instead you’ll find signature related values (v,r,s) which you can used to generate the address.</p><h4>Generating Sender Ethereum Address from a Transaction</h4><p>Here’s how we can get the sender public key, then the sender address out from a transaction. (<a href="https://ethereum.stackexchange.com/a/3619/38574">Thanks to this Ref</a>)</p><ol><li>Take v, r and s by rlp decoding the transaction</li><li>Get the transaction hash</li><li>Use ECDSA with secp256k1’s curve to recover the public key from tx hash and v, r, s values</li><li>Take the Keccak-256 hash of the public key</li><li>Take the last 40 characters / 20 bytes of this public key (Keccak-256). Or, in other words, drop the first 24 characters / 12 bytes. These 40 characters / 20 bytes are the address. When prefixed with 0x it becomes 42 characters long.</li></ol><p>Note that ethereum is not using sha3, it uses <strong>Keccak-256 for hashing</strong>. <br>In order to recover the public key of the sender (tx signer), Elliptic Curve Digital Signature Algorithm (ECDSA) with secp256k1’s curve is used.</p><p>I’ll explain how to implement the above 5 steps in a future article. It took almost 2 weeks to implement the whole story I’ve explained in this article which I had to read research papers, several code bases.</p><p>Click here for the <a href="https://medium.com/@umeshprabushithajayasinghe/gsoc-2018-stories-into-the-project-etherbeat-2112e85b75ae">Previous Article</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34bf13116552" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2018 Stories 01: Into the project EtherBeat]]></title>
            <link>https://medium.com/@prabushitha/gsoc-2018-stories-into-the-project-etherbeat-2112e85b75ae?source=rss-9d1d95499d71------2</link>
            <guid isPermaLink="false">https://medium.com/p/2112e85b75ae</guid>
            <category><![CDATA[etherbeat]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Umesh Prabushitha Jayasinghe]]></dc:creator>
            <pubDate>Mon, 14 May 2018 16:15:02 GMT</pubDate>
            <atom:updated>2018-05-27T09:12:10.285Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last week of last month (April 23rd), I’ve got selected to work as a Google Summer of Code (GSoC) 2018 student for ScoreLab organization. I’m very excited not only being selected but also about the project since it’s a new and interesting domain for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/0*WQTo-WErQp5cCsHw.png" /></figure><p>So, this would be the 1st post of my post series for GSoC experience. Almost the community bonding period is getting over now. But let’s start from the beginning.</p><p>It was not an easy task for me to prepare a proposal for this project. But the curiosity and the interest towards the blockchain technology drove me to come up with a solution and write a proposal for ethereum blockchain parser for the project EtherBeat. As a summary of the proposed solution, it’s simply a parser which extracts information from ethereum blockchain files and stores them in an efficient manner to support the querying and analysis of EtherBeat.</p><p>After getting selected for the project, I had a discussion with the organization mentor regarding the project and what the real expectation by developing the proposed solution. That was a bit long discussion with organization mentor Charith to clarify the necessity, underlying concepts and basically the “Why” part of the project. That’s when I realized I need to go few levels deeper into the Ethereum blockchain and analyze the structures very well. So in the community bonding period, I had to familiarize with the project and do all my learnings with mentor feedbacks. Before stepping any deeper, first task was to fix some issues. The project had several issues mainly due to some broken packages, fresh installations didn’t compile. Discussed the issue with the project mentor and could able to fix it.</p><p>Basically thereafter I had to do all the learning activities. I had to master Ethereum blockchain, structural differences of ethereum and bitcoin, Go ethereum RPC endpoints and the limitations, Leveldb blockchain data storing process, new data structures (Trie, Patricia trie etc.) and many more. <a href="https://drive.google.com/open?id=1WISuolSL1vuYpJlDcxR5m3fO7g9xdX1g">Here’s a full summary</a> of what I learned in this period.</p><p>In parallel to all the learning activities, I did practice C++, mocked with several C++ libraries and familiarized with c++ code compilation helpers like cmake (CMake is a build system that uses a single script defined in a CMakeLists.txt file) to generate appropriate platform-specific build scripts. Other than development perspective, it did help me to understand several other errors which I ignore when using the OS (I use Arch Linux, but then realized I’m a noober :-D).</p><p>I did set up the environment for the parser as a subproject of EtherBeat. Still the development is waiting. I hope this might be a great opportunity for me to learn many new things and hoping to give my full commitment towards the success of this project.</p><p><a href="https://medium.com/@umeshprabushithajayasinghe/gsoc-2018-stories-parse-ethereum-raw-blocks-34bf13116552">Next Article</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2112e85b75ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>