BrianSutioso
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- tags: Homeworks --- # HW 2: Bitcoin :::info **Released:** February 12th, 11:59pm EST **Due:** February 22th, 11:59pm EST ::: ## Instructions Submit your answers to the following problems on [Gradescope](https://www.gradescope.com/). Information to help you answer these questions may be found in the lecture slides, recordings, and notes. ## Problem 1 (10 points) Suppose that Bitcoin's current minting reward is $R$, and that a miner $M$ mines a block with total transaction fees of $F$. Transaction Outputs are defined as: $\{\textrm{amount, public key}\}$ Let $F, F', N \in {\rm I\!R^+}, \textrm{ and } N < F' < F$. Suppose that the block's coinbase transaction is as follows: :::info $\textrm{Inputs}: \{\}$ $\textrm{Outputs}: \{\{R, PK_{0} \}, \{F'-N, PK_{1}\}, \{N, PK_{2}\}\}$ ::: If this block is included in the chain, which of the following statements are necessarily true? - [ ] $M$ is a participant in a mining pool - [ ] $M$ is infiltrating a mining pool, and has diluted the rewards for miners within that pool - [ ] Collectively, the transaction senders in this block receive a refund of $F - F'$, proportional to the transaction fees that they included in their transactions - [ ] The maximum long-run total supply of Bitcoin remains the same - [ ] The transaction is malformed, as it does not contain any valid inputs ## Problem 2 (10 points) Alice has a set of elements $S = \{e_0, . . . , e_{n−1}\}$. Recall that in a Merkle tree representation of $S$, each leaf $i$ is labeled with $H(e_i)$, and each internal node is the hash of the concatenation of its two children. The tree’s root is called the **root hash**. Alice wants to prove to Bob that $e_i \in S$. Which of the following statements are true (2 points each)? - [ ] The primary hash function property underlying the security of the merkle tree is preimage resistance. - [ ] It is enough for Alice to send Bob $[\mathrm{log}_2n] + c$ hash values to prove $e_i \in S$ , where $c$ is a constant independent of $n$. - [ ] Bob has access to all of the transactions contained in a block $B$. Carol has block $B$ on her blockchain. To check whether Carol has tried to tamper with the set of transactions included in $B$, Bob only needs to request the root hash from her. - [ ] Instead of taking the hash of the concatenation of a node’s two child hashes, it would be equally secure to take the hash of their product. - [ ] Suppose Alice uses a $k\mathrm{-ary}$ tree, $k ≥ 2$, where every non-leaf node has up to $k$ children, and is labeled with the hash of the concatenation of the child hashes. It is enough for Alice to send Bob $[\mathrm{log}_kn] + c$ hash values to prove $e_i \in S$, where $c$ is a constant independent of $n$. ## Problem 3 (4 points) Suppose that Alice owns **10 BTC**. The conversion rate from BTC to USD is $1:10$. She owns no other cryptocurrencies. Recently, debates about Bitcoin's block size have been raging, and a faction of the Bitcoin developers have decided they will fork from Bitcoin and create a new cryptocurrency called Bitcoin Cash (ticker: BCH). Bitcoin Cash operates exactly the same as Bitcoin, except that the block size is double that of Bitcoin. Thus, Bitcoin UTXO are also valid UTXO on Bitcoin Cash. Coinbase, a cryptocurrency exchange, decides to include Bitcoin Cash in its list of assets. Coinbase's conversion rates are as follows: **BTC** to **USD**: $1:7$ **BCH** to **BTC**: $11:2$ **ETH** to **BTC**: $3:20$ What happens to the total value of Alice's cryptocurrency holdings? - [ ] Increases - [ ] Decreases - [ ] Stays the same - [ ] Cannot be known Alice decides to purchase a pizza slice using **BCH**. What happens to her total number of **BTC**? - [ ] Increases - [ ] Decreases - [ ] Stays the same - [ ] Cannot be known ## Problem 4 (10 points) Which of the following are potential inefficiencies in Bitcoin? - [ ] The POW consensus algorithm, due to its inability to provide consistency guarantees. - [ ] The block size, which severely limits Bitcoin's transaction throughput. - [ ] Forks are difficult to recover from: anytime there is a fork, it can take days for nodes to come to consensus - [ ] Validation times are long: a merchant may have to wait several hours before a transaction is "confirmed" - [ ] Bitcoin mining requires a lot of unused storage space power (one GB = one vote). The unused storage space would be better used elsewhere. ## Problem 5 (6 points) Suppose that Carol operates a Blockbuster in Dallas, Tx and it's currently 2010 (Bitcoin hasn't taken off yet). She's friends with Satoshi Nakamoto, who's trying to convince her to accept Bitcoin as payment for movie rentals. Carol decides to support Satoshi, and starts accepting Bitcoin as payment. However, Carol isn't familiar with the intricacies of Bitcoin and doesn't require any confirmations on Bitcoin transactions. Alice wants to rent *How To Train Your Dragon 2* and pay 1 BTC for that rental. **Transaction Outputs** are defined as: $\{\textrm{amount, public key}\}$ Alice creates two transactions and pre-mines block $B_B$, which includes Transaction B. $\textrm{Input}_1$ is valid. ### Transaction A: :::info $\textrm{Inputs}: \{\textrm{Input}_1 \}$ $\textrm{Outputs}: \{\{1, PK_{Carol}\}, \{2, PK_{Alice}\}\}$ ::: ### Transaction B: :::info $\textrm{Inputs}: \{\textrm{Input}_1 \}$ $\textrm{Outputs}: \{\{3, PK_{Alice}\}\}$ ::: Carol accepts Transaction A as payment, immediately broadcasting it to local nodes in the network. At the same time, Alice broadcasts $B_B$ to the network. Which of the following statements are **true**? - [ ] Nodes treat block $B_B$ as malformed, since it includes a transaction with an already spent UTXO (Transaction B) - [ ] Transaction A has the same fee as Transaction B - [ ] This is an example of a 51% attack ## Problem 6 (6 points) Each Bitcoin node keeps track of a **UTXO Set**, which contains all of the spendable outputs on the Bitcoin network. This set reflects the UTXO on the node's current chain. When a fork occurs, a node has to update its UTXO Set to reflect the changes caused by the new blocks in that fork. When a node hears about a longer chain with more POW, it orphans its existing chain and adopts the new one. In adopting the new one, the node must update its UTXO Set by reversing the changes caused by the blocks from the old, now orphaned chain. Suppose that node $N$'s current chain is: :::info $Chain_0: B_0 \longrightarrow B_1 \longrightarrow B_2 \longrightarrow B_3 \longrightarrow B_4\longrightarrow B_5$ ::: Now, suppose that $N$ hears about $Chain_1$, a longer chain with more POW: :::info $Chain_1: B_0 \longrightarrow B_1 \longrightarrow B_2 \longrightarrow B_3 \longrightarrow B_6\longrightarrow B_{7} \longrightarrow B_{8}$ ::: $N$ wants to mine on the longest chain, so it must update its UTXO Set to reflect $Chain_1$'s UTXO. This updating process involves "reverting" blocks: for each block it reverts, $N$ must (1) erase that block's newly created UTXO and (2) reestablish the inputs used in that block as valid UTXO. Which of the following statements are necessarily true? - [ ] $N$ must "revert" blocks in LIFO order ($B_5$ before $B_4$), in case $B_5$ contains outputs from $B_4$. - [ ] $Chain_1$'s UTXO Set contains a larger number of UTXO than $Chain_0$'s. - [ ] $Chain_0$'s UTXO Set is worth more than $Chain_1$'s (assume no burning has occured) ## Problem 7 (10 points) Bitcoin's energy debate has existed for almost as long as Bitcoin itself. The conversation typically revolves around the acknowedgement that Bitcoin **takes a large amount of energy to resolve any one transaction** (with a total energy expenditure per year greater than some small countries), **it is overall slow in terms of transaction throughput**, and that it seems to be **dwarfed in both efficiency and speed by something like Visa**. For more detailed information about this debate, feel free to refer to articles you find by yourself, or these **compiled resources that feature differing perspectives ([1](https://www.coindesk.com/markets/2021/02/08/what-bloomberg-gets-wrong-about-bitcoins-climate-footprint/), [2](https://www.coindesk.com/business/2021/03/05/the-frustrating-maddening-all-consuming-bitcoin-energy-debate/), [3](https://news.climate.columbia.edu/2022/05/04/cryptocurrency-energy/), [4](https://www.weforum.org/agenda/2022/03/crypto-energy-consumption/), and [5](https://hbr.org/2021/05/how-much-energy-does-bitcoin-actually-consume))**. For this problem, you will be tasked with writing **two responses**, each less than 100 words. Your responses will be graded on effort as well as demonstrated understanding. **A) In your first response**, summarize the energy debate around Bitcoin and highlight what you think are some **key insights**, as well as what you believe to be some **misconceptions or inaccuracies.** **B) In your second response**, briefly explain the comparison between **Bitcoin and Visa** and point to some reasons why they may be **considered to be similar** as well as some alternate reasons for **why they differ** (whether that be in function, implementation, philosophy, or some other category entirely).

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully