Drivechain ObservatoryConnecting…Waiting for data.
  1. 1What is a drivechain?
  2. 2Blocks: the heartbeat
  3. 3Slots and sidechains
  4. 4Creating a sidechain
  5. 5Deposits and the treasury
  6. 6Withdrawals by miner vote
  7. 7Blind merged mining
  8. 8How we know
Concept 4 of 8

Creating a sidechain

Someone proposes it; miners vote block by block.

5 min read

Step 1: someone proposes it

A new sidechain starts as a proposal. A miner writes an M1M1 · Propose sidechainA coinbase message that proposes a new sidechain for a slot. message into the coinbase transactionCoinbase transactionThe first transaction in a block, written by the miner. BIP300 and BIP301 place the miners' messages and votes there. of a block they find. The message carries the sidechain's declaration and the slot it wants. A new proposal starts with zero votes.

Only miners write coinbase transactions, so a sidechain's developers ask miners to include their proposal.

Step 2: miners vote, block by block

In each later block, the miner can vote for the proposal with an M2M2 · ACK proposalA coinbase message in which a miner votes for a pending sidechain proposal. message that quotes the proposal's declaration hash. A block gives a proposal at most one vote. A block that does not vote for it simply doesn't add one.

It is like a show of hands that lasts thousands of blocks (about two weeks at the ten-minute target): every block is one hand, and only blocks that raise it count.

Votes accumulating block by blockEach new block can add a vote. The proposal passes only if its votes go above the threshold before it gets too old.thresholdproposedtoo oldtime, measured in L1 blocks →

Step 3: activate or expire

The proposal activates when its votes go above the thresholdThresholdThe number of votes that must be exceeded, within a maximum age, for a proposal or withdrawal to pass. Each network reports its own values. before it gets too old. If it runs out of time, it is dropped. Taking an empty slot needs fewer votes than replacing a sidechain that is already active: replacing one should be hard.

Live on eCash

The rules eCash is running

UnknownThis value is missing, conflicting, or was read while the chain moved. Nothing is guessed to fill the gap.

Loading live data…

Live on eCash

Proposals being voted on

UnknownThis value is missing, conflicting, or was read while the chain moved. Nothing is guessed to fill the gap.

Loading live data…

Live on eCash

How today's sidechains were activated

UnknownThis value is missing, conflicting, or was read while the chain moved. Nothing is guessed to fill the gap.

Loading live data…

Go deeper: what the messages look like, in each document

Both are coinbase outputs that start with OP_RETURN. M1 has the header D5E0C4AF followed by the slot number and the declaration (a version, the title, the description and the two hashes) in all three documents. M2 is where they differ:

BIP300LayerTwo Labs specEnforcer on eCash
M2 headerD6E1C5BFD6E1C5BFD6E1C5DF
M2 fieldsdeclaration hashslot, declaration hashslot, declaration hash
M1 per blockat most oneseveral, not the same slot and declaration twiceseveral, not the same slot and declaration twice
M2 per blockat most oneat most one per slotat most one per slot

eCash runs the enforcer, so the last column is what its miners must write: an M2 with the BIP's header would be ignored there. The sidechains active on eCash got their votes in that format.

A vote only counts from the block after the proposal. That is why a sidechain that got a vote in every block activates exactly unknown blocks after it was proposed on eCash, as the timeline above shows.

Check yourself

On eCash, a proposal for an empty slot has exactly unknown votes and is still young enough. Does it activate?

Read the source

The rules in this lesson come from these documents and code:

Ask an AI assistant about this concept

Opens your assistant with a question about this concept and its sources already written. AI answers can be wrong: check them against the sources above. Your question goes to the assistant you choose, not to us.