Basic concepts of block chain

Yechan Jeon·2022년 1월 13일
0

Blockchain theory

목록 보기
1/1
post-thumbnail

Blockchains Benefit

  1. Decentralized (Think about robin hood and game stop issue)
  2. Blockchain is Transparent & Flexible (Everyone can see records and Everyone follow same rules.)
  3. Trustless (You don’t need to trust third-party as you did with centralized service because all the rules of blockchain world follows logical algorithm)
  4. Security & Immutability (Even if malicious user lock down some of blockchain account, because of characteristics of blockchain, your data can be secure and also that kind of behavior will be banned)
  5. Removal of counterparty risk (your transaction will be verified by miners whether it is valid transaction or not)
    Main point : Freedom + Trustless

DAO

  • Decentralized organization which lives on smart contract.
  • Party member possess governance token.

Metamask

  • User auth for entering blockchain (it generates account)

  • Different access type of metamask
    - Menemonic – all of your accounts – should kept private
    - Private key – 1 of your accounts which set private key – should keep private
    - Public – nothing – it’s public

  • Main net vs test net
    - Main net is real network
    - Test net is for testing contract or application before deploying it into Main net.
    - You can check in transactions ‘gas fee’. Gas feel is needed to pay for miner’s incentive when you execute transactions.
    Currently, Account can set max gas fee per transactions and legitimate amount of gas will be taken by miners. Rest of gas feel which is not used for transactions will be refunded to sender.

  • Hash : a unique fixed string, meant to identify a piece of data.
    One data only corresponds to only one specific hash value (Hash value is generated by hashing algorithm like SHA256, Keccak256 for Ethereum).
    No matter how you put a huge length of data in input, Hash value length always be same (It is same when input is so small or empty).

  • What the miners do is solving hash values. There is a ‘nonce’ which is hashed together with input data. Nonce generate a unique hash value with data. The Miner’s role is to find right nonce value and match it with expected hash value. Every blockchains will have different ways to solve problem, but the core concept is going to be same.

  • In Blockchain, new block always refers to previous block hash value and hash it together. So if there is any little changes in parent blocks, all the following blocks will be invalid. Genesis block : a first block in the block chain.

  • There is many blockchains in Virtual machine ( E.g peer A, peer B, peer C)
    If There is a any changes among these blockchains, All blockchains compare hash values and detect any malicious behavior.

  • Regarding to external account transactions (simply transferring ethers to other account), A hacker may be able to try changing values of transferring or manipulating both receiver and sender.
    However, all the transactions is recorded on all the blockchains by miner, If one block has different hash value, it will be easily detected.

  • By the way, To get to know whether both sender and receiver is valid , not about transferring value, we need to care about private / public key. (Like Meta mask has keys)
    Private key : only known to the key holder, it’s used to sign transactions.
    To generate public key, Ethereum use Elliptic Curve digital signature algorithm(ECDSA).
    We use private key like a password, sign transactions with it and people verify transactions with public key.
    For example,
    Message + Private key(signing process) = signature = Message + public key(verifying process)
    But , Private key != public key (But, public key comes from private key. That is why it is really important to keep private key securely).

  • Node : A single instance in a decentralized network.
    We saw peers in blockchain example, Node is one of the peers.
    In centralized server, There is a lot of user who requests the server and There is one server which responses to. A company or enterprise control the sever.
    However, In decentralized Network, There is a lot of nodes and they keep whole network as a member of the network. Anyone can join the network.
    Because Ethereum has huge size of nodes, There is almost no possibility to down network and just one malicious node can be detected by other nodes and kicked out.

  • Consensus mechanism: POW || POS
    Consensus mechanism can be broken down in two pieces. Chain Selection and sybil resistance.
    Sybil resistance prevents a malicious attacker from creating pseudo ids and trying to monopoly network(sybil attack).
    To prevent this kind of behaviors, Sybil resistance has tow kind of proof algorithm: Proof of work, Proof of stake.
    POW : mining.
    Chain selection rule is a rule to identify whether is a true blockchain.
    Ethereum use Nakamoto consensus. (combination of pow and chain rule)

  • Under the proof of work algorithm, Each nodes compete to verify new block first and this behavior causes a lot of energy.

  • In POS , there are validators instead of miners. Nodes are randomly chosen to propose the new block and then the rest validator nodes verify it.
    Randomness is really important because blockchain follow contract rule.
    POS is massively decentralized and environment-friendly.

  • Scalability.
    This is also important issue. If a lot of people send transactions with high-frequency, The gas fee will be so much higher than before. It makes it hard to expand network.
    It is kind a paradox because we want to add more and more people in blockchain world.
    To figure out this, Eth2 currently working on sharding.
    Sharding is one of solution for scalability. It is blockchain of blockchain. There is a sub chain and main chain. Sub chain are hooked into main chain like branches. Sharding increases block space in ‘layer 1’.
    Layer 1 : Base layer blockchain implementation.
    Layer 2 : Any application built on top of blockchain (e.g Arbitrary , Optimism )
    The good thing is Layer 2 application trying to solve scalability problem and they are known as roll-ups.
    Roll ups derive their security from base blockchain.

profile
방황했습니다. 다시 웹 개발 하려고요!

1개의 댓글

comment-user-thumbnail
2023년 9월 13일

If you are not very well versed in blockchain technologies or have never heard of them at all, I advise you to learn more about the Wakweli certification protocol, which will be very useful for investors in the NFT market. There is still too high a risk of encountering scammers, and such certificates of authenticity that this protocol issues can become a guarantee of your safety and rights to the purchased NFT.

답글 달기