<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HecMisio's Blog</title><link>https://blog.hecmisio.com/</link><description>Recent content on HecMisio's Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 03 Apr 2025 09:31:24 +0800</lastBuildDate><atom:link href="https://blog.hecmisio.com/index.xml" rel="self" type="application/rss+xml"/><item><title>In-Depth Understanding of Go Concurrency</title><link>https://blog.hecmisio.com/posts/go/chapter_4/</link><pubDate>Thu, 03 Apr 2025 09:31:24 +0800</pubDate><guid>https://blog.hecmisio.com/posts/go/chapter_4/</guid><description>&lt;p&gt;The Go language is renowned for its powerful concurrency model, which enables developers to easily write efficient and scalable concurrent programs. In this article, we will delve into the core concepts of Go concurrency, including the use of Goroutines, the communication mechanism of Channels, the context management of Context, and Go&amp;rsquo;s unique GMP model (the scheduling model of Goroutines, threads, and processors). Through these topics, you will gain a comprehensive understanding of the design philosophy and implementation details of Go concurrency, laying a solid foundation for writing high-performance Go applications.&lt;/p&gt;</description></item><item><title>Exploring Foundry Cheatcodes</title><link>https://blog.hecmisio.com/posts/blockchain/ethereum/solidity/chapter_3/</link><pubDate>Thu, 27 Mar 2025 16:28:27 +0800</pubDate><guid>https://blog.hecmisio.com/posts/blockchain/ethereum/solidity/chapter_3/</guid><description>&lt;p&gt;Foundry is a powerful tool for Ethereum smart contract developers, and its Cheatcodes feature provides great convenience for development and testing. Whether it&amp;rsquo;s simulating the blockchain environment, manipulating contract states, or quickly debugging complex logic, Cheatcodes can help developers achieve twice the result with half the effort. In this article, we will explore the various Cheatcodes provided by Foundry, explaining their uses and usage methods one by one, to help you write and debug Solidity smart contracts more efficiently.&lt;/p&gt;</description></item><item><title>Exploring Chainlink</title><link>https://blog.hecmisio.com/posts/blockchain/ethereum/solidity/chapter_2/</link><pubDate>Wed, 26 Mar 2025 10:24:07 +0800</pubDate><guid>https://blog.hecmisio.com/posts/blockchain/ethereum/solidity/chapter_2/</guid><description>&lt;p&gt;In the world of blockchain, smart contracts are a powerful tool that can be automatically executed when certain conditions are met. However, blockchain itself is a closed system and cannot directly access off-chain data, such as prices in financial markets, weather information, or random numbers. This limitation restricts the application scope of smart contracts.&lt;/p&gt;&#10;&lt;h2 id="what-is-an-oracle"&gt;What is an Oracle?&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Oracles&lt;/strong&gt; are the key to solving this problem. Oracles act as a bridge between the blockchain and the outside world, capable of introducing off-chain data onto the blockchain or transmitting on-chain events to off-chain systems. However, building an oracle system is no easy task, as it must ensure that it does not undermine the decentralization and data security of the chain. How can the source of data be guaranteed to be decentralized? How can the authenticity and reliability of the data be ensured? How can the high availability of the service be guaranteed?&lt;/p&gt;</description></item><item><title>Solidity Basics</title><link>https://blog.hecmisio.com/posts/blockchain/ethereum/solidity/chapter_1/</link><pubDate>Fri, 21 Mar 2025 13:15:41 +0800</pubDate><guid>https://blog.hecmisio.com/posts/blockchain/ethereum/solidity/chapter_1/</guid><description>&lt;h2 id="data-types"&gt;Data Types&lt;/h2&gt;&#10;&lt;p&gt;Solidity offers a variety of data types to meet the different needs of smart contract development. The following are some common data types:&lt;/p&gt;&#10;&lt;table&gt;&#10;&lt;tr&gt;&#10; &lt;th&gt;Category&lt;/th&gt;&#10; &lt;th&gt;Data Type&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10; &lt;td&gt;Value Type&lt;/td&gt;&#10; &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;, &lt;code&gt;int[8-256]&lt;/code&gt;, &lt;code&gt;uint[8-256]&lt;/code&gt;, &lt;code&gt;address&lt;/code&gt;, &lt;code&gt;bytes[1-32]&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10; &lt;td&gt;Reference Type&lt;/td&gt;&#10; &lt;td&gt;&lt;code&gt;string&lt;/code&gt;, &lt;code&gt;bytes&lt;/code&gt;, &lt;code&gt;array&lt;/code&gt;, &lt;code&gt;mapping&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10; &lt;td&gt;Special Type&lt;/td&gt;&#10; &lt;td&gt;&lt;code&gt;enum&lt;/code&gt;, &lt;code&gt;struct&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;&lt;strong&gt;bytes[1-32], bytes and string&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;bytes[1-32]&lt;/code&gt; is a fixed-length byte array with a length range of 1 to 32 bytes. &lt;code&gt;bytes&lt;/code&gt; is a dynamic byte array, while &lt;code&gt;string&lt;/code&gt;, although essentially also a dynamic byte array, stores UTF-8 encoded character sequences and involves implicit UTF-8 encoding conversion operations. Therefore, if you need to store fixed-length byte data, such as hash values or identifiers, you can use &lt;code&gt;bytes[1-32]&lt;/code&gt;. For dynamic-sized byte data, such as file content or binary data, use &lt;code&gt;bytes&lt;/code&gt;. If it is text content, such as names or descriptions, use &lt;code&gt;string&lt;/code&gt;. Additionally, only &lt;code&gt;bytes&lt;/code&gt; has a &lt;code&gt;length&lt;/code&gt; attribute; to obtain the length of a &lt;code&gt;string&lt;/code&gt;, it needs to be converted to &lt;code&gt;bytes&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Built-in functions and keywords in Go</title><link>https://blog.hecmisio.com/posts/go/chapter_3/</link><pubDate>Thu, 20 Mar 2025 09:23:38 +0800</pubDate><guid>https://blog.hecmisio.com/posts/go/chapter_3/</guid><description>&lt;p&gt;The Go language provides many built-in functions and keywords to simplify the development process and support the core functionality of the language. However, some of these functions and keywords require extra attention during development as they can easily cause unexpected errors.&lt;/p&gt;&#10;&lt;h2 id="built-in-functions"&gt;Built-in Functions&lt;/h2&gt;&#10;&lt;h3 id="new-and-make"&gt;New And Make&lt;/h3&gt;&#10;&lt;p&gt;In the Go language, &lt;code&gt;new&lt;/code&gt; and &lt;code&gt;make&lt;/code&gt; are two built-in functions used for memory allocation, but they behave differently.&lt;/p&gt;&#10;&lt;p&gt;The &lt;code&gt;new&lt;/code&gt; keyword is used to allocate memory for a type and return a pointer to the zero value of that type. It can be applied to any type, including reference types, interfaces, and functions. However, interface pointers and function pointers are rarely seen as they are not very useful.&lt;/p&gt;</description></item><item><title>A Brief Overview of All Common Consensus Algorithms</title><link>https://blog.hecmisio.com/posts/blockchain/chapter_2/</link><pubDate>Wed, 12 Mar 2025 13:15:05 +0800</pubDate><guid>https://blog.hecmisio.com/posts/blockchain/chapter_2/</guid><description>&lt;h2 id="whats-a-consensus-algorithm"&gt;What&amp;rsquo;s A Consensus Algorithm?&lt;/h2&gt;&#10;&lt;p&gt;A consensus algorithm is a rule and protocol in a distributed system by which all nodes reach an agreement on a certain data state or transaction sequence.&lt;/p&gt;&#10;&lt;p&gt;In 1982, Leslie Lamport proposed the &amp;ldquo;&lt;a href="https://en.wikipedia.org/wiki/Byzantine_fault"&gt;Byzantine Generals Problem&lt;/a&gt;&amp;rdquo;, which studies how distributed systems can tolerate faults. The problem is set against the backdrop of a group of generals communicating through messengers to vote on whether to attack or retreat. Due to the possibility of traitors among the generals who may vote maliciously or impersonate other generals, or because messages may be lost or tampered with during transmission, the army ultimately fails to coordinate its actions.&lt;/p&gt;</description></item><item><title>Understand All Common Security Algorithms in One Article</title><link>https://blog.hecmisio.com/posts/blockchain/chapter_1/</link><pubDate>Sun, 09 Mar 2025 14:54:27 +0800</pubDate><guid>https://blog.hecmisio.com/posts/blockchain/chapter_1/</guid><description>&lt;h2 id="information-security-issues"&gt;Information Security Issues&lt;/h2&gt;&#10;&lt;p&gt;When data is exchanged over the network, it passes through various network environments and devices. During the transmission process, it may pass through the devices of some malicious users, which could lead to the theft of the content. When transmitting data over the network, four main issues are usually considered.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Eavesdropping: Messages are eavesdropped on during transmission.&lt;/li&gt;&#10;&lt;li&gt;Impersonation: Falsely claiming to be the sender or recipient of a message.&lt;/li&gt;&#10;&lt;li&gt;Tampering: The message was tampered with during transmission.&lt;/li&gt;&#10;&lt;li&gt;Denial: The act of a message sender denying their own act of sending the message afterwards.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="content-image"&gt;&#10;&lt;img src="https://blog.hecmisio.com/posts/blockchain/images/chapter_1-main-problems.jpg" width="100%"&gt;&#10;&lt;p&gt;Main Problems&lt;/p&gt;&#10;&lt;/div&gt;</description></item><item><title>The Technical Principles and Development Status of Bitcoin</title><link>https://blog.hecmisio.com/posts/blockchain/bitcoin/chapter_1/</link><pubDate>Wed, 05 Mar 2025 14:25:18 +0800</pubDate><guid>https://blog.hecmisio.com/posts/blockchain/bitcoin/chapter_1/</guid><description>&lt;h2 id="monetary-systems-rely-on-trust"&gt;Monetary Systems Rely on Trust&lt;/h2&gt;&#10;&lt;p&gt;When we conduct cash transactions, we usually exchange money for goods directly. The currency is issued by the state and backed by the state&amp;rsquo;s credit, so everyone recognizes its value. There are also various anti-counterfeiting mechanisms to check the authenticity of the currency, which also ensures the security of the transaction. From this, it can be seen that the recognition of the currency&amp;rsquo;s value and its security in transactions are the basic elements for the currency to be used in transactions.&lt;/p&gt;</description></item><item><title>The Best Way to Build an Image</title><link>https://blog.hecmisio.com/posts/docker/chapter_2/</link><pubDate>Sun, 23 Feb 2025 15:25:41 +0800</pubDate><guid>https://blog.hecmisio.com/posts/docker/chapter_2/</guid><description>&lt;h2 id="the-internal-structure-of-docker-image"&gt;The Internal Structure of Docker Image&lt;/h2&gt;&#10;&lt;h3 id="bootfs-and-rootfs"&gt;Bootfs and Rootfs&lt;/h3&gt;&#10;&lt;p&gt;Before introducing the structure of Docker Image, let&amp;rsquo;s first understand the file system of Linux. The file system of Linux can be divided into two parts: Bootfs and Rootfs.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Bootfs is the boot file system, mainly containing the bootloader and the system kernel. Its primary function is to load the kernel into memory during system startup. Once the kernel is loaded, Bootfs will be unmounted, so it is a read-only file system.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Rootfs is the root file system and also the user file system. It contains the directory structure and files necessary for system operation, such as &lt;code&gt;/etc&lt;/code&gt;, &lt;code&gt;/bin&lt;/code&gt;, &lt;code&gt;/usr&lt;/code&gt;, etc., and is the part that users can modify.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Overview of Container Technology and Docker</title><link>https://blog.hecmisio.com/posts/docker/chapter_1/</link><pubDate>Thu, 20 Feb 2025 17:13:06 +0800</pubDate><guid>https://blog.hecmisio.com/posts/docker/chapter_1/</guid><description>&lt;h2 id="virtualization-technology"&gt;Virtualization Technology&lt;/h2&gt;&#10;&lt;p&gt;Before delving into containers, let&amp;rsquo;s first understand what virtualization technology is. In the early days of computing services, each server typically ran only one application or service. To ensure stable and secure operation of the application, servers were usually equipped with configurations far exceeding the performance requirements, which led to extremely low resource utilization and significant waste of resources. Moreover, every time a new application or service needed to be launched, a new physical server had to be purchased, imposing high hardware and management costs on enterprises.&lt;/p&gt;</description></item><item><title>The Implementation Principle of Map</title><link>https://blog.hecmisio.com/posts/go/chapter_2/</link><pubDate>Wed, 19 Feb 2025 10:39:10 +0800</pubDate><guid>https://blog.hecmisio.com/posts/go/chapter_2/</guid><description>&lt;p&gt;Hash tables are a very common data structure and have different names in various programming languages, such as dictionaries or maps. In Go, they are called &lt;code&gt;map&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="design-principle"&gt;Design Principle&lt;/h2&gt;&#10;&lt;p&gt;Hash tables offer O(1) read and write performance and provide a mapping between keys and values. To implement a hash table, two points need to be noted - the hash function and the solution to hash collisions.&lt;/p&gt;&#10;&lt;h3 id="hash-function"&gt;Hash Function&lt;/h3&gt;&#10;&lt;p&gt;A hash function is a function that maps inputs of arbitrary length to outputs of a fixed length. Ideally, a hash function should map different inputs to different outputs, which requires the output range of the hash function to be larger than the input range. However, this is impossible, and the situation where different inputs are mapped to the same output is called a hash collision. A more practical approach is to make the results of the hash function as evenly distributed as possible to minimize the occurrence of hash collisions, and then use engineering methods to solve the hash collision problem. Therefore, the selection of a hash function is crucial for achieving a high-performance hash table.&lt;/p&gt;</description></item><item><title>Byte, Rune And String</title><link>https://blog.hecmisio.com/posts/go/chapter_1/</link><pubDate>Thu, 13 Feb 2025 10:58:33 +0800</pubDate><guid>https://blog.hecmisio.com/posts/go/chapter_1/</guid><description>&lt;h2 id="byte"&gt;Byte&lt;/h2&gt;&#10;&lt;p&gt;The &lt;code&gt;byte&lt;/code&gt; type in Go language is an alias of the &lt;code&gt;uint8&lt;/code&gt; type, which distinguishes the byte type from the integer type and fully supports ASCII codes.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;func&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&#9;&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sc"&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&#9;&lt;/span&gt;&lt;span class="nb"&gt;println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// 97&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;ASCII code is a computer coding system based on the Latin alphabet, using 1 byte (8 bits) for representation. The first bit of the 8 binary digits is uniformly set to 0, and the remaining 7 bits are used to represent specific characters. It can represent 128 characters, with the numbering range being 0-127. Among them, the displayable characters (A-Za-z, 0-9, English symbols) have a numbering range of 32-126, while 0-31 and 127 represent control characters.&lt;/p&gt;</description></item><item><title>Suzhou - Lhasa Cycling Log 2</title><link>https://blog.hecmisio.com/vlogs/vlog1/</link><pubDate>Tue, 28 Jan 2025 10:01:41 +0800</pubDate><guid>https://blog.hecmisio.com/vlogs/vlog1/</guid><description/></item><item><title>About Me</title><link>https://blog.hecmisio.com/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.hecmisio.com/about/</guid><description>&lt;p&gt;Welcome to my personal blog! Here I share the little moments of my life, my learning experiences and my hobbies. I hope to communicate and grow with more like-minded friends through this platform.&lt;/p&gt;&#10;&lt;h3 id="about-me"&gt;About Me&lt;/h3&gt;&#10;&lt;p&gt;I am an enthusiast for exploration and learning, and I enjoy documenting the little moments and thoughts in life. Whether it&amp;rsquo;s about technology, travel, reading, or the small discoveries in daily life, I hope to share them with everyone through words, pictures and videos.&lt;/p&gt;</description></item></channel></rss>