Closed
Milestone
Sep 24, 2023–Oct 20, 2023
(2023Q4) MIR: vote contract
WIP
This is a sub-milestone of %(2023Q3-Q4) Michelson-in-Rust, for the fully featured implementation phase.
Context
Now that we have a better general idea of what Michelson in Rust should look like --thanks to the feedback we got from the prototype--, we can make our design decisions and support yet another contract with new interesting instructions. The vote contract (code below) has been chosen to this end.
We'll also throw in support for TZT in both MIR and Octez, as this is the solution we're using to validate MIR's implementation: given an instruction, MIR has to produce the same result as Octez on the related TZT tests.
Vote contract
{
parameter (string %vote);
storage (map string int);
code {
AMOUNT;
PUSH mutez 5000000;
COMPARE; GT;
IF { { UNIT; FAILWITH } } {};
DUP; DIP { CDR; DUP }; CAR; DUP;
DIP {
GET; { IF_NONE { { UNIT ; FAILWITH } } {} };
PUSH int 1; ADD; SOME
};
UPDATE;
NIL operation; PAIR
}
}
Work break down
-
Decide the architecture of MIR, for the points raised in this design document: #6404 (closed). -
Decide how to handle these potentially problematic instructions (with this document for the ones specific to roll-ups). -
Support TZT. -
For MIR: #6408 (closed). -
For Octez: %Support for Michelson unit tests in TZT format. -
Deliverable: all the current interpretation TZT tests for the factorial/Fibonacci instructions, and an added type-checking test, produce the same results when executed with MIR and Octez.
-
-
Add support for the vote contract: #6409 (closed). -
Annotations (they should simply be ignored) -
mutez -
string -
map -
ADD -
PUSH -
IF -
DUP -
DIP -
AMOUNT -
COMPARE -
FAIL -
{} -
CAR -
CDR -
GET -
ASSERT_SOME -
SOME -
UPDATE -
NIL -
PAIR
-
-
Deliverable: roll-up deployment: #6521 (closed).
Loading
Loading
Loading
Loading