Skip to main content

4 posts tagged with "Sui"

View All Tags

ยท 8 min read

We are continuing our formal verification work for the implementation of the type-checker of the Move language in the ๐Ÿ’งย Sui blockchain. We verify a manual translation in the proof system ๐Ÿ“ย Coq of the ๐Ÿฆ€ย Rust code of the Move checker as available on GitHub.

In this blog post, we present in detail the verification of a particular function AbstractStack::pop_eq_n that manipulates ๐Ÿ“šย stacks of types to show that it is equivalent to its naive implementation.

All the code presented here is on our GitHub at github.com/formal-land/coq-of-rust ๐Ÿง‘โ€๐Ÿซ.

ยท 6 min read

In the previous blog post, we have seen how we represent side-effects from the Rust code of the Sui's Move type-checker of bytecode in Coq. This translation represents about 3,200 lines of Coq code excluding comments. We need to trust that this translation is faithful to the original Rust code, as we generate it by hand or with GitHub Copilot.

In this blog post, we present how we test this translation to ensure it is correct by running the type-checker on each opcode of the Move bytecode and comparing the results with the Rust code, testing the success and error cases.

ยท 10 min read

We are working on formally verifying the ๐Ÿฆ€ย Rust implementation of the Move type-checker for bytecode in the proof system ๐Ÿ“ย Coq. You can find the code of this type-checker in the crate move-bytecode-verifier.

This requires translating all the Rust code in idiomatic Coq on which we will write our specifications and proofs. We write this translation by hand relying as much as possible on generative AI tools such as GitHub Copilot, as there are many particular cases. We plan, eventually, to prove it equivalent to the translation automatically generated by coq-of-rust.

In this blog post we present how we organize our ๐Ÿ”ฎย monad to represent the side-effects used in this Rust code. We believe this organization should work for other Rust projects as well.

ยท 3 min read

In this blog post, we present our project to formally verify the implementation of the type checker for smart contracts of the ๐Ÿ’งย Sui blockchain. The Sui blockchain uses the Move language to express smart contracts. This language is implemented in ๐Ÿฆ€ย Rust and compiles down to the Move bytecode that is loaded in memory when executing the smart contracts.

We will formally verify the part that checks that the bytecode is well-typed, so that when a smart contract is executed it cannot encounter critical errors. The type checker itself is also written in Rust, and we will verify it using the proof assistant Coqย ๐Ÿ“ and our tool coq-of-rust that translates Rust programs to Coq.