Skip to content

Commit

Permalink
bip-0300: Forbid extraneous OP_DRIVECHAIN outputs in M5/M6
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Jul 26, 2023
1 parent accaee0 commit badaf01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bip-0300.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Every time a deposit/withdrawal is made, the old CTIP is spent and a new one is

Every M5 is valid, as long as:

* It has at least one OP_DRIVECHAIN output -- this becomes the new CTIP.
* It has exactly one OP_DRIVECHAIN output -- this becomes the new CTIP.
* The new CTIP has '''more''' coins in it, than before.

Expand All @@ -412,6 +412,7 @@ M6 is invalid if:
* The first output of M6 is NOT an OP_DRIVECHAIN. (This OP_DRIVECHAIN becomes the new CTIP. In other words: all non-withdrawn coins are paid back to the sidechain.)
* The second output is NOT an OP_RETURN script of exactly 10 bytes, of which 8 bytes are a serialized Bitcoin amount.
* The txn fee of M6 is NOT exactly equal to the amount of the previous bullet point.
* There are additional OP_DRIVECHAIN outputs after the first one.
Else, M6 is valid.

Expand Down

0 comments on commit badaf01

Please sign in to comment.