7/24/2024 - technology-and-innovation

You want to work in Web3, then this is for you "Part 3".

By Martin H. Pefaur

You want to work in Web3, then this is for you "Part 3".

Want to Work at Web3 - "Part 3".

In this article, we continue to go over the basics that you should absolutely know before applying for an interview for a position at Web3.

Ethereum

What is Ethereum?

Ethereum is a decentralized, open source blockchain with smart contract functionality.

What is Ether?

Ether is Ethereum's native cryptocurrency. It provides incentives to nodes to validate blocks on the Ethereum blockchain.

Mention some Ethereum development and testing environments.

- Truffle

- Hardhat

- Brownie

What is Ethereum's block size?

Ethereum does not have a block size limit; blocks use gas limits.

What is Ethereum's block reward?

Currently, it is 2 ETH. But this number could change in the future.

What is Ethereum's block time?

The average block time is around 13.2 seconds. But this value can fluctuate.

What is the smallest unit of Ether?

1 Wei (10 ** 18 Wei = 1 Ether).

Order the denominations correctly: Gwei, Mwei, Kwei, Ether, Wei, microether, milliether.

Wei, Kwei, Mwei, Gwei, microether, milliether, Ether.

Who founded Ethereum?

Ethereum was founded by Vitalik Buterin, along with seven other co-founders. One of them is Gavin Wood.

When was Ethereum launched?

2015.

How is Ethereum different from Bitcoin?

Ethereum uses blockchain technology not only to maintain a decentralized payment network, but also to store computer code that can be used to execute decentralized, tamper-proof smart contracts.

What are smart contracts?

A smart contract is a program that runs at one address on Ethereum. They are composed of data and functions that can be executed upon receiving a transaction.

What is EVM?

EVM is the acronym for Ethereum Virtual Machine. The EVM acts as a global computer that lends its accumulated computing power to developers. The EVM can be accessed from anywhere in the world through participating Ethereum nodes.

What is Enterprise Ethereum?

Enterprise Ethereum is a permissioned version of Ethereum. Permissioned means that only authorized nodes can join. The Ethereum mainnet is permissionless, as anyone can set up a node. In addition, private chains can be set up with restricted access to their data.

What is a node in Ethereum?

A node is a computer connected to the Ethereum network, responsible for processing transactions.

How can you connect to a node?

You can connect to a node using WS-RPC, JSON-RPC and IPC-RPC.

What consensus mechanism does Ethereum use?

Ethereum currently uses proof of Stake, although in originally used proof of Work, this change was known as "Merge" or "Ethereum 2.0".

What programming language is used to write smart contracts in Ethereum?

Solidity is the main programming language used to write smart contracts and dApps. Vyper is also used.

Mention common smart contract standards.

- ERC-20: Token standard

- ERC-165: Standard for publishing and detecting which interfaces implement a smart contract.

- ERC-721: Non-fungible token standard

- ERC-1155: Multi-token standard

What is an integer overflow/overflow?

Integer overflows and overflows occur due to inputs whose size does not meet the limits of integer variables. To avoid this, be sure to use a compiler version of Solidity > 0.8, which automatically checks for overflows and overflows.

What is frontrunning?

Transactions take time before they are mined. An attacker can look at the transaction pool and send a transaction, include it in a block before the original transaction. This mechanism can be abused to reorder transactions in favor of the attacker.

What is the account nonce in Ethereum?

It is the transaction count of an account. It prevents replay attacks.

How can you get Ether?

Ether can be obtained by mining or exchanging Ether with other cryptocurrencies.

What are the two types of Ethereum networks that exist?

- Public networks (mainnet, test networks: Ropsten, Goerli, Kovan, Rinkeby).

- Private networks (Enterprise Ethereum, local networks).

Why are gas fees charged?

Consensus building in a decentralized system must cost something, because it motivates all participants to maintain the optimal reality.

How much gas does a simple transaction cost on Ethereum?

A simple transfer of value requires 21,000 gas.

How many transactions fit in one Ethereum block?

There is no general answer for this, as transactions use different amounts of gas and a block is variable in size (depending on network demand).

How are transaction fees calculated on Ethereum after the London update?

Gas units (limit) * (base fee (in Gwei) + priority fee (tip)). Miners get the tip and the base fee is burned.

What is an ABI?

ABI is the acronym for Application Binary Interface. The ABI is the interface to interact with our smart contract. The ABI can be generated from the source code of your smart contract (you must compile it).

What do you need to interact with a deployed smart contract?

You need the contract address and the ABI. The contract address points to where the bytecode is located on the blockchain. The ABI defines which functions you can invoke.

How are smart contracts stored on the blockchain?

They are stored as bytecode (binary data) under a specific address, also known as the contract address.

Solidity

Why should a developer define a version of Solidity at the beginning of a file?

It reduces incompatibility problems that can occur when compiling with another version.

Why is it difficult to generate random numbers in a smart contract?

Solidity contracts are deterministic. Anyone who discovers how your contract produces randomness can anticipate its results and use this information to exploit your application.

How can random numbers be generated in a smart contract?

To make random numbers unpredictable, you must use an oracle to produce randomness outside the chain. A popular way is to use ChainLink VRF.

Why do smart contracts written in Solidity or Vyper need to be compiled?

The EVM does not understand these high-level languages. Therefore, the source code must be translated into machine language (bytecode) that the EVM can execute.

Explain the naming conventions for contracts and functions in Solidity.

Contract names must be capitalized (e.g., TestContract). Function names should be in mixed-case (e.g., superDuperFunction).

Do all functions in a smart contract cost gas?

Functions that modify the state of the EVM cost gas, while functions that only read state are free.

List all valid data types in Solidity.

Boolean, Integer, Address, Byte/String, Enum. The data type "Fixed Point Numbers" also exists, but is not yet fully supported.

What is the result of 7/2 in Solidity?

It is 3 because the decimal is truncated.

Which data types are not valid keys in a mapping?

The key can be any built-in data type, but reference types are not allowed. Not allowed: Mapping, Struct, Enum or dynamically sized Array.

What is the advantage of defining a fallback function in Solidity?

It helps us protect the function from throwing an error.

In what two scenarios is a fallback function (defined as payable) called in Solidity?

- A contract receives only ether and no data(msg.data).

- No function name matches the called function.

What is special about the fallback function in Solidity?

- It has no name, arguments, or identifier.

- It cannot return anything.

- It can only be defined once per contract.

- It is mandatory to mark it as external.

- It is limited to 2300 gas when called by another function.

What is the difference between ERC and EIP?

- Ethereum Request for Comments (ERC) defines standards for the use of Ethereum.

- Ethereum Improvement Proposals (EIP) improve the Ethereum protocol itself.


With this we conclude with the basic and not so basic concepts. If you want to know more about it I invite you to see the courses that Fin Guru has available for lovers of the blockchain world!

Leave me a comment if you found this content useful.

Do you want to validate this article?

By validating, you are certifying that the published information is correct, helping us fight against misinformation.

Validated by 0 users
Martin H. Pefaur

Martin H. Pefaur

I lead P4 Tech Solutions, a cutting-edge software factory focused on blockchain and AI. Our mission is to bring founders' ideas to life and promote product adoption. Notable projects include FinGurú, Chatizalo, Ludus Game, Number One Fan, Hunter's Pride, VeriTrust Protocol, Matrix-Tickets, Realtok DAO, Resilientes & Speezard DAO, and others. Actively shaping the future of blockchain and AI.

TwitterLinkedin

Total Views: 10

Comments