What are my thoughts about Ethereum smart contract development?

Backgrounds

I wanted to build my fundamental technical knowledge about the blockchain and Ethereum last year. The direct reason is that the appearance of uniswap is a shock to me and makes me think of more possibilities and opportunities in the new world. Making this decision depends on the below factors:

  1. My Competitiveness will grow alongside my improved understanding of the evolving technology. Compared to other information technology, distributed technology and blockchain technology are evolving every day. These are almost open to everyone; on the one hand, it is a pressure that prompts you must master many new skills and more concepts every day; on the other hand, The new land will offer many possibilities. And with time flies, the Compound Interest Effect will appear.
  2. I have always wanted to interact with the deployed contract because I have basic software development knowledge. But my limited knowledge about Ethereum development prevents me from more advanced development practices, such as writing smart contracts more effectively and understanding the security or gas optimation. From my past development experience and intuition, I think there is more content than we see on the surface, and many things are evolving. It's not easy that intend to write a smart contract and invest more energy and time.

For a long time, I focused on learning the basic knowledge and operations based on the above thoughts. The learning and practices include how to interact with smart contracts more efficiently, the basic understanding of the distributed technology, and the design of other essential chains such as NEAR, DOT, and AVAX. Sometimes I look at the whitepaper or yellow paper. But the annoying thing is that I constantly feel confused and wouldn't grasp the core concept.

Despite the confusion, I have a basic judgment that the numbers of people all over the China mainland who grasp the involved technology ( the distributed technologicol、smart contract development) at a high level are not so many. Though I'm not a high-level person, having a basic understanding is still a plus. More meaningful, as time flies, my knowledge and skills in this field are growing; if this technology changes the world like the internet, I think those steps I make will be powerful.

I find preethikasireddy's articles in this situation. some below

how-does-Ethereum-work-anyway

the-architecture-of-a-web-3-0-application

lets-take-a-crack-at-understanding-distributed-consensus

If you are interested in this topic, you will find these articles satisfy my demands and questions. On the one hand, It's giving me a high level of understanding of the entire block technology and introduce some technical details, such as how to calculate the approximate numbers of transactions in a block; on the other hand, some new attractive present or explanation gives me a different understanding, for example.

The Ethereum blockchain is essentially a transaction-based state machine. In computer science, a state machine refers to something that will read a series of inputs and, based on those inputs, will transition to a new state.

The EVM processes Ethereum's state transitions. We interact with the deployed smart contract through the EVM and eventually change the Ethereum states. Unlike other format computers or systems, everyone can interact with it every time. Perhaps this is a simple and basic explanation, but the introduction I never hear gives me a new understanding and feeling.

As we know, It's challenging to understand distributed technology; From these articles, I have seen the development of distributed technology as an ongoing research achievement by some scientists or researchers within the academic range. For a long time, distributed technology development focused on the technology implements, but Satoshi Nakamoto was the first person who combined distributed technology with economic incentives. This development history and the breakthrough which brought the revolution make me feel the gaps between me and the difficulties in understanding the technology are eliminated, along with the fantastic and exciting feeling.

One day I found the Dappcamps, which train the Ethereum development mainly for people who want to translate from web2 developer to web3 developer. The first reaction is this training is a challenge to absorb if they use English from beginning to end. But with the realization that much high-quality information or good innovation appears about web3 in the English world, I think trying to use English to study, practice, and communicate with other people has much more potential. Lastly, As you can see, there are many similarities or questions about my thoughts that can find in preethikasireddy's articles, such as the technical explanation about the critical top chains, focus on the Ethereum development, and above a word, the questions, and curiosity that motivate me to join.

Serendipity gains and exercises

How can one catch up with others' meanings in the English environment?

I can get the most meaning when I read the English information, but I always can't catch up with others' oral English. When I first communicated with Indian coaches, I couldn't make every word. But thanks to the chrome Live Caption, The English subtitles are simultaneously appearing. So getting the meaning of others' oral meaning is not a question for me.

When the first video course, which I watched by the tool(Live Caption), ended, I had a solid feeling that communicating with foreigners using English is not impossible if the below criteria one achieved.

  1. Synchronized feedback.

    The criteria require one can catch the meaning of what others are saying. You can like me through the tool or other ways. But synchronized getting the sense is the first.

  2. High-frequency and high-density.

    The high frequency requires you to keep thinking to catch up with what others say. The high density is there are many contents or new things you will encounter. The more thinking, the more content you absorb in the English environment. As a result, the unfamiliarity with English is low.

  3. Enough time is a must.

    Five or six minutes in this situation is not enough; you should stay in this situation for about one to two hours. The more you actively think or communicate, the effect better.

For me, getting the most meaning worked by the tool, if you can through yourself and more proactively, the effect is better. Many times, the powerful tools make me feel amazing. Hah.

The route to study smart contract development, which in my opinion

The standard process of grasping a programming language includes learning grammatical features, basic function library, or other third-party libs; if you have some basic program knowledge, You can quickly write business logic.

The differences involved solidity with the above process.

  1. Have a better understanding of the grammatical features.

    In my opinion or intuition, perhaps many programmers don't have an in-depth knowledge of the grammatical features when they use their language, such as Java Virtual Machine to JAVA. In the most productive environment, accomplishing the business login at a reasonable speed is the first thing. The more items, including the potential security problems and the more In-depth technology details, people always ignore, as a fact of the limited time or the lack of high-level person. In contrast, one could have faith that one must have a precise, comprehensive understanding of the solidity grammatical features from the beginning; otherwise, one bug means the hacked, which perhaps leads to a loss of several million dollars. Meanwhile, the frequency of the update about the solidity compiler is quicker than in other program languages (this should verify).

  2. A different development environment.

    Soft engineers can directly debug their developing system in web2 situations, such as credit review systems; they can see and modify some functions or variables depending on their need and do not require many steps. But in the web3, some things changed. You can't modify the smart contract code once deployed. The deployed environment is a blockchain(this refers to Ethereum), which can be a public test Ethereum chain(rinkeby、ropsten) or your local node(one can use hardhat or truffle to create a local node). It isn't easy to modify some functions, variables, and blockchain parameters(blocktimestamp、blocknumber). As a developer, these are frequent occurrences when you want to change some process or conditions to check your assumptions and want to take some inspiration. It's very uncomfortable that you can't do that. Fortunately, more tools for development or testing are maturing, including forge、tenderly. You can modify some code and blockchain parameters when your need or display the call traces more friendly.

  3. Security.

    There should be more attention and energy given to the security of web3. I think the paradigm transfer for the developer who wants from web2 to web3 includes understanding security. Critical awareness is what's the meaning when one writes smart contact. It's the users' monetary value and assets and the user's first concern about their money. The hacked incidents never stopped from" The Dao "was hacked.

A good security study entry. https://www.secureum.xyz/.

4. More program languages could be familiar.

Soft engineers have often used native languages such as JAVA, occasionally some front-end languages such as HTML, CSS, and javascript in my web2 development experience. But based on the practices of writing smart contracts, some new languages or features should be familiar. The primary language used is typescript when looking at Hardhat; One could use the basic lib(ethers.js, web3.js) to interact with the Ethereum, either directed or undirected. Some developers or builders know that more language usage will limit developers' time and energy. Hence, the community developed the tools such as foundry to write test cases only by solidity and supply fuzz-testing function, which can test security problems conveniently.

5. The power of tools.

The more tools I use, such as remix, hardhat, and forge..., the more the importance and help I strongly feel. One can write, test, and package in one IDE in web2 development. But a developer should use a few tools simultaneously for some situations in web3 development; let's show my troubled operations when I write smart contracts, code with VisualStudio, test or deploy by the hardhat or truffle. It's necessary to display different process flow when you need to explore many different operation results. For example, if you want to call one function under smart contract A and then call another function under smart contract B or vice versa, the remix is visualization under this situation. Another case we always encounter is that we want to transfer eth to some address. There are many options, such as through the javascript command under the truffle or hardhat environment or the meta mask wallet, you can import your test address, which sends eth is convenient and efficient.

As you can see, there are a lot of preparations when you write a smart contract. I divided it into the below components.

  1. The selection of test environment.

There are Ethereum test chains such as ropesten and rinkeby; you can configure the RPC setting through some online blockchain development suite such as infura or alchemy. You can also create a local node by hardhat, Anvil. The remix supplies many nodes configure you can choose, such as the injected VM.

2. Visualization of the operations.

You can manually operate different functions in the remix and see the results immediately on the web page. Or you can see the details through the ganache, like etherscan.com, when you create the local node. Recently, I'm familiar with the tenderly that you can see the details and simulator of the transaction or config the block parameters such as block timestamp or block number.

3. the selection of wallet

​ Metatask, through which you can import your address and test.

​ Hardhat: you always should use the js commands when you want to transfer eth in the hardhat environment.

4. the selection of debugging environment

​ The most used tool is the remix which can display the results conveniently and include other plugins such as git.

​ Hardhat, the main tools which many protocols as their development tools. The trouble is the need to write many test cases using javascript or typescript, So familiar or mastering the javascript and typescript is a need.

​ The information about the security problem or gas used will always help when debugging.

General overview and historical evolution of technology

I listened to the history of the internet development by one writer some years ago. From the BBS era to the web portal sites, and then the blog era, which users can supply content; Meanwhile, the related technology is evolving, such as static web pages which users only read and can't provide more content by themselves. What followed was the dynamic web page(such as JSP, AJAX) in which people could have more interactions. The more interactions include, people can write more content by themselves and publish it; ajax, which can asynchronous instant messaging, makes one web page interact with more services possible. As a result, the interaction becomes more exciting and more dynamic. Of course, the involvement of the technology includes many, not limited to these. This description has a counterpart for the definition of web1 and web2. Web1 can read; web2 can read and write.

There is an apparent feeling, perhaps not accurate, or it's my prejudices, or the reason is the limited engineers crowd I contact. More people always think they should learn the new technology as the technology is evolving quickly, and then they can have an opportunity to enter a top company and have a better work role. But more discussions and thoughts about the technology's history and background are few. This phenomenon or situation leads to the status of seeing the trees but not the forest; people always focus on the technical details or the very complicated problems, which consume more time and energy, but there are doubts in my opinion that this has actual results?

So this is the reason why a high level of understanding of technology is very important. For example, Ethereum is one status machine in which external users interact with the EVM to change Ethereum's global status.

source:preethikasireddy
source:preethikasireddy

What's the definition of the status? what are the components of the status? Not one transaction will change the entire Ethereum status, the transactions will be packaged into one block by a miner, and then the block is confirmed. The Ethereum status will be verified or changed In the realistic interaction environment.

Another case is the smart contract address.

External users interact with the Ethereum by the Ethereum address, which has two types: EOA (Externally Owned Account), CA(Contract Account), and different types of addresses lead to different interaction types.

With clarity about the fundamental problem, one could feel confident writing code or the importance of some essential knowledge such as hash function.

The third case is why gas exists? One reason is that Ethereum is the implementation of the Turing machine but leads to a defect that the exhaustion of resources by the malicious. The existence of gas makes the attackers have more economic burdens. The discussion of gas is the core topic in the Ethereum community, not only for the above reason but also for the miner's rewards、the Ethereum economic design, such as EIP1995, involved the adjustments of gas.

A high-level understanding gives one fundamental knowledge, which is a good map. For me, there are many interesting things; for example, BTC, which is very conservative, aims to become a cryptocurrency. Compared to BTC, Ethereum looks more radical in doing things that were impossible never before; to become the new form of computer that everybody can interact with every time and write the interaction by the developer's willing. Whenever I think about the point, I feel fascinated and motivated.

Close thoughts

I have some opinions which perhaps are my personal bias.

For soft engineers, especially the developers with a high skill level, the development of the on-chain ecosystem will supply the opportunity that one developer can, across borders, join the global product's development.

In most Chinese web2 companies, the developers' business logic experience was deeply bonded to the company and industry; As time goes on, the developer either enters the leader position or translates into another role. Meanwhile, Most people consider a developer at a high age writing code not a normal phenomenon in China.

But with the development of the on-chain ecosystem, the spread of the open-source culture, the verifies of personal contributions, and the on-chain enormous economic potential, I think this is an excellent opportunity for some developers who will not be limited to some companies, industries. Furthermore, the on-chain potential supplies more economics and social acceptance for those developers or geeks. The challenge is that this is not easy and will have many barriers to overcome if someone wants to achieve it.

I feel reading English technology articles is more straightforward and effortless to understand; perhaps it's only my feelings. In the meantime, there is an excellent perspective to observe or join the discussion in the English environment; the perspective prompts me to observe more and think more meaningful questions. In many situations, there are need to observe or join a high-level discussion which will make one have a better understanding; So It's significant to join a high-level community or the mind-like crowds.

Imagine we can enter the development of the global protocol, discussing questions alongside the programmers or other guys worldwide. We will witness the birth of a protocol, experience intercultural communication, and how the technology absorbs the world(if it was). That makes me very interesting and motivated.

Subscribe to tony
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.