Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JOURNAL] (Neerav) GB : 01-06 #4

Open
neerav1234 opened this issue Jan 17, 2022 · 0 comments
Open

[JOURNAL] (Neerav) GB : 01-06 #4

neerav1234 opened this issue Jan 17, 2022 · 0 comments

Comments

@neerav1234
Copy link

Name: Neerav Chittora
Book/ article to discuss - Grokking Bitcoin: 01-06

Questions:

1."You don’t need to register or sign up anywhere to use Bitcoin", Then how does the network identify us?
Soln - Bitcoin uses the system of public and private key pairs to identify the account. You generate a private key and derive the corresponding public key to use Bitcoin. You sign your transaction with your private key and the network verifies it with the corresponding public key.

  1. What is the difference between a miner and a full node?
    Soln - A (full) node contains the whole blockchain. With this knowledge, this node can check if new transactions actually are OK. Although not strictly necessary, a miner is a full node(so with complete knowledge of the blockchain) which additionally creates new blocks compared to just nodes that only validate the information.

  2. Why do full nodes work if they don't get mining rewards and transaction fees?
    Soln - While there are no monetary rewards, running a full Bitcoin node comes with its own intangible benefits. For example, it increases the security of transactions conducted by a user. This is especially important if you plan to conduct multiple bitcoin transactions in a day, then verifying them yourself is a better idea.

  3. From where does bitcoin get its value?
    Soln - The main source of value for Bitcoin is its scarcity. The argument for Bitcoin's value is similar to that of a gold commodity that shares characteristics with the cryptocurrency. The cryptocurrency is limited to a quantity of 21 million. Bitcoin's value is a function of this scarcity. As the demand increases, its value increases and vice versa.

  4. What does a Transaction contain?
    Soln - A Transaction basically consists of inputs, outputs, and signature.
    Hashes of Unspent transaction outputs to be used for the transfer are called inputs, It is signed by the private key corresponding to the pkh used in the input, contains a corresponding public key, and the outputs which contain the pkh of the receiver and amount to be spent.

  5. What is mempool?
    The mempool (memory pool) is a smaller database of unconfirmed or pending transactions which every node keeps. When a transaction is confirmed by being included in a block, it is removed from the mempool.

  6. What is the difference between the processing of a p2pkh transaction and p2sh transaction?
    Soln - Pay-to-Public-Key-Hash (P2PKH) is a type of transaction that spends bitcoin to the hash of a public key. Pay-to-Script-Hash (P2SH) is a type of transaction which allows for the spending of bitcoin-based on the satisfaction of any script provided by the sender. P2SH is used for various special purposes like multisig and SegWit transactions.

  7. Are scripts auto executed in a Bitcoin transaction? How are the scripts executed in a transaction?
    Soln - Scripts get executed when transactions go need to be processed/verified. It's like a small program and it varies depending on what the tx wants to do. The script is stack-based and is therefore not Turing complete - you can't write all kinds of smart contracts in it but you can write some, ex: HTLC used heavily in Lightning. Anyone can make scripts, it has opcodes assigned to each stack operation - you just serialize and publish them to the network.

  8. Why is it impossible to alter a block in a blockchain?
    Soln - In a blockchain, each block contains the hash of the previous block header (called the block id) in its header. In this way, as the new block keeps adding in the blockchain they act as a new cover of security for all the old blocks. In order to alter a block in the blockchain, a hacker has to alter all the blocs ahead of it.
    Overall, modifying transactions already in the blockchain requires remaining blocks, and after a transaction already has a few confirmations, doing this requires immense amounts of computing power. So much computing power is required that modifying blocks is effectively impossible to do.

  9. Why is it worthed to waste this much amount of resources on a blockchain?
    Soln - It appears to be more resource-intensive than a non-blockchain solution. But you gain other system properties that are only very hard to achieve with an alternative solution. Like with every tool, if you use it for the right purpose, then you are more efficient than with other tools. It provides many other benefits like:
    -Better Transparency
    -Enhanced Security
    -Reduced Costs
    -True Traceability
    -Decentralized structure
    -Immutability
    -Individual control of data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant