pull down to refresh
22 sats \ 0 replies \ @Majjin 3 Jun 2023 \ on: GitHub - LNP-BP/layer1: Paper on new bitcoin layer 1 design bitcoin
So here's my attempt at a summary. Doing this as a way to learn the protocol and hopefully help others understand it. Feel free to correct any mistakes or point out anything that's unclear!
Think of the new Layer-1 as kind of like a side chain. The difference is that the miners only provide a time-stamping service and transaction finality. The clients store and validate their own transaction data.
The time-stamping service is called Prime. Its basically like the Timechain, however it doesn't publicly store every transaction. Instead it stores headers, which include a Merkel root for all transaction data.
Here's more info on Merkle trees: https://www.youtube.com/shorts/UpW0gAkkkIw
Miners construct a new tree with each received transaction and include its root in the new header the miner is trying to mine. Clients must keep track of the their updated Merkle proofs by requesting newly constructed trees from the miners and discarding all parts of the tree doesn't have anything to do with their transaction.
Each transaction is in the form of a single-use seal. Spending a seal "closes" it. Each seal has a unique id, which is created from the witness. The witness is the required to spend from an unclosed seal. Seals also have the spending conditions required to close it.
To transact, the client must construct a witness for the unclosed seal they want to spend from. They generate a unique id from the witness and new spending conditions to create a new seal. They send the new seal and the Merkle proof for the old seal they're spending from to the miner. The miner checks to see if the new seal spends from an unclosed seal. If so, it is included in the new ephemeral Merkle tree.
Finally, there are three ways to link this protocol to the current Bitcoin Network:
-
An initial UTXO on the Timechain is created. This UTXO has an amount of sats just above the dust limit. It also contains a special single-use seal. This seal has the mined hash of the Prime genesis header. The UTXO can also be spent by anyone. That way any Prime miner can generate the next header. If the UTXO is spent by someone without the proper properties (invalid PoW, invalid merkle root, unspendable by anyone else, etc.) Anyone can create a new UTXO that's publicly identifiable with the proper properties. Only the first one of these new single-use seal UTXOs is considered the valid one. It is a one way trip for sats transferred to the new layer 1 if this method is used.
-
A soft-fork implementing zero knowledge proofs or drivechain.