<?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 Syed Talal Musharraf on Medium]]></title>
        <description><![CDATA[Stories by Syed Talal Musharraf on Medium]]></description>
        <link>https://medium.com/@syedtalal10?source=rss-1a3c8614b402------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kAPzL9jwm3la7auKRTzucQ.jpeg</url>
            <title>Stories by Syed Talal Musharraf on Medium</title>
            <link>https://medium.com/@syedtalal10?source=rss-1a3c8614b402------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:30:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@syedtalal10/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[Deploying Your FastAPI Application on AWS EC2 with Nginx: A Comprehensive Guide]]></title>
            <link>https://syedtalal10.medium.com/deploying-your-fastapi-application-on-aws-ec2-with-nginx-a-comprehensive-guide-14e5a95d2e94?source=rss-1a3c8614b402------2</link>
            <guid isPermaLink="false">https://medium.com/p/14e5a95d2e94</guid>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[fastapi]]></category>
            <dc:creator><![CDATA[Syed Talal Musharraf]]></dc:creator>
            <pubDate>Sun, 10 Mar 2024 07:29:18 GMT</pubDate>
            <atom:updated>2024-03-10T07:29:18.536Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*tk31JU2WBQTWpPhDaWkGcw.png" /></figure><p>FastAPI is a powerful framework for deploying machine learning models into production environments. In this guide, we’ll explore how to seamlessly transition your FastAPI application to a live setting on an AWS EC2 instance, utilizing Nginx for optimal performance and reliability. This walkthrough aims to provide a clear, step-by-step process for those looking to efficiently deploy their applications in a robust cloud environment.</p><h3>Running your app using Uvicorn</h3><p>Before running your app, you also need to install uvicorn, which is a lightweight server implementation to run our API.</p><pre>pip install uvicorn</pre><p>Now we are ready to run the application “app” located in the main.py file using the following command:</p><pre>uvicorn main:app<br></pre><p>By default, the API will be available in <a href="http://127.0.0.1:8000/"><em>http://127.0.0.1:8000</em></a><em> .</em></p><p>Why use Nginx?</p><p>Nginx serves multiple roles, including reverse and forward proxy, load balancer, and API Gateway. When combined with Uvicorn for serving FastAPI applications, Nginx not only enhances performance but also simplifies the addition of SSL certificates, bolstering security.</p><h3>Deployment Fast API on Ec2 Instance</h3><ol><li>Create and launch the AWS EC2 instance.</li><li>Configure the AWS EC2 instance by installing Nginx and the API requirements</li><li>Configure Nginx.</li><li>Add an SSL certificate using OpenSSL.</li></ol><p>After login to your AWS account go to:<br>Services -&gt; Compute -&gt;EC2 -&gt;Lauch Instance</p><p>Now you have to follow these steps:</p><p><strong>Step 1: Choose an Amazon Machine Image (AMI)</strong><br>I chose an Ubuntu 22.04 Server.</p><p><strong>Step 2: Choose an Instance Type<br></strong>I chose t2.micro which is Free Tier. For GPU usages you have to choose from GPU instances.</p><p><strong>Step 3: Configure Instance Details<br>Step 4: Add Storage<br>Step 5: Add Tags</strong></p><p><strong>Step 6: Configure Security Group<br></strong>By clicking on “Add Rule”, we will make sure to add the HTTP and HTTPS types</p><p><strong>Step 7: Review Instance Launch<br></strong>Finally, we review and launch the instance. When you click on the “Launch” button you will be prompted to create a key pair. Create and download it. You will need it to access the instance you have just created.</p><h3>Configure the AWS EC2 instance by installing Nginx and the API requirements</h3><p>Now that the instance is up and running, we will access it via SSH and configure it. To do it, go to Services -&gt; Compute -&gt;EC2 -&gt;Instances<br>You should see your instance running:</p><p>Select the instance and go to Actions -&gt; Connect -&gt; SSH Client</p><p>You will find there a detailed example of how to connect to your instance via SSH. In my particular case (as I named the key pair “fastapi-nginx.cer” and downloaded it to my “Downloads” folder) I will use this command to access my instance:</p><pre>ssh -i Downloads/&lt;YOUR-FASTAPI-KEY-FILE&gt; ubuntu@&lt;YOUR-INSTANCE ADDRESS&gt;</pre><p>Now clone your repository in the EC2 instance.</p><pre>git clone &lt;YOUR-REPO-NAME&gt;</pre><p>Enter to the directory of the project to install the requirements:</p><pre>cd &lt;FolderName&gt;<br>sudo apt-get update<br>sudo apt install python3-pip<br>pip3 install -r requirements.txt</pre><p>Let’s run the API locally to check that everything is ok:</p><pre>python3 -m uvicorn main:app</pre><p>So now let’s make this API accessible for the rest of the world using Nginx.</p><h3>Nginx configuration</h3><p>First, install Nginx using the following command:</p><pre>sudo apt install nginx</pre><p>We already have the fastAPI API we wish to serve, now we need to create the server blocks that will tell Nginx how to do this.</p><p>By default, Nginx contains one server block called default. You can find it in this location:<strong> etc/nginx/sites-enabled.</strong></p><p>But we will create a new one called “fastapi_nginx_config” (you can choose another name):</p><pre>cd /etc/nginx/sites-enabled/<br>sudo vim fastapi_nginx</pre><p>Inside this file, we have to specify the following:</p><pre>server {<br>    listen 80;<br>    server_name &lt;Your EC2 Instance Server Domain&gt;;<br>    location / {<br>        proxy_pass http://127.0.0.1:8000;<br>    }<br>}</pre><p>Where server_name contains the public IP of your instance. <br>With this configuration, you are telling Nginx, that what you have running on <a href="http://127.0.0.1:8000;/">http://127.0.0.1:8000</a> should be served to <a href="http://18.116.199.161/">http://1&lt;</a>Your EC2 Instance Server Domain&gt;/ (port 80).</p><p>We save that file (Ctrl X) and then run</p><pre>sudo service nginx restart</pre><p>Then, we run the API</p><pre>cd &lt;Path of your Cloned Repo&gt;<br>python3 -m uvicorn main:app</pre><p>Then, try to access <a href="http://{your/"><strong>http://{your</strong></a><strong> EC2 public IP}/</strong>using your browser on your local computer. You should see something like this:</p><p>Congrats! now your API is accessible to the rest of the world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14e5a95d2e94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reinforcement learning based adversarial malware example generation against black-box detectors …]]></title>
            <link>https://syedtalal10.medium.com/reinforcement-learning-based-adversarial-malware-example-generation-against-black-box-detectors-c7a4d66027db?source=rss-1a3c8614b402------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7a4d66027db</guid>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[computer-security]]></category>
            <category><![CDATA[temporal-difference]]></category>
            <category><![CDATA[malware]]></category>
            <dc:creator><![CDATA[Syed Talal Musharraf]]></dc:creator>
            <pubDate>Tue, 27 Feb 2024 19:05:53 GMT</pubDate>
            <atom:updated>2024-02-27T19:06:38.828Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reinforcement learning based adversarial malware example generation against black-box detectors : A Review of the research paper</h3><h3>Abstract and Introduction</h3><p>The paper presents a new framework named “MallInfo” that uses reinforcement learning to generate adversarial malwares that are capable of evading black-box antivirus systems. Traditional methods often rely on static or single perturbation techniques but MallInfo introduces a dynamic approach that can navigate the complexities of modern malware detection systems without prior knowledge of their algorithms.</p><h3>Methodologies Used:</h3><p>An approach is used that combines reinforcement learning and perturbation techniques(Obfusmal, Stealmal, Hollowmal) to alter malware in a way that evades detection while preserving its malicious functionality. The use of Dynamic Programming and temporal difference learning showcases this framework’s flexibility and adaptability.</p><h3>Results:</h3><p>The results show the higher evasion rate of Mallinfo compared to previous methods. MallInfo can adapt to different malware detection systems making it a powerful tool for testing resilience of these systems against the evasion techniques.</p><h3>Implications and Future Directions:</h3><p>The ramifications of this work are wide-ranging and include the creation of malware detection algorithms that are more robust as well as the moral issues related to the usage of adversarial examples in cybersecurity. The ability of MalInfo to elude detection emphasizes the necessity of ongoing improvements in detection technology in order to combat ever-more-advanced hostile strategies.</p><p>Subsequent investigations may examine the amalgamation of MalInfo with alternative learning algorithms or its utilization in diverse detection systems, encompassing those grounded in machine learning models. It is also necessary to set ethical rules for the usage of adversarial malware examples in testing and research to make sure that these methods do not unintentionally lead to the spread of more potent malware.</p><h3>Conclusion:</h3><p>Overall, this work represents a major advancement in the continuing battle between malware developers and cybersecurity experts by providing insightful information about the application of reinforcement learning to the generation of malware examples. It makes a noteworthy contribution to the topic of cybersecurity because of its creative methodology, important findings, and possibilities for further study.</p><p>The Research paper can be found here: <a href="https://www.sciencedirect.com/science/article/abs/pii/S0167404822002632">Link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7a4d66027db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Llama 2 | Introduction and Features]]></title>
            <link>https://syedtalal10.medium.com/llama-2-introduction-and-features-34503018ad13?source=rss-1a3c8614b402------2</link>
            <guid isPermaLink="false">https://medium.com/p/34503018ad13</guid>
            <dc:creator><![CDATA[Syed Talal Musharraf]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 18:17:57 GMT</pubDate>
            <atom:updated>2023-08-21T18:21:08.604Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-fOPlmDq4u7igaTQ6ocAzQ.png" /></figure><p>Meta released the second version of their open-source Llama language model on July 18, 2023. They’re democratizing access to this model by making it free to the community for both research and commercial use. They also prioritize the transparent and responsible use of AI, as evidenced by their Responsible Use Guide. Link is below:</p><p><a href="https://lnkd.in/dPqmwCcu">https://lnkd.in/dPqmwCcu</a></p><p>Here are the five key features of Llama 2:<br>1. LLama 2 outperforms many other LLMs in benchmarks for reasoning, coding excellency and knowledge tests.</p><p>2. The model was trained on almost twice the data of version 1, totaling 2 trillion tokens. Additionally, the training included over 1 million new human annotations and fine-tuning for chat completions.</p><p>3. The model comes in three sizes, each trained with 7, 13, and 70 billion parameters.</p><p>4. In Llama 2 we can pass longer context lengths, up to 4096 tokens.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34503018ad13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tree DFS]]></title>
            <link>https://syedtalal10.medium.com/tree-dfs-84fef6eac61b?source=rss-1a3c8614b402------2</link>
            <guid isPermaLink="false">https://medium.com/p/84fef6eac61b</guid>
            <dc:creator><![CDATA[Syed Talal Musharraf]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 11:49:56 GMT</pubDate>
            <atom:updated>2023-08-14T11:49:56.125Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*A2D1JWOs_LBkjWie5VPq0w.png" /></figure><p>Introduction:<br>The concept of Tree DFS revolves around employing the Depth First Search (DFS) strategy to navigate through a tree structure.<br>This technique involves utilizing recursion (or an iterative method with a stack) to maintain a record of previous (parent) nodes while progressing through the traversal process.</p><p>Explanation:<br>The essence of the Tree DFS approach lies in commencing from the tree’s root node. When encountering a non-leaf node, several tasks need to be accomplished:<br>1. Determining the appropriate timing to process the current node — either before delving into its children (pre-order), in between the processing of its two children (in-order), or after both children have been processed (post-order).<br>2. Initiating two recursive calls for each of the current node’s children, facilitating their individual processing.<br>3. Recognizing the Tree DFS pattern involves a few key indicators:<br>When tasked with the traversal of a tree using in-order, preorder, or postorder DFS.</p><p>When the problem entails searching for something where the node’s proximity to a leaf node is significant.</p><p>Examples:<br>Examples of problems that align with the Tree DFS pattern include:<br>Sum of Path Numbers (medium difficulty)<br>All Paths for a Sum (medium difficulty)</p><p><a href="https://www.linkedin.com/feed/hashtag/?keywords=dfs&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7096808265912582144">#DFS</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=algorithms&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7096808265912582144">#algorithms</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=faang&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7096808265912582144">#faang</a></p><p>Activate to view larger image,</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84fef6eac61b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tree BFS]]></title>
            <link>https://syedtalal10.medium.com/tree-bfs-75437c413151?source=rss-1a3c8614b402------2</link>
            <guid isPermaLink="false">https://medium.com/p/75437c413151</guid>
            <dc:creator><![CDATA[Syed Talal Musharraf]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 11:05:55 GMT</pubDate>
            <atom:updated>2023-08-14T11:05:55.327Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*loNGxXT8hpYR7uLP5y3bsA.jpeg" /></figure><p>Introduction:</p><p>The Tree BFS pattern is a method used to explore a tree structure, much like traversing levels of a building. It relies on a technique called Breadth First Search (BFS) and employs a queue to help manage the order of exploration.</p><p>Level by Level approach:<br>This approach is particularly useful whenever you need to systematically go through a tree’s levels, tackling each level before moving on to the next one.<br>To use the Tree BFS pattern, you start by placing the root node into a queue. Then, you follow a process where you repeatedly take out the front node from the queue, “visit” or examine it in some way, and also add all of its children to the queue. This continues until the queue is empty, meaning you’ve explored all the nodes in the tree in a level-wise manner.</p><p>How to Identify:<br>You can recognize situations where the Tree BFS pattern is applicable when you’re tasked with traversing a tree by moving through its levels one by one.</p><p>Types of Problems:<br>This type of traversal is often referred to as level order traversal.<br>Some examples of problems that can be approached using the Tree BFS pattern include “Binary Tree Level Order Traversal,” which is relatively straightforward, and “Zigzag Traversal,” which is a bit more complex. Both of these problems involve navigating a tree’s levels systematically, making the Tree BFS pattern an efficient strategy for solving them.</p><p><a href="https://www.linkedin.com/feed/hashtag/?keywords=bfs&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7095694363350974465">#BFS</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=dsa&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7095694363350974465">#dsa</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=faang&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7095694363350974465">#faang</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75437c413151" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Merkle Tree?]]></title>
            <link>https://syedtalal10.medium.com/what-is-merkle-tree-81e8a9e26464?source=rss-1a3c8614b402------2</link>
            <guid isPermaLink="false">https://medium.com/p/81e8a9e26464</guid>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[merkle-tree]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Syed Talal Musharraf]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 20:10:48 GMT</pubDate>
            <atom:updated>2023-07-26T20:11:56.261Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*_8Nn3g_TpMfQTTdeaT7srg.png" /></figure><h3>What Is a Merkle Tree?</h3><ul><li>Merkle trees, also known as Binary hash trees, are a type of data structure that is commonly used in computer science.</li><li>They are used to encrypt blockchain data more effectively and securely in bitcoin and other cryptocurrencies.</li><li>It is a mathematical data structure composed of hashes of multiple data blocks that summarize all transactions inside a block.</li><li>It also allows for rapid and safe content verification across large datasets, as well as data consistency and content verification.</li></ul><h3>What Is a Merkle Root?</h3><ul><li>A Merkle root is a straightforward mathematical way for validating the facts on a Merkle tree.</li><li>They are used in bitcoin to verify that data blocks transmitted over a peer-to-peer network are complete, undamaged, and unmodified.</li><li>They are critical in the computation necessary to keep cryptocurrencies such as bitcoin and ether functioning.</li></ul><h3>Cryptographic Hash Functions</h3><ul><li>A hash function converts any arbitrary data of any length to a fixed-size output. Because it is a cryptographic function, it is extensively employed in cryptography.</li><li>They are effective and well-known for one feature: they are irreversible. It is a one-way function that only works in one direction.</li><li>Message Direct (MD), Secure Hash Function (SHF), and RIPE Message Direct are some of the Hash families available (RIPEMD).</li></ul><p>As an example, if you apply the SHA256 hash algorithm using 101Blockchains as input, you will obtain the output shown below.</p><p>fbffd63a60374a31aa9811cbc80b577e23925a5874e86a17f712bab874f33ac9</p><p>Finally, the following are the hash function’s key properties:</p><ul><li>Deterministic</li><li>Pre-Image Resistant</li><li>Computationally Efficient</li><li>Cannot be Reversed Engineered</li><li>Collision Resistant</li></ul><h3>Working of Merkle Trees</h3><p>A Merkle tree adds up all the transactions in a block and provides a digital fingerprint of the full set of operations, allowing the user to check if it contains a transaction in the block.</p><ul><li>Merkle trees are constructed by periodically hashing pairs of nodes until only one hash remains; this hash is known as the Merkle Root or the Root Hash.</li><li>They are constructed from the ground up, utilizing Transaction IDs, which are hashes of individual transactions.</li><li>Each non-leaf node is a hash of the hash before it, and each leaf node is a hash of transactional data.</li></ul><p>Now consider a little example of a Merkle Tree in Blockchain to better grasp the idea.</p><p>Consider the following example: A, B, C, and D are four transactions that took place on the same block. Each transaction is then hashed, yielding:</p><p>Hash A</p><p>Hash B</p><p>Hash C</p><p>Hash D</p><p>The hashes are combined, resulting in:</p><p>Hash AB</p><p>and</p><p>Hash CD</p><p>As a result, your Merkle Root is generated by merging the following two hashes: Hash ABCD.</p><p>In truth, a Merkle Tree is far more complex (especially when each transaction ID is 64 characters long). Nonetheless, this example provides an excellent summary of how algorithms function and why they are so powerful.</p><h3>Benefits of Merkle Tree in Blockchain</h3><p>Merkle trees offer four main benefits:</p><p>Validate the data’s integrity: It may be used to effectively validate the data’s integrity.</p><p>Takes tiny disk space: When compared to other data structures, the Merkle tree takes up extremely little disk space.</p><p>Tiny information across networks: Merkle trees may be split down into little chunks of data for verification across networks.</p><p>Efficient Verification: Because the data format is efficient, confirming the data’s integrity only takes a few seconds.</p><h3>Why Is It Essential to Blockchain?</h3><p>Consider a blockchain without Merkle Trees to see how important they are to blockchain technology. Let’s start with Bitcoin because its usage of Merkle Trees is critical for the cryptocurrency and easy to understand.</p><ul><li>Without Merkle Trees, every node on the network would have to keep a full copy of every single Bitcoin transaction ever performed. Imagine how much information that would contain.</li><li>Any authentication request on Bitcoin would necessitate a massive quantity of data being carried across the network, therefore you’ll have to validate the data yourself.</li><li>To confirm that there were no modifications, a computer used for validation would need a lot of computing power to compare ledgers.</li></ul><p>Merkle Trees provide a solution to this problem. In accounting, they hash records to separate the evidence of data from the data itself.</p><ul><li>Demonstrating that sending little quantities of data across the network is all that is necessary for a transaction to be legitimate.</li><li>It also allows you to demonstrate that both ledger types have the same nominal computing power and network bandwidth.</li></ul><h3>Use-Cases of Merkle Tree in Blockchain</h3><ul><li>One of the most popular is Git, a distributed version control system. It is used by programmers from all around the world to manage projects.</li><li>Another appropriate implementation is the Interplanetary File System, a peer-to-peer networked protocol. It’s also free and open-source, letting machines to connect to and use a centralized file system.</li><li>It is a component of the method that creates verifiable certificate transparency logs.</li><li>It is used by Amazon DynamoDB and Apache Cassandra throughout the data replication process. Merkle trees are used to manage inconsistencies in these No-SQL distributed databases.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81e8a9e26464" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Ethereum: Understanding Its Features and Applications]]></title>
            <link>https://syedtalal10.medium.com/what-is-ethereum-understanding-its-features-and-applications-b1803c17c1fd?source=rss-1a3c8614b402------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1803c17c1fd</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <dc:creator><![CDATA[Syed Talal Musharraf]]></dc:creator>
            <pubDate>Sat, 22 Jul 2023 13:54:55 GMT</pubDate>
            <atom:updated>2023-07-22T13:54:55.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*EuS99iNi3j5EX1PwNQNkkg.jpeg" /></figure><h3>What is Ethereum: Understanding Its Features and Applications</h3><p>Many believe Ethereum to be the second most popular cryptocurrency, after only Bitcoin. According to The Motley Fool, Microsoft, Intel, and JPMorgan Chase are among the founding members of the Enterprise Ethereum Alliance (EEA). According to CNBC, “the acceptance of Ethereum by the business sector suggests it might someday be greater than its early stage competition.” That means it’s time to learn about the Ethereum platform, including its features and uses, as well as what distinguishes Ethereum from Bitcoin.</p><h3>What is Ethereum?</h3><p>Ethereum is a blockchain-based computing platform that allows developers to create and deploy decentralized apps — that is, systems that are not run by a single authority. You may design a decentralized application in which the program’s members are the decision-making authority.</p><h3>Ethereum Features</h3><ul><li>Ethereum’s cryptocurrency is called Ether.</li><li>Smart contracts: Ethereum enables the creation and implementation of smart contracts.</li><li>Ethereum Virtual Machine: Ethereum offers the underlying technology — architecture and software — for understanding smart contracts and interacting with them.</li><li>Decentralized applications (Dapps): A Dapp (also spelt DAPP, App, or DApp) is a type of decentralized application. Ethereum enables the creation of consolidated apps, often known as decentralized applications.</li><li>Decentralized autonomous organizations (DAOs):Ethereum allows you to construct decentralized autonomous organizations (DAOs) for democratic decision-making.</li></ul><h3>1. Ether</h3><p>Ether (ETH) is Ethereum’s Cryptocurrency . It is the fuel that runs the network. It is used to pay for the computational resources and the transaction fees for any transaction executed on the Ethereum network. Like Bitcoins, ether is a peer-to-peer currency. Apart from being used to pay for transactions, ether is also used to buy gas, which is used to pay for the computation of any transaction made on the Ethereum network.</p><p>Also, if you want to deploy a contract on Ethereum, you will need gas, and you would have to pay for that gas in ether. So gas is the execution fee paid by a user for running a transaction in Ethereum. Ether can be utilized for building decentralized applications, building smart contracts, and making regular peer-to-peer payments.</p><h3>2. Smart Contracts</h3><p>Smart Contracts are revolutionizing how traditional contracts work, which is why you need to use the tutorial to become more familiar with them. A smart contract is a simple computer program that facilitates the exchange of any asset between two parties. It could be money, shares, property, or any other digital asset that you want to exchange. Anyone on the Ethereum network can create these contracts. The contract consists primarily of the terms and conditions mutually agreed on between the parties (peers).</p><p>The smart contract’s primary feature is that once it is executed, it cannot be altered, and any transaction done on top of a smart contract is registered permanently — it is immutable. So even if you modify the smart contract in the future, the transactions correlated with the original contract will not get altered; you cannot edit them.</p><p>The verification process for the smart contracts is carried out by anonymous parties in the network without the need for a centralized authority, and that’s what makes any smart contract execution on Ethereum a decentralized execution.</p><p>The transfer of any asset or currency is done in a transparent and trustworthy manner, and the identities of the two entities are secure on the Ethereum network. Once the transaction is successfully done, the accounts of the sender and receiver are updated accordingly, and in this way, it generates trust between the parties.</p><h3>a) Smart Contracts Vs. Traditional Contract Systems</h3><p>In conventional contract systems, you sign an agreement, then you trust and hire a third party for its execution. The problem is that in this type of process, data tampering is possible. With smart contracts, the agreement is coded in a program. A centralized authority does not verify the result; it is confirmed by the participants on the Ethereum blockchain-based network. Once a contract is executed, the transaction is registered and cannot be altered or tampered, so it removes the risk of any data manipulation or alteration.</p><p>Let’s take an example in which someone named Zack has given a contract of $500 to someone named Elsa for developing his company’s website. The developers code the agreement of the smart contract using Ethereum’s programming language. The smart contract has all the conditions (requirements) for building the website. Once the code is written, it is uploaded and deployed on the Ethereum Virtual Machine (EVM).</p><p>EVM is a runtime compiler to execute a smart contract. Once the code is deployed on the EVM, every participant on the network has a copy of the contract. When Elsa submits the work on Ethereum for evaluation, each node on the Ethereum network will evaluate and confirm whether the result given by Elsa has been done as per the coding requirements, and once the result is approved and verified, the contract worth $500 will be self-executed, and the payment will be paid to Elsa in ether. Zack’s account will be automatically debited, and Elsa will be credited with $500 in ether.</p><h3>3. Ethereum Virtual Machine</h3><p>EVM, as mentioned above in this Ethereum tutorial, is designed to operate as a runtime environment for compiling and deploying Ethereum-based smart contracts. EVM is the engine that understands the language of smart contracts, which are written in the Solidity language for Ethereum. EVM is operated in a sandbox environment — basically, you can deploy your stand-alone environment, which can act as a testing and development environment. You can then test your smart contract (use it) “n” number of times, verify it, and once you are satisfied with the performance and the functionality of the smart contract, you can deploy it on the Ethereum main network.</p><p>Any programming language in the smart contract is compiled into the bytecode, which the EVM understands. This bytecode can be read and executed using the EVM. Solidity is one of the most popular languages for writing a smart contract. Once you write your smart contract in Solidity, that contract gets converted into the bytecode and gets deployed on the EVM, thereby guaranteeing security from cyberattacks.</p><h3>a) How Does EVM Work?</h3><p>Suppose person A wants to pay person B 10 ethers. The transaction will be sent to the EVM using a smart contract for a fund transfer from A to B. To validate the transaction; the Ethereum network will perform the proof-of-work consensus algorithm.</p><p>The miner nodes on Ethereum will validate this transaction — whether the identity of A exists or not, and if A has the requested amount to transfer. Once the transaction is confirmed, the ether will be debited from A’s wallet and will be credited to B’s wallet, and during this process, the miners will charge a fee to validate this transaction and will earn a reward.</p><p>All the nodes on the Ethereum network execute smart contracts using their respective EVMs.</p><h3>b) Proof of Work</h3><p>Every node in the Ethereum network has:</p><ul><li>The entire history of all the transactions — the entire chain</li><li>The history of the smart contract, which is the address at which the smart contract is deployed, along with the transactions associated with the smart contract</li><li>The handle to the current state of the smart contract</li></ul><p>The goal of the miners on the Ethereum network is to validate the blocks. For each block of a transaction, miners use their computational power and resources to get the appropriate hash value by varying the nonce. The miners will vary the nonce and pass it through a hashing algorithm — in Ethereum, it is the Ethash algorithm.</p><p>This produces a hash value that should be less than the predefined target as per the proof-of-work consensus. If the hash value generated is less than the target value, then the block is considered to be verified, and the miner gets rewarded.</p><p>When the proof of work is solved, the result is broadcast and shared with all the other nodes to update their ledger. If other nodes accept the hashed block as valid, then the block gets added to the Ethereum main blockchain, and as a result, the miner receives a reward, which as of today stands at three ethers. Plus, the miner gets the transaction fees that have been generated for verifying the block. All the transactions that are aggregated in the block — the cumulative transaction fees associated with all the transactions are also rewarded to the miner.</p><h3>c) Proof of Stake</h3><p>In Ethereum, a process called<a href="https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/"> proof of stake</a> is also under development. It is an alternative to proof of work and is meant to be a solution to minimize the use of expensive resources spent on mining using proof of work. In proof of stake, the miner — who is the validator — can validate the transactions based on the number of crypto coins he or she holds before actually starting the mining. So, based on the accumulation of crypto coins the miner has beforehand, he or she has a higher probability of mining the block. However, proof of stake is not widely used as of now compared to proof of work.</p><h3>d) Gas</h3><p>Just like we need fuel to run a car, we need gas to run applications on the Ethereum network. To perform any transaction within the Ethereum network, a user must make a payment, in this case paying out ethers, to get a transaction done, and the intermediary monetary value is called gas. On the Ethereum network, gas is a unit that measures the computational power required to run a smart contract or a transaction. So, if you must do a transaction that updates the blockchain, you would have to shell out gas, and that gas costs ethers.</p><p>In Ethereum, the transaction fees are calculated using a formula (see screenshot below). For every transaction, there is gas and its correlated gas price. The transaction fees equal the amount of gas required to execute a transaction multiplied by the gas price. “Gas limit” refers to the amount of gas used for the computation and the amount of ether a user is required to pay for the gas.</p><h3>4. Decentralized Applications (Dapps)</h3><p>Let’s compare decentralized applications with traditional applications. When you log in to Twitter, for example, a web application gets displayed that is rendered using HTML. The page will call an API to access your data (your information), which is centrally hosted. It’s a simple process: your front end executes the backend API, and the API goes and fetches your data from a centralized database.</p><p>If we transform this application into a decentralized application when you log in, the same web application gets rendered, but it calls a smart contract-based API to fetch the information from the blockchain network. So, the API is replaced by a smart contract interface, and the smart contract will bring the data from the blockchain network, which is its back end.</p><p>That blockchain network is not a centralized database; it’s a decentralized network in which the participants of the network (the miners) validate (verify) all the transactions that are happening using the smart contract on the blockchain network. So, any transaction or action happening on a Twitter-type application that has now been transformed will be a decentralized transaction.</p><p>A Dapp consists of a backing code that runs on a distributed peer-to-peer network. It is a software designed to work in the Ethereum network without being controlled by a centralized system, as mentioned, and that is the primary difference: it provides direct interaction between the end-users and the decentralized application providers.</p><p>An application qualifies as a Dapp when it is open-source (its code is on Github), and it uses a public blockchain-based token to run its applications. A token acts as fuel for the decentralized application to run. Dapp allows the back end code and data to be decentralized, and that is the primary architecture of any Dapp.</p><h3>5. Decentralized Autonomous Organizations (DAOs)</h3><p>A DAO is a digital organization that operates without hierarchical management; it works in a decentralized and democratic fashion. So basically, a DAO is an organization in which the decision-making is not in the hands of a centralized authority but preferably in the hands of certain designated authorities or a group or designated people as a part of an authority. It exists on a blockchain network, where it is governed by the protocols embedded in a smart contract, and thereby, DAOs rely on smart contracts for decision-making — or, we can say, decentralized voting systems — within the organization. So, before any organizational decision can be made, it must go through the voting system, which runs on a decentralized application.</p><p>Here’s how it works. People add funds through the DAO because the DAO requires funding in order to execute and make decisions. Based on that, each member is given a token that represents that person’s percentage of shares in the DAO. Those tokens are used to vote in the DAO, and the proposal status is decided based on the maximum votes. Every decision within the organization must go through this voting process.</p><h3>Real-World Applications of Ethereum</h3><h3>Voting Systems</h3><ul><li>As we’ve seen with DAO, voting systems are adopting Ethereum. The results of polls are publicly available, ensuring a transparent and fair democratic process by eliminating voting malpractices.</li></ul><h3>Banking Systems</h3><ul><li>Ethereum is getting adopted widely in banking systems because with Ethereum’s decentralized system; it is challenging for hackers to gain unauthorized access. It also allows payments on an Ethereum-based network, so banks are also using Ethereum as a channel to make remittances and payments.</li></ul><h3>Shipping</h3><ul><li>Deploying Ethereum in shipping helps with the tracking of cargo and prevents goods from being misplaced or counterfeited. Ethereum provides the provenance and tracking framework for any asset required in a typical supply chain.</li></ul><h3>Agreements</h3><ul><li>With Ethereum smart contracts, agreements can be maintained and executed without any alteration. So in an industry that has fragmented participants, is subject to disputes, and requires digital contracts to be present, Ethereum can be used as a technology for developing smart contracts and for digitally recording the agreements and the transactions based on them.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1803c17c1fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>