Skip to content

Instantly share code, notes, and snippets.

@tarcieri
Last active August 7, 2021 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarcieri/47ad34fbdb3bf2eab558e3f9226f5717 to your computer and use it in GitHub Desktop.
Save tarcieri/47ad34fbdb3bf2eab558e3f9226f5717 to your computer and use it in GitHub Desktop.
Proposal for Warner-Portman-Sinema compliance for Proof-of-Stake (and other non-PoW) blockchains

Proposal for Warner-Portman-Sinema compliance for Proof-of-Stake (and other non-PoW) blockchains

The Warner-Portman-Sinema amendment to the forthcoming Bipartisan Infrastructure Framework stipulates that systems with the following property are exempt from compliance obligations:

validating distributed ledger transactions through proof of work (mining)

By default, systems which use consensus based on Proof-of-Stake (PoS) leader election mechanisms do not include a "proof of work (mining)" mechanism. To potentially comply with the proposed legislation, it would be possible to augment Proof-of-Stake consensus with a Proof-of-Work (PoW) mechanism to meet the verbeage in the amendment.

The following is a description of a minimal Proof-of-Work mechanism, inspired by the one used by Bitcoin.

First let's briefly describe the PoW mechanism used by Bitcoin:

  • Create proposed block
  • Compute SHA256d(block)
  • Examine if the resulting digest begins with N leading zeroes 0000...{N}, where N is the work factor
  • If the resulting block hash does not begin with the requisite number of zeroes, increment a counter and retry

To augment PoS with PoW mining, we propose a similar system with the following changes:

  • First we define a hashing scheme I(block), which returns the leading 8-bits of the block. This fulfils the same purpose as SHA256d(block) as used by Bitcoin.
  • Next, we prepend all blocks with an 8-bit counter. This is similar to the counter used in the Bitcoin scheme. The counter is initialized to 0
  • Finally, we examine if I(block) has a value of 0. If it does not, increment a counter and retry.

This scheme can be expanded to have a work factor N similar to the Bitcoin scheme. With a work factor, you multiply 8-bits * N to determine a requisite number of leading bytes over which I(block) should be computed. When I(block) succeeds for the initial octet, that octet is removed, and I(block) must be satisfied for the remaining data. This is repeated until I(block) has been computed N times.

This proposal hopefully satisfies the requirements of the proposed amendment in a way which meets the low-energy goals of Proof-of-Stake blockchains, which we think are important as Earth undergoes an evolving climate apocalypse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment