Skip to content

Instantly share code, notes, and snippets.

View ShaunApps's full-sized avatar

Shaun ShaunApps

View GitHub Profile
@ShaunApps
ShaunApps / bitdevs-trivia.md
Last active November 11, 2021 17:16
TABconf BitDevs Socratic Village Trivia Questions

These are the trivia questions from the BitDevs Socractic Village at TABconf. Looking up answers was not allowed during trivia game

Easier Questions

  1. What number does a P2SH address start with?

  2. What signature scheme comes with Taproot?

  3. How many blocks are in each difficulty period?

Why prime fields?

F17 = {0, 1,..., 16}

G = 6

G * x % 17:

6 * 0 = 0

Stuff I learned about Coinbase transactions

  • The coinbase transaction can assign the entire reward to a single Bitcoin address, or split it in portions among multiple addresses, just like any other transaction. Coinbase transactions always contain outputs totalling the sum of the block reward plus all transaction fees collected from the other transactions in the same block.

  • What is the format of a coinbase transaction?

    • It has exactly one txin
    • This txin's prevout hash is 0000...0000.
    • This txin's prevout index is 0xFFFFFFFF
  • The txin's prevout script is an arbitrary byte array (it doesn't have to be a valid script, though this is commonly done anyway) of 2 to 100 bytes. It has to start with a correct push of the block height (see BIP34).