stacks-network / docs

Unleash Bitcoin's full potential with decentralized apps and smart contracts. The documentation covers key aspects of the Stacks network and technology and provides tutorials and other helpful content for developers.
https://docs.stacks.co
Creative Commons Zero v1.0 Universal
156 stars 235 forks source link

[Edit docs] Bug fix: Incorrect explanation of leader block commits #1609

Closed netrome closed 4 months ago

netrome commented 4 months ago

URL of the page to change: https://docs.stacks.co/nakamoto-upgrade/nakamoto-in-10-minutes

This sentence:

As part of their block commit transaction, which is the transaction that commits the hash of the Stacks blocks to the Bitcoin chain, miners will also be required to add an indexed block hash.

is a bit unclear in what "hash of the Stacks blocks" refers to, but it seems to describe the old behavior in which miners committed to a block they intended to include in the chain. The sentence claims that the leader block commits will add another hash. However, the SIP states that the block header hash is replaced with (or more specifically, repurposed as) the indexed block hash.

As with the system today, miners submit their candidacy to produce blocks by sending a block-commit transaction on the Bitcoin chain. This proposal calls for altering the semantics of the block-commit in one key way: the block_header_hash field is no longer the hash of a proposed Stacks block (i.e. its BlockHeaderHash), but instead is the index block hash (i.e. StacksBlockId) of the previous miner's first-ever produced block.

We should update the doc so that it more accurately represents the SIP.