Mar 5A bit on Public-Key criptography.I have always wanted to learn cryptography. When I started studying blockchain, my desire became a necessity. The security of cryptocurrencies is maintained by cryptography, which is one of the pillars of a blockchain. So, at least the basics I needed to know; But I always strive for the basics…Cryptography10 min readCryptography10 min read
Published in Coinmonks·Feb 12Byzantine fault tolerance in blockchainThe Byzantine generals problem was proposed in the early 1980s by distributed systems researchers. It is an analogy that illustrates the problem faced in this environment very well. The main idea is that a group of generals are laying siege to a city and need to coordinate an attack. …Distributed Systems4 min readDistributed Systems4 min read
Published in Coinmonks·Feb 11Learn Ethereum programming #6. Transactions.Ethereum is a state machine. States are changed through transactions. Transactions need to be signed by a private key, and a fee will be charged to the account managed by that private key for executing the transaction, called gas fee. To send a transaction, the eth_sendRawTransaction method is used as…Ethereum6 min readEthereum6 min read
Published in Coinmonks·Jan 5Learn Ethereum programming #5. Externally Owned Accounts and cryptographyWe have already seen that there are 2 types of accounts on Ethereum, externally owned accounts (EOAs) and contract accounts. EOAs are managed by private keys and referenced in the Ethereum world state by their addresses. …Ethereum7 min readEthereum7 min read
Published in Coinmonks·Dec 30, 2022Learn Ethereum programming #4. JSON-RPC with Node.jsJSON-RPC is a remote call protocol whose data is encoded in JSON. Most blockchain clients serve requests sent via JSON-RPC. The protocol over which JSON-RPC is sent can be http, WebSocket, and in some cases gRPC. Practically every programming language has a module for sending requests via HTTP, so we…Ethereum4 min readEthereum4 min read
Published in Coinmonks·Dec 21, 2022Learn Ethereum programming #3. Ethereum accounts.There are 2 types of accounts on Ethereum, Externally Owned Accounts (EOAs) and contract accounts. EOAs are controlled by private keys, while contract accounts are controlled by the code itself. …Ethereum5 min readEthereum5 min read
Published in Coinmonks·Dec 17, 2022Learn Ethereum programming #2. Using Alchemy to send requests.Currently, to be an Ethereum node, you need to run at least 2 clients: an execution client and a consensus client. To be an Ethereum validator, you need to run a third program, which performs block validation and attestation. …Ethereum6 min readEthereum6 min read
Published in Coinmonks·Dec 14, 2022Learn Ethereum programming #1. Hello, JSON-RPC.Ethereum is a blockchain that allows writing smart contracts. Despite the name, smart contracts are pieces of code that are executed by a virtual machine. Thus, Ethereum can be considered a kind of global computer. Blockchain is a distributed system among computers around the world, where each computer is called…Ethereum6 min readEthereum6 min read
Published in Coinmonks·Dec 10, 2022Learn Solidity lesson 37. Creating and destroying contracts.There are three ways to create a contract account on Ethereum. Externally owned accounts can create contract accounts by sending a transaction to address zero (null address). The other two ways are using the CREATE and CREATE2 opcodes. Such opcodes can be invoked by smart contracts. Creating contracts through transactions EOAs create contracts by…Solidity7 min readSolidity7 min read
Published in Coinmonks·Nov 27, 2022Learn Solidity lesson 36. Cryptography and digital signature.The Ethereum virtual machine has a variety of cryptography-related opcodes, from hashing a generic set of bytes to verifying the authenticity of a signature. Solidity implements such opcodes quite simply. Let’s start with hash functions. Hash functions Solidity implements three cryptographic hash functions: keccak256, sha-256 and ripemd160. The Ethereum network largely uses…Solidity7 min readSolidity7 min read