←
smstack.eth2,883 posts
smstack.eth avatar

smstack.eth

@StackDigest

engineer @sunnyside_io | @DecipherGlobal | ko @organ_mo

◷ Joined January 2023▧ 170 Photos and videos
smstack.eth avatar
smstack.eth@StackDigest·Nov 2

I'm now heading to Devcon, and I think it's a good time to share my personal research side project: It's time to scale the trust: EIP-8288 on OP Stack ethresear.ch/t/its-time-to-s… The problem: PQ signatures are too large, and L2s now would face a huge regression on the throughput side if users move to PQ schemes. Solution: EIP-8288 on L2. Sequencer aggregates signatures / ZK proofs into a single "aggregate proof" recursively, eliding big data from the block. So the paper introduces a proof-of-concept of implementing EIP-8288 on OP Stack. I put some interesting modifications on both leanVM, OP Stack, and EIP-8288 - and whatever the modifications are, this direction of L2s adopting EIP-8288 will eventually bring better data efficiencies for them. Definitely it's not a production-ready one and there are a lot of rooms for improvement, but I believe this is a great path for L2s to still scale the load (and even better!) after PQ transition. If anyone interested, please leave some comments or DM me! If you are heading to Devcon we can talk IRL too 😀

smstack.eth avatar
smstack.eth@StackDigest·Nov 16

Totally bullish about this direction, this choice will allow ppl to explore more about what ISA to enshrine, while there can be several important applications built on this. Anticipating the new/modified EIP coming out!

Over the past few weeks I've gone from thinking leanPCS is total bull to being a total bull. So let me explain some of these buzzwords in more detail. At the core, 8288 is about hyper-scaling data and execution for any computation that needs to get performed on a piece of data once, the chain learns the answer, and then we never need to see that data again. This sounds very specific, but it includes most "heavy" things happening on Ethereum: * Signatures * STARKs * Merkle branches * FHE computation * ... Really the first two are the most important. Once we go quantum-safe, signatures get bigger (65 bytes ECDSA -> 1-6 kB WOTS/SPHINCS depending on params) and ZKPs get much bigger (200-1000 bytes with groth16, PLONK, etc -> 128 kB with STARKs). This is unsustainable to put on chain, and 8288 fixes this. 8288 works by aggregating STARKs in the mempool. First, you as a user generate the STARK or SPHINCS signature or PCS opening (more on that last one later), and publish it. Then, each node listens. Each tick, each node takes all of the new objects that it has seen, and generates a STARK containing a list of "claims": "pubkey P has signed message M" "program X run on data D has output Y" "p(X) = Y for some polynomial P whose hash is H" and a proof that it has seen a signature, STARK or PCS opening verifying those claims. So the only information getting re-broadcasted is: (i) hashes of inputs and outputs (~64-96 bytes per claim) (ii) a single STARK proof per tick These aggregate proofs themselves get re-aggregated, and eventually you get to a single "master proof" in the block, that verifies that all of those statements are true. And so the only other data that has to actually go on chain is the statements (the (P, M), (X, D, Y), (X, Y, H) tuples I described above), not the actual signatures or proofs. This gets put into a specialized frame type. Now, let's get into the leanSPHINCS vs leanSTARK vs leanPCS part. The core distinction is: *what is the underlying object that the user is creating?* In leanSPHINCS, it's a signature, and specifically this particular type of purely-hash-based signature: ethresear.ch/t/sphincs-minus… If we add leanSPHINCS, then users will be able to make quantum-safe accounts, and pay only a little bit of gas (4096 for the 64 bytes) for each signature. So we get scalable quantum-safety for regular accounts, multisigs, etc. But it's only one specific signature scheme, you can't do anything else. In leanSTARK, it's a STARK. This means it's fully general: the user runs whatever computation they want, and publish a STARK of it. So you can use it for: * Any signature scheme (including eg. lattice-based ones if you like those) * A multisig that hides its internal logic * Privacy protocols * Private account abstraction: authorization logic that depends on some value hidden elsewhere in the state, so you can have one key that controls all your accounts without publicly linking them to each other Basically, it's a free for all, in the same way the EVM is a free for all. But leanSTARK has a practical downside. The protocol would have to specify the language in which users write their programs (we call this the "ISA"). So we would have to agree on that language. This is a really big deal - it's the first big case of "Ethereum moving beyond the EVM" - and so it's likely to take time to agree on the details of it, especially since the ISA would be hard to upgrade. There are benefits to taking longer on this, figuring out the ideal ISA, and then even giving access to it inside regular contracts. LeanPCS is the third option. PCS stands for "polynomial commitment scheme": a proof that P(x) = y. The most important thing to know about PCSes is that they are by far the most important "hard" component of a STARK (see here: vitalik.eth.limo/general/202… ). If you have a "magic PCS oracle" (which from the EVM's point of view, 8288 is), you can verify a STARK in ~20-40k gas. The most important gain with PCS is that there is far less that we need to choose. Specifying a PCS only requires specifying a field, and there is a natural option: the 128 bit binary field (technically, we can go more general than that, and say the 2^k-bit binary recursive tower field, going up to 256) LeanPCS is less efficient than leanSTARK onchain, because you would have to put multiple claims to prove one thing. But it's arguably more efficient offchain, because you have much more flexibility to choose proof systems. But most importantly, leanPCS gives you the same generality as leanSTARK, in a way that could potentially be implemented very quickly. And once we figure out the ISA, we can add leanSTARK later. So there is a route to getting "the cryptographic proof singularity" much faster than any of us expected, and that route runs through 8288 with leanPCS. firefly.social/post/x/212092…

Mantle avatar
⟳ smstack.eth retweeted
Mantle@Mantle_Official·Nov 11

Onchain markets need transparency. Traders need privacy. @taem_park, Co-founder & CEO of @sunnyside_io, joins Mantle IRL to discuss how public market data and private trades can coexist, with a look at potential privacy use cases for institutional RWA trading.

1:45
Caspar avatar
⟳ smstack.eth retweeted
Caspar@casparschwa·Nov 7

Ethereum’s client diversity will really pay off with AI cyber capabilities taking off. The Ethereum protocol is implemented by many clients such that a bug in any given client will not cause major failures for the network. The majority will be running on different clients!

Post attachment
Omid Malekan avatar
⟳ smstack.eth retweeted
Omid Malekan@malekanoms·Nov 1

What's that Ben Franklin saying about those who sacrifice liberty for security ending up with neither? Lorenzo's critique of neutrality in the aftermath of a historic hack should be viewed through the lens of what happens if he got his wish of blockchains having a systemic undo button? First, we'd swap the risk of individually failed OpSec to systematic failure. Today, crypto users have to worry about their own vulnerabilities, something totally in their control. Introduce that button, and now they have to worry about the button being compromised, something entirely out of their control. And make no mistake, such a button would be the biggest attacker honeypot on earth. It would be a single point of failure for a platform with potentially trillions in value riding on it. If you believe in crypto, then you believe a blockchain could become a major global settlement layer. Having a single point of vulnerability for global settlement is dangerous. And not just from hacks, mind you. Those who call for such a button usually gloss over who gets to push it and how. What's the process for deciding to push it? Who gets to participate in that process? What's the threshold for when it's pushed? A $6 billion hack? That would just guarantee every major hack is limited to $5.9 billion. The incentive to try to take over the button that controls global settlement would be off the charts. Every major government, corporation, and whale would do everything it could to control it. The end state would be a powerful cabal that controls the ultimate Sword of Damocles over everyone else. I wrote recently about why I think Zcash should get rid of the dev fund due to the toxic politics it will lead to (and a surprising number of Zcash holders, miners, and devs agreed). Imagine how horrible the politics of the button would be for Bitcoin or Ethereum. The other way to view this proposal is through the lens of history. If Lorenzo had been around during the time of the Mt. Gox hack, he would have campaigned for a Bitcoin chain reversal. But given that hack took place over the course of months, such a reversal would brick Bitcoin entirely. So the next logical step would have been to fork Bitcoin, create additional coins, and refund the losses. Don't forget that hack involved something like 7% of all Bitcoin in existence, an order of magnitude more than the Binance one. Anyone who thinks the Binance hack "will keep institutions away" would have surely thought the same thing about Mt. Gox. And BTW, Lorenzo wouldn't be the only person who'd make such an argument. Literally every TradFi person I spoke to about Bitcoin back then told me the same thing: "This Bitcoin thing is stupid, all these people lost their money an there's no one to call to get a refund." So imagine Lorenzo and those Suits got exactly what they wanted, and blockchain was a network that was more reversible than core TradFi RTGS systems, and Bitcoin was an asset that was easily printed to fund a bailout. What do you think the institutions that now hold hundreds of billions of dollars worth of Bitcoin knowing it's neither reversible nor inflatable wold think? Would they own even more bitcoins because blockchain is not effectively immutable and bitcoins are not scarce? or would they own less?

Saying “everything worked as it was supposed to” while people are scared and losing money on hardware wallets, on bridges, on DEXes and CEXes is a weird definition of working. What does a credibly neutral L1 actually do for anyone if nothing built on top of it is safe enough to use? At some point we have to step out of the cypherpunk echo chamber and admit nobody is going to use these networks if security doesn’t get meaningfully better. Neutrality isn’t a product. Not getting drained is. And has anyone stopped to think what happens if Binance, for whatever reason, couldn’t plug the hole? I think ONLY relying on emergency funds going forward is just madness.

ethresearchbot avatar
⟳ smstack.eth retweeted
ethresearchbot@ethresearchbot·Nov 2

New post on Eth Research! It's time to scale the trust: EIP-8288 on OP Stack By: - sm-stack 🔗 ethresear.ch/t/26208 Highlights: - Post-quantum authentication data (e.g., SPHINCS+, ML-DSA) is much larger than ECDSA, so if included inline in L2 transactions it would dominate L1 data usage and crush throughput (e.g., ~6,600 tx per 6 blobs drops to ~155 with leanSPHINCS inline). - EIP-8288’s core idea—moving signatures/proofs out of transactions and instead posting an aggregate proof—can be adapted to OP Stack by posting one aggregate covering many L2 blocks as a new batch type (0x02) rather than per-block header proofs. - In the PoC, transactions declare dependencies as (scheme, data_hash, verification_key_hash) “statements”; users send actual signatures/proofs only to the sequencer, and an op-aggregator recursively merges them into a leanVM aggregate (root+seal) that is ~354 KB (~322 KB compressed) largely independent of the number of statements. - Measured on a 32-vCPU machine with 2s blocks and aggregates every 12 blocks, the prover can keep up to ~170 leanSPHINCS signatures/sec; the corresponding L1 blob usage is ~2.8–3.3 blobs per L1 block versus ~79 blobs if signatures were carried inline (about 96% less blob usage). - The approach also makes PQ-era privacy/ZK apps practical: a ~430 KiB proof per transfer would be ~3.4 blobs if posted directly, but using statement checks plus aggregation reduces the per-transfer L1-fee bytes dramatically (example: Privacy Boost drops from ~445 KB to ~5.1 KB per transfer, ~86× reduction). ELI5: Rollups make Ethereum faster by doing the heavy computation off of Ethereum (L1), but they still have to send “proof I’m allowed to do this” data (like signatures or privacy proofs) to L1. In a post-quantum world those proofs get huge, so the chain gets clogged just carrying them. This proposal uses EIP-8288-style “bundle the proofs” logic: users send proofs to the sequencer, the sequencer/prover combines thousands of them into one big compact proof, and only that combined proof plus tiny references are posted to L1. That way, checking trust doesn’t get more expensive for every single user action.

jolestar avatar
⟳ smstack.eth retweeted
jolestar@jolestar·Oct 30

币安被盗,很多人批评 ETH 的 7702,认为账户级授权给黑客提供了便利。但即便没有 7702,每种资产单独授权一次也只是多几个签名而已。黑客既然都能准备好 50 个 nonce 签名,多签几种资产对攻击结果没有任何实质影响。 这事奇怪的地方在于:DevOps 的个人电脑是怎么一路直接穿透到生产环境的?为什么能调用签名器进行任意签名(连 BTC 签名都能通过)?而整套流程居然能彻底绕过提币的安全审计? 解决这个问题的方向,绝不是禁止账户 7702,而是从架构上禁止“裸账户签名直接提款”。资产应该由合约管理,提币、审核、放行这套流程更应该直接固化在链上,而不是完全依赖容易被穿透的链下流程。

Derek Chiang | Ethlabs avatar
⟳ smstack.eth retweeted
Derek Chiang | Ethlabs@decentrek·Oct 30

Quick notes on 7702 to dispel fud and keep your funds safe. First thing first -- 7702 itself isn't broken. Don't panic if you are using a wallet that supports 7702 (MetaMask, Uniswap, Ambire, etc.). To recap, 7702 is an account abstraction EIP that allows an EOA to sign a special message, called a "7702 authorization," that would insert a smart contract into the account, which enables the account to do powerful things like transaction batching, e.g. doing "approve" and "transfer" in one transaction so you can swap on Uniswap with one click. But unfortunately the same feature also allows a hacker to efficiently move all your tokens in one single transaction. In the Binance hack, the hacker moved ETH, USDT, and 62 other tokens in one transaction, whereas without 7702 they'd have had to send one transaction per token. In this particular case, many of those transactions would've failed because Binance was still using the hacked wallet for withdrawals, so all transactions sent by the hacker would've had to compete with the legit transactions for nonces. So using 7702 did help the hacker steal as much funds as possible, as quickly as possible. Ouch! However, in order for the hacker to use 7702, they must have either 1) had access to the private key, or 2) tricked Binance into signing a 7702 authorization. The latter is very unlikely, as it's hard to imagine Binance being so incompetent as to expose an endpoint for signing 7702 authorizations or (even worse) for signing raw messages which the hacker could've repurposed for 7702 authorizations. But I can't rule that out until the official postmortem. What does all this mean for you? - If you are a wallet developer, do NOT, under any circumstances, expose a way for third parties to request 7702 authorizations. This is just handing your users a giant footgun to shoot themselves with. No wallets I know of do this, so don't worry if you are a user. - If you are a user, use a well-known wallet. 7702 does let wallet developers screw up in more ways than before, so use only well-known wallets whose developers' competence you can trust. - If you are a company (e.g. an exchange) operating hot wallets, do NOT, under any circumstances, expose an endpoint (even if it's an internal endpoint) for signing 7702 authorizations or raw messages. As a contributor to AA, I feel partially responsible for hacks like this, since by increasing the power of accounts, we've indeed also empowered hackers (not unlike how any new technology empowers both the good guys and the bad guys). That said, it's important to note that 7702 was only a transitional EIP, and "endgame AA" such as Frame Transactions (EIP-8141) would allow wallet owners to set up their wallets much more securely. For example, if Frame Transactions were available today, Binance could've: - Set up their wallets as multisig contracts only (not EOAs). - Set up "post conditions" for their `transfer()` functions, so that even if the multisig got hacked, the contract itself would perform sanity checks such as "no transfers of more than 1000 ETH without additional signers." In short, the endgame of Ethereum UX is one with both optimal security and optimal UX, and users never have to trade off between the two. But we still have a long way to go until we get there. Back to work!

Justin Thaler avatar
⟳ smstack.eth retweeted
Justin Thaler@SuccinctJT·Oct 21

A few reflections on the lattice vs. hash-only debate that our recent Aerie post sparked: 1. Cryptographic ossification for blockchains was never safe. Until the day we know with certainty that P ≠ NP, that finding short vectors in lattices is intractable, that Keccak effectively behaves like a random oracle in deployed SNARKs, and that every single bug has been eliminated from our codebases, blockchains cannot ossify. That is simply not how safe systems are built. Issues will arise, and the system will have to respond. It’s a double standard to reject lattices because blockchains are hard to upgrade if lattices break, while counting on upgrades if AI breaks your hash function or finds a critical zkVM bug. The best counterargument is that hash-only designs are more agile: if your hash function breaks, just swap out the hash. But we must aspire to a higher level of agility than this. Indeed, as I cover next, if SNARK recursion itself turns out to degrade security, the proposed hash-only blockchain designs would need to be rethought from the ground up. 2. The real security debate is not lattices vs. hashes — it is lattices vs. building everything on SNARK recursion. That’s because “hash-only” is not really hash-only: it rests on hashes plus the soundness of deep SNARK recursion. Ethereum’s roadmap relies on exactly that: hash-based aggregation needs recursion to keep up with a slot’s worth of signatures, and EIP-8288 would send other signature schemes and users’ own proofs through the same recursive pipeline. In contrast, Aerie proves a slot’s worth of signatures on one laptop without any recursion. All deployed post-quantum SNARKs rely on the Random Oracle Methodology (via Fiat–Shamir) to establish their security. This is an idealization we know fails in the real world: we have explicit counterexamples where “SNARKs” coming out of this methodology are totally insecure when instantiated with any concrete hash function. We generally ignore these counterexamples in part because they only arise when proving contrived, self-referential statements about the very hash function used by the SNARK verifier. But proving statements about the verifier’s own hash function is the exact thing you do in SNARK recursion. That’s why the security of recursive SNARKs can’t be established even in the random oracle model. On top of that, the standard security proofs for recursion (in other models) suffer an “extractor runtime” blowup that is exponential in the recursion depth, suggesting that security may degrade as more recursion is applied. Yet Ethereum’s own EIP-8288 enables unlimited-depth recursion, even as it lists soundness of recursive SNARKs as a trust assumption. Proofs in more idealized models avoid the blowup, but they mainly tell us that an attack on SNARK recursion would have to exploit the concrete hash function, which is exactly what the Fiat–Shamir attacks above do. To be clear, we don’t know of any outright attacks on SNARK recursion, and I very much hope it is secure. But some of us who have studied the question have a lingering sense that an attack may be possible in some settings. And if AI is going to supercharge cryptanalysis, there is no reason to expect it to spare Fiat–Shamir for SNARKs, let alone SNARK recursion, both of which have had far less scrutiny than lattices. So, I do not concede that a “recursion everywhere” hash-only approach is clearly more conservative than one built on standard lattice assumptions. 3. “Just wrap everything in a hash-based SNARK” (like EIP-8288) faces challenges. Aggregating signatures and proofs off-chain into a single block-level proof is a powerful design independent of the hash-only vs. lattice debate, and I am not telling people to avoid it. But claiming, as Vitalik Buterin did this week, that users can run whatever cryptography they want locally and wrap it in a client-side leanVM proof glosses over major hurdles. For example, leanVM today is a minimal VM designed almost entirely to prove hash-based signatures and recursion, not general-purpose computation. And binary-field SNARKs like leanVM remain slow at proving the integer multiplications that lattice cryptography does en masse. I am optimistic that many of these zkVM challenges can be met (including via my own work, binary-field Twist and Shout, which are now implemented in Magnetar). But regardless, if lattices can make aggregation simpler and faster, then they should be leveraged. We need to be agile no matter what. 4. For chains whose reason for existence is privacy, I truly struggle to understand the pushback. Public-key encryption (and fast single-server PIR) cannot be built from hashes alone, at least not in any black-box way. If lattices break, it is going to be very, very hard for these chains to provide acceptable levels of privacy and functionality. For a project whose entire reason for existence is privacy, a loss of confidentiality is an existential failure. Next to that, a second signature upgrade (after the first one, from elliptic curves alone to, hopefully, a hybrid lattice scheme) is easy. Summary: We don’t know for sure what is secure and what isn’t. We are all weighing unquantifiable risks against each other, and we do not need to agree on a total order on them. But hash-only solutions face many open engineering challenges, and they are not more “conservative” in the way some have argued. Some of those challenges are entirely prosaic and have nothing to do with bugs or cryptography, like hardware support for custom schemes whose hash function is still undecided. I hope we can overcome those challenges within the appropriate timelines, but they must be acknowledged and portrayed realistically. Overall, cryptographic agility and defense in depth (e.g., hybrid signatures) are the answer, which is why we are building both lattice-Jolt and hash-Jolt. In practice, the positions are less polarized than social media discourse suggests: for example, StarkWare is working to make Falcon verification cheap (falcon.provably.fast/), which is great to see. Here is the (apparently) controversial take I am sticking to: Conditioned on agility, whenever lattices make systems simpler or more functional, we should embrace them rather than default to “hash-only” designs. Lattices are what the rest of the world will depend on, with decades of study and hardening behind them, and at the system level, less functional often means less secure. Where hash-only designs are just as simple and functional, by all means use them.

Derek Chiang | Ethlabs avatar
⟳ smstack.eth retweeted
Derek Chiang | Ethlabs@decentrek·Oct 20

I made a visualization of EIP-8288 aka "recursive mempool aggregation," my new favorite EIP of all time because it perfectly encapsulates the thesis of the "cryptographic world computer" -- a system whose scalability *increases*, not decreases, with the level of decentralization. In a previous tweet I explained how EIP-8288 achieved this seemingly impossible feat, but one gif is worth a thousand words. Essentially, EIP-8288 leverages Ethereum's decentralized mempool as a parallel ZK proving cluster. Clients send signatures and proofs to the mempool, which over multiple rounds progressively aggregate them into fewer and fewer proofs, until the block builder finally aggregates them into one SINGLE proof. This design accomplishes five things at once: - The more nodes we add to the decentralized mempool, the more signatures/proofs Ethereum can process as a whole. This is obvious if you look at the animation and imagine more nodes in the mempool ring, which would "fan out" to more signatures/proofs. - By aggregating over multiple rounds (aka "recursive aggregation"), the bandwidth consumed by proofs remains constant for each node even as the network processes more proofs. As a result, the network stays decentralized even as capacity increases. - By aggregating proofs before one final aggregation by the builder, as opposed to requiring the builder to aggregate everything, the network can process more proofs without increasing hardware requirements for the builder. - By aggregating everything to a single block-level proof, validators can verify thousands of signatures/proofs by checking just one aggregated proof. Hardware requirements for validators can therefore stay low, keeping the network decentralized. - By aggregating not just native signatures but also STARKs, Ethereum can support any signature scheme by wrapping them in STARKs. So once again, this is how Ethereum will: - scale to process tens of thousands of PQ and private transactions per second - charge a tiny amount of gas to validate each txn, even though the original signature/proof may be huge (up to hundreds of KBs in size) - all while decentralizing even MORE. You are not bullish enough.

0:13

Ultimately, precompiles and EVM are both the wrong place to put most cryptography support into Ethereum. The reason is that precompiles and EVM both operate on data that has to be included into the ethereum chain somehow, which realistically means included in a block as calldata. That space is limited - even with PeerDAS and blocks-in-blobs, there's a practical cap of ~8 MB/s before it starts getting uncomfortable. Remember: it's not a blockchain. It's a cryptographic world computer. Any data/computation that does not need to be in the "main thread" of data/execution should not be put into the main thread. Instead, the correct solution is... EIP-8288 maximalism. If you have any heavy computation that's self-contained, compute it and STARK it client-side (this is quickly getting faster and faster, even on phones), and push the STARK through the EIP-8288 recursive aggregation mechanism. The chain sees the fact that the computation was done and what the result is; it never needs to see the actual data and computation. This way everyone can use whatever cryptography they want, the Ethereum chain can be lean, and we never need to add more precompiles again.

smstack.eth avatar
smstack.eth@StackDigest·Oct 19

100%, these days such claims sound to me like a bet that Ethereum won’t be able to prepare for PQ era - which won’t happen

PQ resistance is *not* a moat. Essentially everyone will have it and claims of PQ superiority over Ethereum from certain chains are intellectually dishonest arguments.

smstack.eth avatar
smstack.eth@StackDigest·Oct 16

Have to agree with this!

11/ Private transfers need public-key encryption, which provably can’t be built from hashes alone. So avoiding lattices in signatures and proofs doesn’t remove the dependence on lattices. It just trades their benefits for a false sense of security.