Drivechains อนุญาตให้ผู้ให้บริการโหนด Sidechain จ่ายเงินให้ผู้ขุดเหมือง — และอีกมากมาย!

By Bitcoin นิตยสาร - 1 ปี ที่แล้ว - เวลาอ่าน: 7 นาที

Drivechains อนุญาตให้ผู้ให้บริการโหนด Sidechain จ่ายเงินให้ผู้ขุดเหมือง — และอีกมากมาย!

Drivechains, like softchains, are another sidechain implementation with two-way peg functionality.

นี่คือบทบรรณาธิการความคิดเห็นโดย Shinobi นักการศึกษาที่เรียนรู้ด้วยตนเองใน Bitcoin พื้นที่และเทคโนโลยีที่มุ่งเน้น Bitcoin โฮสต์พอดคาสต์

This time I'm going to be breaking down and discussing how drivechains work; they were initially proposed in 2015. Out of all the proposals discussed so far, drivechains are the oldest and the most fleshed out in terms of specific implementation details and design, documented in BIPs 300 และ 301. Paul Sztorc ผู้สร้างแนวคิด มีเป้าหมายในการออกแบบหลักสองสามข้ออยู่ในใจ และแม้ว่าจะยังไม่ครอบคลุมทั้งหมด แต่นี่คือบางส่วน:

Isolate each sidechain so any failure or problem would only affect those using it.Allow sidechains to be spun up without needing a new fork for each one.Enable the transfer of bitcoin in and out of a sidechain with a two-way peg.Allow for free experimentation in design he hopes would obsolete the need for altcoins.

There are two primary aspects of the entire design, which is why there are two separate BIPs. The first is the peg mechanism (BIP300), which is what enables the two-way peg to function. Sztorc designed something called a hash rate escrow, which, in the most basic terms, is allowing miners as an amorphous group to collectively custody the coins in all the sidechains. The second is a "blind" merged mining scheme, where the goal is to allow bitcoin miners to be the block producers at a consensus level without being required to validate the sidechain to do so. Both of these pieces together present a two-way peg mechanism and a way for bitcoin miners to take part in mining the sidechains while attempting to mitigate the centralization risk that it presents.

BIP300 ระบุตรรกะสำหรับข้อเสนอของ sidechain ใหม่ การเปิดใช้งาน sidechain ใหม่ ข้อเสนอของชุดการถอนเงินที่รวมกัน การอนุมัติชุดของการถอนเงิน ตรรกะการตรวจสอบความถูกต้องสำหรับธุรกรรมการถอนจริง และการตรวจสอบสำหรับธุรกรรมการฝากเงิน

Activating a new sidechain under the drivechain proposal is very similar to the process of a soft fork activated through miner signaling. The major difference is, of course, it's not actually a soft fork — a single fork to activate the drivechain consensus rules allows miners to, at any time, signal to activate a new sidechain ภายใน กฎฉันทามติของ drivechain ในการเสนอให้เปิดใช้งาน sidechain ใหม่ ผู้ขุดจะต้องวางข้อมูล OP_RETURN ในเอาท์พุต coinbase ที่มีตัวระบุเฉพาะสำหรับ sidechain นั้น กุญแจสาธารณะเพื่อใช้ในการดำเนินการฝากเงิน ข้อมูลเวอร์ชัน คำอธิบายที่มนุษย์อ่านได้ และแฮชของซอฟต์แวร์ไคลเอ็นต์ และประวัติ GitHub ของมัน (ไม่มีการบังคับใช้ฉันทามติที่นี่ เป็นเพียงข้อมูลสำหรับมนุษย์ที่จะอ้างอิง)

When a miner proposes activating a new sidechain and including all the necessary data in their coinbase, it becomes a sort of "miner signaling" period regarding whether or not to create this new sidechain from the point of view of mainchain consensus. A miner can use a special format to include a proposal in their coinbase outputs, and other miners can create another output following a second format to signal for activation. A new sidechain proposal requires 90% of blocks in a difficulty period to signal for activation in order for a new sidechain creation to be confirmed. This creates the peg mechanism to enable the sidechain, but the interaction between sidechain and mainchain is more nuanced than that.

ณ จุดนี้ ทุกคนสามารถตรึงเหรียญไว้ใน sidechain ได้ ในการตรึงลงใน sidechain ผู้ใช้เพียงแค่สร้างธุรกรรมอินพุตสองรายการด้วยอินพุตของตนเอง และ UTXO ที่สอดคล้องกับยอดคงเหลือของ sidechain ด้วยเอาต์พุตเดียวที่กำหนดทุกอย่างให้กับ sidechain สิ่งนี้รับประกันได้ว่า sidechain จะมี UTXO เดียวที่มีเงินทุนทั้งหมดถูกล็อคอยู่ในนั้น การถอนจะถูกจัดการโดยการลงคะแนนเสียงของคนงานเหมือง mainchain ไม่มีความเข้าใจว่าใครเป็นเจ้าของสิ่งที่อยู่บน sidechain และ mainchain จะพิจารณาการถอนตัวใด ๆ ที่ได้รับการอนุมัติจากผู้ขุดภายในกลไกการลงคะแนนที่ถูกต้อง ด้วยเหตุนี้จึงมีความล่าช้าในการถอนเงินเป็นเวลานาน กระบวนการถอนตัวออกจาก sidechain มีสองขั้นตอน: ข้อเสนอการถอนเงิน (มัดรวม) และขั้นตอนการถอนการลงคะแนนเสียง นักขุดต้องสร้างเอาต์พุต OP_RETURN ในธุรกรรม coinbase ด้วยแฮชของธุรกรรมการถอนที่เสนอเพื่อเสนอการถอน อย่างไรก็ตาม แฮชนี้คล้ายกับ sighash โดยตั้งค่าสถานะเพียงส่วนหนึ่งของธุรกรรมแทนที่จะเป็นทั้งหมด ไม่ผูกมัดกับอินพุต UTXO ที่แสดงถึงเงินที่ถูกล็อคใน drivechain หรือเอาต์พุตที่ส่งคืนทุกอย่างที่ไม่ได้ถูกถอนออกไปยัง sidechain UTXO พิเศษ นี่เป็นเพราะว่าการฝากเงินใน drivechain จะสร้าง UTXO ใหม่ และทำให้ข้อผูกมัดในการทำธุรกรรมการถอนเงินเป็นโมฆะเมื่อผู้คนไปตรวจสอบความถูกต้อง

From here, the miner voting period on the withdrawal proposal begins. After a bundle has been proposed, miners are able to vote on whether to approve them or not. Each block that is mined allows that miner to increment an approval counter, up or down by one, or two to abstain from doing anything. There are some specific limitations in addition to this, because it is possible to have more than one bundle for a single sidechain — if a miner chooses to vote "yes" (raise the counter by one) for a withdrawal bundle for a sidechain they ต้อง vote "no" (lower the counter by one) for every other bundle associated with that specific sidechain.

This is to guarantee that there are no "double withdrawals," where someone has an output in multiple bundles that would pay them out more bitcoin on the mainchain than they are owed.

On the other side, miners are also allowed to vote no for every single proposed bundle. This is supposed to function as a sort of alarm for everyone that a miner validating these withdrawals (making sure they are legitimately owned coins on the sidechain being withdrawn) has noticed something invalid happening. Remember, a key point of this design is that miners do not have to validate anything on the sidechain, so unless they choose to anyway, many miners may be upvoting bundles they are not verifying. This alarm function is designed for them to be alerted that they should verify the bundles to ensure a fraudulent withdrawal isn't happening.

Once a bundle has reached the required threshold (13,150 blocks, or roughly 90 days), the transaction actually processing the withdrawal becomes valid and can be confirmed. But what do people do if miners approve a fraudulent withdrawal that steals money from the sidechain? Sztorc's proposal is to engage in a user-ctivated soft fork (UASF) to invalidate the invalid peg-out transaction. This presents a huge risk in terms of consensus to the mainchain. The UASF in 2017 was a high-risk move that only barely succeeded and Bitcoin was much smaller than it is today. The larger Bitcoin grows, the more difficult such actions will be to coordinate.

หากคุณจำจาก บทความเกี่ยวกับยานอวกาศ, that design was based around blind merged mining (BMM). Ruben Somsen’s BMM design is actually the second variant of that, the first being Sztorc's design as laid out in BIP301. The BMM spec in drivechains is composed of two messages: a request message and an accept message. Both are coordinated respectively through a special transaction type on the mainchain and special output in a miner's coinbase transaction.

The request transaction is constructed by whoever is creating sidechain blocks. The whole point of BMM is that this person can be someone who is not mining, so the request transaction is there to allow them to pay miners to confirm their proposed sidechain block. The sidechain block proposal constructs a transaction that includes the hash of the sidechain block, the ID assigned to the sidechain when it was created and the last four bytes of the previous mainchain block header. There are three additional consensus rules applied to these types of transactions. First, a request transaction is invalid unless there is also a matching accept output in the coinbase transaction of that block. This is to guarantee miners cannot collect a fee from the request without also accepting and mining the sidechain block. Second, for each sidechain only one request transaction is allowed to be included in a mainchain block. This is to ensure only one block from any sidechain can actually be mined per mainchain block. Lastly, the last four bytes of the previous mainchain block must match. This ensures that a request is only valid to be mined in the next block, and such transactions cannot be mined later and steal money from a sidechain block proposer after someone else's block has been mined.

เอาต์พุตที่ยอมรับนั้นง่ายมาก: ข้อมูลส่วนหัวของข้อความและแฮชของบล็อกไซด์เชน หากนักขุดใช้โหนด drivechain ด้วยตนเอง พวกเขาสามารถเพิกเฉยต่อธุรกรรมคำขอและรวมเอาเอาต์พุตการยอมรับของตนเองไว้ในฐานเหรียญเสมอเพื่อขุดบล็อก sidechain ของตนเอง เมื่อรวมกันแล้ว ทั้งสองลักษณะนี้จะช่วยให้ผู้ขุดสามารถใช้งานโหนด sidechain ได้ด้วยตนเอง หรือผู้ที่ไม่ใช่นักขุดรายอื่นสามารถทำมันและจ่ายเงินให้ผู้ขุดเหมืองเพื่อขุดบล็อคของพวกเขา แนวคิดก็คือ ถ้านักขุดเองไม่ได้ใช้งาน sidechains และกินค่าใช้จ่ายในการตรวจสอบเพิ่มเติม อาจมีคนอื่นทำเพื่อพวกเขาได้ หากมีการแข่งขันกับคนที่ไม่ใช่นักขุดที่พยายามหารายได้บน sidechain พวกเขามักจะเสนอราคาค่าธรรมเนียมที่พวกเขายินดีจ่ายให้กับผู้ขุดในธุรกรรมคำขอของพวกเขา จนกว่าจะเป็นตัวแทนของค่าธรรมเนียมส่วนใหญ่ที่พวกเขาได้รับ โดยที่ไม่ คนขุดแร่รักษาผลกำไรเพียงเล็กน้อยและจ่ายส่วนที่เหลือให้กับคนงานเหมือง

That's the mechanics behind how drivechains function. Next up, federated sidechains, and then, after that, a breakdown of all the negatives and downsides each design can have.

นี่คือแขกโพสต์โดย Shinobi ความคิดเห็นที่แสดงออกมาเป็นความคิดเห็นของตนเองทั้งหมด และไม่จำเป็นต้องสะท้อนถึงความคิดเห็นของ BTC Inc หรือ Bitcoin นิตยสาร.

ต้นฉบับ: Bitcoin นิตยสาร