FormalLand Profile Banner
Formal Land 🌲 Profile
Formal Land 🌲

@FormalLand

Followers
1K
Following
3K
Media
56
Statuses
661

Advanced formal verification for Web3 πŸš€ Ethereum, Solana, Sui πŸ” Solidity, Rust, zero-knowledge. DM us to ensure your code is safe!

Paris, France
Joined April 2021
Don't wanna be here? Send us removal request.
@FormalLand
Formal Land 🌲
3 days
RT @VitalikButerin: The best way to build an L2 is to lean into the L1's offerings (security, censorship resistance, proofs, data avail. )….
0
597
0
@FormalLand
Formal Land 🌲
4 days
RT @guillaumeclaret: Currently working on the translation of MLIR code to Rocq, to formally verify ZK circuits written in LLZK. It is quit….
0
1
0
@FormalLand
Formal Land 🌲
4 days
Formal verification is about taking a lot of risks (niche market) to prevent others from taking some (finding all bugs)!
Tweet media one
0
1
4
@FormalLand
Formal Land 🌲
6 days
A goal of formal verification is to actually reduce your security cost by putting a robot πŸ€– in your CI auditing every input, all the time.
Tweet media one
0
2
5
@FormalLand
Formal Land 🌲
7 days
It differs from what we were doing before, which was generating a typed and executable Rocq version, but without making explicit the non-aliasing and with a quite verbose version, making it difficult to use for the proofs.
0
0
1
@FormalLand
Formal Land 🌲
7 days
We are currently writing a whole EVM specification in the Rocq language that we prove equivalent to the original implementation in Revm. This specification is in idiomatic Rocq but follows the structure of the Rust code. It includes the gas and versioning! πŸ‘‡
Tweet media one
2
2
14
@FormalLand
Formal Land 🌲
7 days
Summer is good free time to code and focus more πŸ˜‚.
0
0
3
@FormalLand
Formal Land 🌲
7 days
Is formally verifying a whole zkVM for the end of the summer realistic? β˜€οΈ.
2
1
8
@FormalLand
Formal Land 🌲
10 days
Formal verification can help you reach your goals faster, as you can trust your code more. 🀝.
0
0
7
@FormalLand
Formal Land 🌲
12 days
A good reason not to write tests.
Tweet media one
1
2
9
@FormalLand
Formal Land 🌲
14 days
RT @Oxidefier: We did not win this Hackathon, but we were happy to participate! Thank you @SuperteamFRANCE for all the guidance, encouragem….
0
1
0
@FormalLand
Formal Land 🌲
15 days
1. Continue to verify a functional definition for the rest if the EVM instructions. 2. Show that this functional definition is equivalent to a semantics for the EVM in Rocq. There is at least one such project that we could show as equivalent to a reference implementation.
0
0
1
@FormalLand
Formal Land 🌲
15 days
For the rest of the instructions, we have a typed representation in Rocq generated with the help of "coq-of-rust". However, we do not have a clear idiomatic and functional definition like that of the instruction ADD. From there, we can go in two directions:.
1
0
1
@FormalLand
Formal Land 🌲
15 days
Finally, we update the top of the stack with the result of "Impl_Uint.wrapping_add" applied to the two top elements!.
1
0
1
@FormalLand
Formal Land 🌲
15 days
We first try to consume a "VERYLOW" amount of gas. If it fails, we return the "OutOfGas" error message. Otherwise, we pop one element from the stack and ask for a reference to the next one. If there are not enough elements, we return "StackUnderflow".
1
0
1
@FormalLand
Formal Land 🌲
15 days
In our functional specification, the first line:. Output.Success tt. says that there can be no runtime failures (no panics!), assuming none of the provided methods panic. This is an important safety property. The rest describes how the ADD instruction behaves.
1
0
1
@FormalLand
Formal Land 🌲
15 days
One of the difficulties here is that the code is very abstract. The types of the stack or gas field are not defined, nor are the functions to manipulate them. Instead, they are provided as trait implementations. We needed to specify that they admit a functional specification.
1
0
1
@FormalLand
Formal Land 🌲
15 days
The functional specification (more verbose, partly because we unroll the macros):
Tweet media one
1
0
1
@FormalLand
Formal Land 🌲
15 days
The ADD instruction as implemented in Rust:. pub fn add<WIRE: InterpreterTypes, H: Host + ?Sized>(. interpreter: &mut Interpreter<WIRE>,. _host: &mut H,.) {. gas!(interpreter, gas::VERYLOW);. popn_top!([op1], op2, interpreter);. *op2 = op1.wrapping_add(*op2);.}.
1
0
1
@FormalLand
Formal Land 🌲
15 days
One of our primary targets these days (months) is to make a functional specification for the Rust implementation of the EVM (Ethereum Virtual Machine) named Revm. We finally achieved that for the ADD instruction! Here is what it looks like: πŸ‘‡.
1
5
19