Drivechain -- Request for Discussion



Summary:

The conversation is regarding the bribe process and BMM, which is still a work in progress. The "ratchet" system on Github only has the block hash part of the critical hash script. The completed version needs to check the sidechain number (ID) and the sidechain block number in the script. Also, the block number can only change by +1 or -1, so when a new h* is added to the queue it must be compared to the most recent h* in the queue. std::abs(queue.back().nHeight - ToAdd.nHeight) must equal 1. OP_BRIBE_VERIFY could then operate as follows: This causes the script to fail if it does not match the block height, or is not the hash for the sidechain with, or there is no hash for that sidechain in the block's coinbase.There is a suggestion to add an additional rule that OP_BRIBE checks fails unless the output is locked 100 or more blocks. The output script would end up something like IF OP_BRIBE_VERIFY ELSE OP_CHECKSIG ENDIF. This output acts like "anyone can spend" for the one block height. Otherwise, only the sidechain miner can spend the output. This allows the sidechain miner to reclaim their coins if the transaction ends up in a different block. OP_BRIBE_VERIFY would have an additional rule where the script to fails if one or more of the transaction outputs start with something other than the template and does not match the block height, or is not the hash for the sidechain with, or there is no hash for that sidechain in the block's coinbase. The template is OP_CHECKSEQUENCE_VERIFY.


Updated on: 2023-06-12T00:57:12.553356+00:00