<?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 Tu Nguyen on Medium]]></title>
        <description><![CDATA[Stories by Tu Nguyen on Medium]]></description>
        <link>https://medium.com/@ngtuna?source=rss-88003fc0e8b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Yrkgrv0hn32i5085MLzxnQ.jpeg</url>
            <title>Stories by Tu Nguyen on Medium</title>
            <link>https://medium.com/@ngtuna?source=rss-88003fc0e8b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:16:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ngtuna/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[TomoChain Client v1.4 release announcement]]></title>
            <link>https://medium.com/tomochain/tomochain-client-v1-4-release-announcement-c3f169b5ef03?source=rss-88003fc0e8b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3f169b5ef03</guid>
            <category><![CDATA[posv]]></category>
            <category><![CDATA[tomochain]]></category>
            <category><![CDATA[english]]></category>
            <category><![CDATA[cg]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Tu Nguyen]]></dc:creator>
            <pubDate>Tue, 23 Apr 2019 10:15:57 GMT</pubDate>
            <atom:updated>2019-04-25T03:53:41.898Z</atom:updated>
            <content:encoded><![CDATA[<h4>Our pleasure to announce <a href="https://github.com/tomochain/tomochain/releases/tag/v1.4.0">TomoChain client v1.4</a> has been released today.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PgT4Kr58_lucVN56Cxm8Qw.jpeg" /></figure><p>This release includes the following chaindata size and security important improvements:</p><ol><li>Chain-data pruning via the new “gc” (garbage collector) utility. Details are explained below.</li><li>Security bug fix to avoid malicious masternodes panicking the chain</li></ol><p>The security bug, reported from our <a href="https://hackerone.com/tomochain">security bug bounty program</a>, consisted in a malicious masternode being able to craft a special empty message during the randomization procedure that would lead to all the masternodes panicking. It was fixed in this <a href="https://github.com/tomochain/tomochain/pull/497">pull request</a>.</p><p>3. Checkpoint timeout adjusted from 2 minutes to <strong>20 seconds. </strong>The checkpoint timeout adjustment was made by this <a href="https://github.com/tomochain/tomochain/pull/491">pull request</a>.</p><p>In the next sections, we would like to explain how data is stored on the TomoChain network, what impacts the chaindata size growth and how we introduced a “garbage collector” (gc) utility to remove the excessive historical data stored on the “BlockSigner” smart contract.</p><h3>Modified Merkle Patricia Trie</h3><p>In TomoChain, there are four merkle tries that maintain all data of blockchain including storage trie, state trie, transactions trie and receipts trie. All of the merkle tries in TomoChain use a <a href="https://github.com/ethereum/wiki/wiki/Patricia-Tree">modified Merkle Patricia trie</a>. (MPT or trie)</p><p>Basically, MPT is a combination of Patricia trie and Merkle tree. Patricia trie is a tree-based data structure that stores (key, value) bindings in which a key represents a path so the nodes in tree that share the same prefix can also share the same path. Advantage of this structure is that it’s fast at finding common prefixes and doesn’t take much memory to store data. Merkle tree is a tree of hashes in which leaf nodes store data and parent nodes contain their children’s hash as well as the hashed value of the sum of their children’s hashes. Merkle tree makes easy to find whether two different nodes have the same data or not by comparing the top hash value of those two nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Aigr54EC3Fpoat8r" /></figure><p>Merkle Patricia trie in TomoChain provides a cryptographically authenticated data structure that can be used to store all (key, value) bindings. The most important feature of Merkle Patricia trie is that it is fully deterministic, meaning that a Patricia trie with the same (key, value) binding is guaranteed to be exactly the same and therefore have the same root hash. Thus, it’s fast for insertions, lookup and deletions.</p><h3>TomoChain’s state trie and BlockSigner smart contract</h3><p>From TomoChain’s block header, there are three roots from three tries: stateRoot (state trie), transactionsRoot (transactions trie) and receiptsRoot (receipts trie).</p><p>State trie contains global state of TomoChain blockchain; and it is updated over time by executing transactions. State trie contains paths constructed by SHA3[TomoChain address] and values constructed by RLP[TomoChain account]. Note that a TomoChain account is a 4 items array of [nonce, balance, storageRoot, codeHash]. StorageRoot is the root of storage trie mentioned above.</p><p>TomoChain has several built-in smart contracts; one of them is called BlockSigner (address: <a href="https://scan.tomochain.com/address/0x0000000000000000000000000000000000000089">0x0000000000000000000000000000000000000089</a>), containing masternodes signing data. A masternode validates a block by sending an internal signing transaction to BlockSigner smart contract. At the end of each epoch, TomoChain’s consensus calculates signing counts in that smart contract to reward masternodes accordingly. The picture below figures data stored in BlockSigner:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLCs9ElLUSffPBRWEkU1rQ.png" /><figcaption>TomoChain state trie and BlockSigner internal state trie</figcaption></figure><ul><li>BlockSigner is stored in a node of the global TomoChain’s state trie at the specific address: 0x00…0089.</li><li>That node contains an internal trie at it’s data root in which each node contains masternode that validates a specific block.</li><li>For example in this picture, three masternodes signed a block collected by its hash on three separate nodes.</li></ul><p>We figured out that the signing data was the main source of chaindata growth. Thus at the previous release v1.3 we stopped using BlockSigner smart contract to store signing data; instead we counted directly compressed signing transactions on every 15 blocks. Because masternode sends signing transaction asynchronously, we scan blocks on the frame of two recent epochs which is equivalent to 1800 blocks. Furthermore, we cache signing transactions on memory to accelerate the reward calculation at epoch block so that the checkpoint time (execution time at epoch block) is also reduced significantly from a maximum of 2 minutes down to 20 seconds.</p><h3>Introducing gc (garbage collector)</h3><p>In this release, we introduce the gc utility which aims to clean historical BlockSigner state trie and BlockSigner addresses in TomoChain global state root. We ran it already on TomoChains’ masternodes and the result was significant. Chaindata size is reduced from 300+ GB down to 72GB (recorded on April 23rd, 2019). However, be aware that this process is slow and the node has to be stopped while running gc as it scans every blocks starting from the genesis. We ran gc on a powerful server (32 cores CPU and 96GB RAM) and it took 6 days to finish. To make it easier for masternode operators, we will publish the pruned chaindata from our masternodes for a quick use on any nodes.</p><p>You can choose to run gc on your own chaindata by the following commands:</p><pre>$ git clone <a href="https://github.com/tomochain/tomochain">https://github.com/tomochain/tomochain</a> &amp;&amp; \<br>cd tomochain &amp;&amp; \<br>git checkout tags/v1.4.0</pre><pre>$ make gc</pre><pre>$ ./build/bin/gc -dir path/to/your/chaindata</pre><h3>TomoChain contact</h3><p>Follow us on <a href="https://t.me/TomoChainChannel">TomoChain Announcement Channel</a> | <a href="https://twitter.com/TomoChainANN">Twitter</a> | <a href="https://www.facebook.com/tomochainofficial">Facebook</a> | <a href="https://www.linkedin.com/company/tomochain/">LinkedIn</a> | <a href="https://www.reddit.com/r/Tomochain/">Reddit </a>| <a href="https://github.com/tomochain">Github</a> | Sign up for our newsletter on <a href="http://tomochain.com/">Website</a></p><p>For General support: <a href="https://t.me/tomochain">TomoChain Chat</a></p><p>For Technical support: <a href="https://gitter.im/tomochain">Gitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3f169b5ef03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tomochain/tomochain-client-v1-4-release-announcement-c3f169b5ef03">TomoChain Client v1.4 release announcement</a> was originally published in <a href="https://medium.com/tomochain">TomoChain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A serverless plugin for Kubeless]]></title>
            <link>https://medium.com/bitnami-perspectives/a-serverless-plugin-for-kubeless-64cd0f7e4f62?source=rss-88003fc0e8b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/64cd0f7e4f62</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[bitnami]]></category>
            <dc:creator><![CDATA[Tu Nguyen]]></dc:creator>
            <pubDate>Tue, 30 May 2017 13:22:00 GMT</pubDate>
            <atom:updated>2017-05-30T13:34:59.889Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://serverless.com/">Serverless.com</a> ﹣a company based in San Francisco− has been developing the so-called Serverless Framework, to help users build serverless architecture on AWS Lambda, Microsoft Azure and more. The framework is provided as a CLI tool that allows users to build and deploy functions. The currently supported serverless cloud services include AWS Lambda, Microsoft Azure, IBM OpenWhisk and Google Cloud Platform. In this post, we announce the availability of a serverless plugin for Kubeless, the Kubernetes native serverless framework led by Bitnami.</p><p>At <a href="https://bitnami.com/kubernetes">Bitnami</a>, we are developing a Kubernetes-native serverless framework called <a href="https://github.com/kubeless/kubeless">Kubeless</a>. The reason we believe Kubeless is the native serverless solution for Kubernetes among a dozen serverless frameworks out there is because we are leveraging a lot of Kubernetes concepts to deploy and manage function. In particular, we use <a href="https://kubernetes.io/docs/user-guide/thirdpartyresources/">Third Party Resource</a> to define function, and a custom <a href="http://kubernetes.io/docs/admin/kube-controller-manager/">Controller</a> to manage function, deploy it as <a href="http://kubernetes.io/docs/user-guide/deployments/">Kubernetes deployment</a> and expose it via <a href="http://kubernetes.io/docs/user-guide/services/">Kubernetes service</a>. Function code is injected to the Kubernetes deployment via <a href="http://kubernetes.io/docs/user-guide/configmap/">Config Map</a>, and in order to load function’s dependencies, we use <a href="http://kubernetes.io/docs/user-guide/pods/init-container/">Init Container</a>. In order to help Serverless users to easily build and deploy functions to Kubernetes infrastructure, we have created a Kubeless-Serverless plugin. The associated project is open-sourced and it is available on <a href="https://github.com/kubeless/kubeless-serverless">GitHub</a>. The plugin supports is still in alpha development and currently only provides the deploy and remove functionalities. In this blog, I am giving you a first look at this plugin by taking a sample function and deploying it to Kubernetes (Minikube) using the Serverless CLI.</p><p>To get started you need to have a Kubernetes endpoint available via Minikube and you need to install the Serverless CLI and Kubeless.</p><p><strong>Installing Pre-requisites</strong></p><p>Install Serverless CLI. Remember to have node and npm installed before.</p><pre>$ npm install serverless -g<br>$ serverless help</pre><p>Get the latest version of Kubeless, for example on OSX:</p><pre>$ curl -L <a href="https://github.com/kubeless/kubeless/releases/download/0.0.13/kubeless_darwin-amd64.zip">https://github.com/kubeless/kubeless/releases/download/0.0.13/kubeless_darwin-amd64.zip</a> &gt; ./kubeless.zip</pre><p>Uncompress and use the Kubeless CLI to install everything:</p><pre>$ kubeless install<br>$ kubeless function ls</pre><p>In the Kubeless repository, we are providing some sample functions in `/examples` folder. There are two kinds of function supported: http triggered and event triggered. You can try to deploy one of them in order to make sure that you have Kubeless ready.</p><pre>$ kubeless function deploy get-python --trigger-http \<br>--runtime python27 \<br>--handler helloget.foo \<br>--from-file python/helloget.py</pre><pre>$ kubectl proxy -p 8080<br>$ curl localhost:8080/api/v1/proxy/namespaces/default/services/get-python/</pre><h4><strong>Serverless Plugin</strong></h4><p>Once you have Serverless CLI and Kubeless, let’s jump to try the plugin. First you need to clone the plugin code, install the dependencies and set an environment variable that points to your Kubernetes endpoint:</p><pre>$ git clone <a href="https://github.com/kubeless/serverless-plugin">https://github.com/kubeless/serverless-plugin</a><br>$ cd serverless-plugin<br>$ npm install<br>$ export K8SAPISERVER=https://&lt;apiserver_ip&gt;:&lt;apiserver_port&gt;</pre><p>Then you can use the example provided. Take a look into the `examples` folder. There is `serverless.yml` file which contains all metadata of the function. Note that this YAML file is typical of the serverless framework, it is not a Kubeless format.</p><pre>$ cat serverless.yml<br>service: hello</pre><pre>provider:<br> name: google<br> runtime: python2.7</pre><pre>plugins:<br> — kubeless-serverless</pre><pre>functions:<br> hello:<br> handler: handler.hello</pre><ul><li><strong>service: </strong>A service is like a project.</li><li><strong>provider: </strong>Specify the cloud provider on which you wanna deploy the function. For this plugin, we temporarily use `google`. The only `runtime` supported at this moment is python.</li><li><strong>plugins: </strong>A plugin is custom JS code to extend functionalities within the Serverless framework. We use `kubeless-serverless` plugin for this. The plugin has been published at <a href="https://www.npmjs.com/package/kubeless-serverless">https://www.npmjs.com/package/kubeless-serverless</a></li><li><strong>functions: </strong>List out the function you wanna deploy. The `handler` property points to the file and module containing the code you want to run in your function</li></ul><h4>Deploying the Function</h4><p>Now if you run `$ serverless help` again inside the examples folder, you will notice that a few more items have been added to the main program via the `kubeless-serverless` plugin including KubelessDeploy, KubelessIndex, KubelessProvider and KubelessRemove.</p><p>You are now ready to deploy the function by running the following:</p><pre>$ serverless deploy</pre><p>The function will be deployed to the Kubernetes as a deployment and exposed via a service thanks to Kubeless. You can check that everything is running properly:</p><pre>$ kubectl get po,deploy,svc</pre><pre>NAME                             READY     STATUS             RESTARTS   AGE</pre><pre>po/hello-2899647726-xv4d4        1/1       Running            0          40s</pre><pre>NAME                 DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE</pre><pre>deploy/hello         1         1         1            1           40s</pre><pre>NAME                  CLUSTER-IP   EXTERNAL-IP   PORT(S)          AGE</pre><pre>svc/hello             10.0.0.77    &lt;nodes&gt;       8080:31600/TCP   40s<br>svc/kubernetes        10.0.0.1     &lt;none&gt;        443/TCP          1d</pre><p>Hurray… Your function is on air.</p><p>To remove it, just run:</p><pre>$ serverless remove</pre><p>There is still more to do with this plugin, like adding the ability to update a function, so don’t hesitate to jump on <a href="https://github.com/kubeless/serverless-plugin">GitHub</a> to file some issues or help us with a pull request. Kubeless is also evolving very quickly and we welcome any suggestions, feedback or contribution.</p><p>We believe serverless is going to be the next application architecture and building on top of Kubernetes makes total sense to us. If you agree, join us on the fun at <a href="https://github.com/kubeless">https://github.com/kubeless</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64cd0f7e4f62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bitnami-perspectives/a-serverless-plugin-for-kubeless-64cd0f7e4f62">A serverless plugin for Kubeless</a> was originally published in <a href="https://medium.com/bitnami-perspectives">Bitnami Perspectives</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>