←
Will Papper2,915 posts
Will Papper avatar

Will Papper

@WillPapper

Agent Payments @Cloudflare. Previously Co-founder @Syndicateio. ETH since the 2014 presale. Creator of $AGLD, Core Team ConstitutionDAO

◷ Joined April 2012▧ 117 Photos and videos
Will Papper avatar
Will Papper@WillPapper·Nov 17

The cf cli is the easiest way to 10X your @Cloudflare experience with agents The entire company had a huge push to make thousands of dashboard features available via CLI for agents (and scripting/automation) If you use cf cli, you may never need to touch the dashboard at all

The cf cli has reached a 1.0 release candidate! Introducing cf observability tail, cleaner outputs across the board, and more API consistency. All the local development and deployment commands are now stable, try them on your wrangler project. developers.cloudflare.com/ch…

Will Papper avatar
Will Papper@WillPapper·Nov 14

Formal verification is not a magic bullet. Most security issues today are operational security issues, not bugs in the code. Operational security is just as important. Don't go down the rabbit hole of securing your code and neglecting to secure your deployment process.

Will Papper avatar
Will Papper@WillPapper·Nov 14

You might be comfortable modifying production code for a reference implementation of a specific protocol. You may not be comfortable modifying production code for your actual application. Likewise, pure theory can be its own model and doesn’t need to be close to implementation.

Will Papper avatar
Will Papper@WillPapper·Nov 14

I've worked heavily with Certora and a bit with the others. The trade-off I'd look at most is the options for keeping specs close to code, and whether that requires you to modify your production code. That depends a lot on your language and what you’re trying to verify.

Will Papper avatar
Will Papper@WillPapper·Nov 14

Verus: an SMT-based verifier where you write specs and proofs in Rust itself, next to your code Aeneas: translates Rust into pure functional models you can reason about in Lean and other provers Hax: translates a large subset of Rust into Lean, F*, Rocq and more

Will Papper avatar
Will Papper@WillPapper·Nov 14

Some recommendations, depending on your stack: Lean: a programming language that doubles as a proof assistant, with a big math library behind it Certora: checks smart contracts and other similarly sensitive code against rules you write in its spec language, CVL

Will Papper avatar
Will Papper@WillPapper·Nov 14

That's why I find the initiatives to verify deployed bytecode instead of models of the code so interesting. Checking bytecode would also catch compiler bugs and other issues that live beyond the source code.

Will Papper avatar
Will Papper@WillPapper·Nov 14

This is also not a magic bullet. You need to write specs that capture your reachable and unreachable states correctly, and then you need to make sure the specs match the implementation. If either of those drift, you've verified a model of your code, but not your actual code.

Will Papper avatar
Will Papper@WillPapper·Nov 14

Verus gets close with its verus! macro, which wraps your code. But your specs use Verus's own types like int, nat and Seq, and it only supports part of Rust's standard library.

Will Papper avatar
Will Papper@WillPapper·Nov 14

In my opinion, the biggest opportunity is formal verification close to code via macros, without requiring changes that affect production code.

Will Papper avatar
Will Papper@WillPapper·Nov 14

At the same time, something like Hax often requires you to modify the code itself. That's not great either, because you don't want to change your production code just for formal verification purposes.

Will Papper avatar
Will Papper@WillPapper·Nov 14

A major benefit of formal verification is keeping specs close to code without modifying it. It's a delicate balance. If you have a giant proof that's completely different from your implementation, you can't tell if it matches your code. That can happen with something like Lean.

Will Papper avatar
Will Papper@WillPapper·Nov 14

Testing is primarily about inputs and outputs, and whether the right inputs produce the right outputs. Formal verification requires you to think more globally about a system.

Will Papper avatar
Will Papper@WillPapper·Nov 14

Writing specs is a different mindset than writing tests. With specs, you think about your system as a state machine of possible reachable and unreachable states, and when those reachable and unreachable states should occur.

Will Papper avatar
Will Papper@WillPapper·Nov 14

AI-assisted exploits are on the rise, so formal verification matters more than ever. At @syndicateio, my previous startup, we formally verified almost every smart contract for the past half decade using @certora (By hand too!) Here are lessons from our five years of experience:

Will Papper avatar
Will Papper@WillPapper·Nov 13

The Goal talks about bottlenecks from the perspective of a factory. If you are interested in something more software-specific, The Phoenix Project retells The Goal for software. I’ve read The Goal, haven’t read The Phoenix Project yet. (When I do, I may summarize that too!)

Post attachment