Arranger Block Validity Fraud Proofs #
We explore a simple protocol with two kind of players: One proposing blocks and the other just challenging.
The main goal is to prove that when we have an honest challenger challenging
only /good/ blocks are accepted: See honest_chooser_valid
Player One (Proposer) #
Player one, the player proposing elements, actions are
to propose a new block da : BTree α × ℍ
.
Since we do not have IO, upon propsing a new block, they player also provides
all possible strategies for all elements.
Local Validity #
We define a local valid block Local_valid
to a block that hashes to a
given hash, holds only valid elements and has no duplicates.
Instances For
Helper function building a complete tree from a sequence of 2^lgn
elements.
Equations
- Valid_Seq data merkle_tree P = Local_valid (perfectSeqLeaves data) merkle_tree P
Instances For
Same as Local_valid
but instead of having a struct, we just
have a Prop
.
Equations
- local_valid da val_fun = (da.1.hash_BTree = da.2 ∧ BTree.fold val_fun and da.1 = true ∧ da.1.toList.Nodup)
Instances For
PLayer 2 (Challenger) #
The second player, bsaed on what the player one (proposer) proposes, can perform one of the following actions:
- DAC challenge
- Element invalid challenge
- Duplicate elements challenge
- accept the block as valid
- DAC {α ℍ : Type} (str : ABTree Unit (ℍ × ℍ × ℍ → Option ChooserMoves)) : P2_Actions α ℍ
- Invalid {α ℍ : Type} {n : ℕ} (p : α) (seq : ISkeleton n) (str : Sequence n (ℍ × ℍ × ℍ → Option ChooserSmp)) : P2_Actions α ℍ
- Duplicate {α ℍ : Type} (n m : ℕ) (path_p : ISkeleton n) (path_q : ISkeleton m) (str_p : Sequence n (ℍ × ℍ × ℍ → Option ChooserSmp)) (str_q : Sequence m (ℍ × ℍ × ℍ → Option ChooserSmp)) : P2_Actions α ℍ
- Ok {α ℍ : Type} : P2_Actions α ℍ
Instances For
L2 Local Linear Protocol #
Simple linear protocol: no optimizations as logarithmic search. There is no time involved: we assume players have all the time in the world to play and there is no rush. We assume players play to win, and we do not reason about the incentives they have to beahve like that. If plaer two wins, the proposed block is discarded and nothing else happens. In the real protocol, we player one should be penalized.
Helper function defining actions taken after player one moved.
Equations
- One or more equations did not get rendered due to their size.
- inner_l2_actions val_fun playerOne P2_Actions.Ok = true
Instances For
Definition of L2 protocol playing linear games.
Equations
- linear_l2_protocol val_fun playerOne playerTwo = inner_l2_actions val_fun playerOne (playerTwo playerOne.da)
Instances For
Crafting Honest Players. #
Witness Finding. #
Find leftest invalid value
Equations
- One or more equations did not get rendered due to their size.
- find_left_invalid_path val (ABTree.leaf a) = if val a = true then none else some { length := 0, pathInfo := Sequence.nil, src := a, dst := o.mhash a }
Instances For
Equations
- One or more equations did not get rendered due to their size.
- generate_merkle_tree (ABTree.leaf a) = ABTree.leaf a
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Honest player two. Check each condition and if the proposed block violates one, it generates a witness and challenges the validity of such block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Honest chooser finds correct witnesses, and thus, it always wins the challenging games (if played.)
Honest player do not challenge valid blocks
L2 Protocol and Honest player #
Helper lemma, if a block is accepted by linear_l2_protocol
, then that block is valid.
Valid blocks are accepted by the linear_l2_protocol
.
Main theorem, the L2 Protocol linear_l2_protocol
accepts valid blocks and
every block accepted by the protocol is valid, when equipped with the honest
player two.