Resources

People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!

Median time-past as endpoint for lock-time calculations (BIPs 113)- 1888

BIPSPosted 1 Month Ago
  • Bitcoin transactions can include a lock time, meaning they cannot be mined until that time or block. Bitcoin blocks are not required to have increasing time intervals, for some reason.
  • This creates bad incentives: miners want to make money, and the user doesn't want their transaction included yet. By creating a block with a timestamp way in the future, it's possible to get other clients to accept the transaction as valid! This is regardless of the wall time.
  • The BIP proposal suggests using the median time of the last 11 blocks to determine whether a transaction can be spent. Since it's the median, there's no averaging issue here to deal with. This is important for the CHECKLOCKTIMEVERIFY opcode. Overall, a good fix to a bizarre issue affecting Bitcoin.