Dragan Pilipovic (@gagadrupal) header
Dragan Pilipovic (@gagadrupal) profile picture

@ethereum fellow, grantee @starknet, contributor @onlydust_xyz, ex @nethermindeth intern, ex Drupal dev. Interested in applied cryptography in blockchains

Novi Sad, Serbia
Joined April 2023
Photo by Dragan Pilipovic (@gagadrupal)Photo by Dragan Pilipovic (@gagadrupal)Photo by Dragan Pilipovic (@gagadrupal)
Dragan Pilipovic retweeted
I wrote a little note to explore the ZK-friendliness of Verkle proofs: hackmd.io/@dlubarov/B1rVbPgb… TLDR: Compared to binary Merkle proofs, it's hard to say which is more ZK-friendly; it will come down to a bunch of implementation details.
Specifically this is true for the ec-based proofs. Verkle tries are *bad* in our fri-based stark approach using small fields. As discussed earlier you can mitigate it by proving parts separately and combining them but that's tricky as well.
5
38
2
138
38,858
Dragan Pilipovic retweeted
Replying to @MihailoBjelic
ZK-ifying keccak merkle patricia trees with worst case 300 MB witness sizes is a non-starter. The verkle tree spec is designed to be zk friendly (eg. choice of curve, using pedersen as the hash) So switching to verkle helps with ZKing the L1.
61
25
6
267
60,788
Today from the ZK community gathering by @ethbelgrade: @gagadrupal presented stateless Ethereum with (of course, his favourite) Verkle tries and the Verge 💡 Did you know that each node in that trie has 256 children? 🤯 Many thanks to @gagadrupal and Aleksandar Veljković 🤗
3
27
1,239
We're excited to announce the next @ethbelgrade meetup dedicated to ZK! 🚀 Join us and don't miss this unique gathering with amazing speakers Aleksandar Veljković and @gagadrupal, great company, and beer. 🍻 📍@attic42 Sign up here: lu.ma/1zwkoam5
3
9
442
Dragan Pilipovic retweeted
Live for ETH Belgrade Community meetup #7 Novi Sad edition 🙌 Thanks HTECH for hosting us, and thanks @Neon_EVM for sponsoring this meetup 🥰 – at Novi Sad, Republic of Serbia
1
2
28
1,054
Dragan Pilipovic retweeted
anyone want to implement `hash_to_curve` (following this comment ethereum-magicians.org/t/eip…) in solidity? happy to explore a grant for the work
1
4
18
4,469
Dragan Pilipovic retweeted
93% of open-source contributors on @OnlyDust_com are eligible for the @Starknet airdrop. Keep building the future of tech, devs. You will be rewarded.
31
34
41
129
68,428
Dragan Pilipovic retweeted
EPF Study Group has been cooking for a while and it's finally here! An education program for anyone interested in the internals of Ethereum core protocol. With @joshdavislight, we will take you on a 10-week journey into the protocol and development👇 blog.ethereum.org/2024/02/07… Ethereum is an open but complex machine. And as the pace of core R&D is not slowing down, it becomes quite hard to keep up with everything. I believe it's important for the Ethereum community to understand what's under the hood and demand a focus on security, decentralization. This program is for everybody with a desire to technically understand the core of Ethereum. Whether you are a developer, student, or just a crypto enthusiast, EPFsg can help you safely dive into the scary depths of the protocol. Especially if you are considering joining EPF and starting your path as a core developer, the study group is a great place to begin your journey. Starting with a general overview and diving deeper into the architecture and specific domains, it's up to you what topics you want to focus on. As a part of this program, we are launching a Protocol Wiki. A knowledge base for gathering resources about all domains of the protocol. It's a community effort that will help EPFsg participants gain experience as contributors. If you are curious about the study group, considering joining or have any questions, join us for a town hall on Monday. All info in the announcement blog post:
3
18
65
4,838
Dragan Pilipovic retweeted
73
243
56
943
188,826
Dragan Pilipovic retweeted
By popular demand, an updated roadmap diagram for 2023!
1,603
3,785
1,112
15,591
3,713,396
Dragan Pilipovic retweeted
🔊 Calling all speakers! Today, we officially open speaker applications for ETH Belgrade 2024. Last June, over three conference days, nearly 💯speakers shared their knowledge, experiences, and brought immense value to the community. Can we exceed that this year? Absolutely 💪 Be a speaker at ETH Belgrade ▶️ ethbelgrade.rs/
12
4
26
3,436
Latest updates on the work towards stateless Ethereum, from Verkle Implementers Call #9! First, a quick refresher on the benefits we eventually get from all of this 📈 Not only will verkle/statelessness significantly improve the decentralization of the network (by reducing the amount of data most nodes will need to store), it will also help pave the way for additional performance/scalability work (potentially raising gas limit (tbd), improving i/o, etc). Verkle is also more compatible / gets us closer to a zkevm future we are likely working towards. But of course still work to be done to verify assumptions and evaluate tradeoffs of some of these decisions. Good thread here for further reading: nitter.gq/gakonst/status/1724978… On to this week’s agenda: 1. Client team updates 2. Small bug fix to MainStorageOffset 3. BLS curves & Verkle 4. Gas schedule changes: EIP-4762 5. State proof verification precompile: EIP-7545 === 1. Client team updates @gballet: Making good progress on the shadow fork. Attempted with the Holesky testnet, and because it's a real payload a few bugs were found that were not previously visible. Will have more to share soon (note: a shadow fork is a new testnet created by forking a live network with a small number of nodes, keeping the same state/history). @ignaciohagopian: completed some test vectors for cryptography libraries. Ran them in the Go implementation. Probably will work on the Rust implementation in the near term. Next up will be completing the other part of the test vectors for the Verkle tree data structure and witness generation. @Gajpower: for @EFJavaScript: working on stateless sync. Integrating the new gas schedule, and adding the charges for Verkle witness accesses. Have had some success there, and able to run a few of the transactions. Aim is to complete this week and then try again syncing into EthereumJS stateless implementation! @kt2am1990: for @HyperledgerBesu: working on having the same root hash for the genesis block. Fixed several issues. Last issue remaining was due to a small difference between the spec and the Geth implementation. Once we have the same generic state root, then should be able to join the testnet. Somnath: for @ErigonEth: have been able to join the network, but hit some issues on block 12 related to gas schedule mismatch. Working to resolve this issue soon, and then make further progress on syncing with the testnet. @jasoriatanishq: for @nethermind: working on fixing some issues with block production, and after that will get back on Verkle sync. Daniel: for @ethnimbus: finalizing the crypto library, and will integrate it into the Nimbus Verkle implementation in the next couple of weeks. Then can start seeing root hashes. === 2. MainStorageOffset fix @gballet took a few mins to flag this recent small fix, just to make sure all client teams are aware. Tldr: there was a mistake in the computation of the mainStorageOffset value. @kt2am1990 kindly spotted the issue, and Guillaume was able to put up a fix. When the testnet is next relaunched it’ll include the fix. See github.com/gballet/go-ethere… === 3. BLS curves & Verkle Next up, @CPerezz19 led a helpful discussion summarizing some conversations around BLS curves & Verkle, which was started in part from an exploration of a great paper recently put out by @asanso: github.com/asanso/bls-s/blob… Note: for a bit more general background on this topic I recommend this awesome resource put together by @benjaminion_xyz: hackmd.io/@benjaminion/bls12… The initial idea from @CPerezz19 was to see if it was worth it to try to find a new pair of curves which could have some nice gains. Feedback received from discussions with @dankrad/@GottfriedHerold/@ignaciohagopian and others was that the drawbacks of the curve used today shouldn’t actually cause significant issues. And the design of a new BLS curve isn’t worth the benefits at this point, considering the work it would take to actually put into a precompile etc. Also there is a good chance that BLS12-381 will make it into mainnet anyways via 4844, so it’s probably worth it to reuse this. Conclusion: sticking with BLS12-381 (plus Banderwagon) is the best path forward. === 4. Gas schedule changes: EIP-4762 Background: EIP-4762 outlines statelessness gas cost changes, and was initially created with the idea that this EIP would ship in the fork right before Verkle (to give time for dapps to adopt the new model, among other things). It’s no longer likely that these changes will ship prior to Verkle, because we can’t make the changes to lower gas costs for certain operations before implementing Verkle. Potential problem: a good bit of tooling breaks with gas schedule changes. For example, with each transaction, you have intrinsic gas which is gas that you pay upfront prior to execution of a transaction. With Verkle, this is something that we pay on the side, because we’d be paying the cost of adding it to the witness. So that means even sending a simple transaction might no longer be 21,000 gas with Verkle. This breaks some tooling because that value is hardcoded in a lot of places. Conclusion: should keep it at 21,000 with Verkle. When you start up a transaction, you'd read the sender account and read the recipient account, and those values won’t get charged. They are included in the 21,000. And those values get added to the witness with Verkle, so they don’t get charged later on. Guillaume to create a PR to update the EIP. === 5. State proof verification precompile: EIP-7545 Last up: there is a proposal to add a precompile that helps with state verification. This isn’t necessarily verkle-specific, as it could actually have the ability to verify merkle trees as well. How the precompile would work at a simplified, high-level: it gets the version from the first byte, and if version is zero it will deserialize the merkle proof. If the version is one, it will deserialize a verkle proof. The precompile returns one if it successfully verified the proof, and zero if it did not. Two points brought up by @ignaciohagopian: (1) this precompile should have a way to check which keys are being proven. Because if a contract is receiving a proof and using this precompile to verify, you will probably want to know specifically which keys are being verified. (2) other point is whether the support for merkle proofs is worth the added complexity, since at some point after verkle is on mainnet, merkle proofs may no longer have much usage. @CPerezz19: regarding complexity of implementation: it’s prob not that complicated to just support the precompile. The complex thing will be all of the logistics when it gets deprecated, or the maintenance burden, etc. The ongoing support costs even if no one uses it. @dankrad: regarding the precompile having a way to check which keys are being proven: ideally you'd want more for a really independent proof scheme. You want even logically to say what you want to access. Because even if you prove key values, then the proof is still dependent on the mapping. Conclusion: all agreed, and @gballet to think about how to implement the API. === That’s it for this week’s call! Check out verkle.info, or pop into the Eth R&D Discord (verkle-trie-migration channel) to stay up-to-date 🙏
statelessness = execution hints baked into the header allowing builders to assist other nodes: 1. reduce read load: read values are passed over the wire -> don't need to go to disk, 2. increase cpu utilization: know where you access -> perfect parallelism way undersold frame imo
3
17
1
52
7,900
Dragan Pilipovic retweeted
What does it mean ? It means that excluding storage update costs that will be fixed with Volition/EIP4844, in terms of pure computation, today a groth16 verification costs ~25$ to verify on Ethereum. With Starknet 0.13 dividing compute costs by 2, and groth16 verif with Garaga at ~1.3m steps, the computation for it on Starknet will cost less than one miserable $.
Just deployed my first ever Cairo1 contract on @Starknet mainnet because I was fed up of the baby 10k steps transactions I was seeing and I wanted to test the limits. Got this one with 2.94 Millions steps (current max is 3M) for only 3.65$. starkscan.co/tx/0x36df40f97e… Bullish.
6
19
4
112
49,815
Here are the latest updates on bringing statelessness to Ethereum, fresh from yesterday’s Verkle Implementers Call 🐘🔥 TL;DR: we have a new testnet (Kaustinen) live, with 4 clients and counting. Work is underway on integrating Verkle into Geth, which will happen over the next few months. Several other client teams are making significant progress as well. Still early, but it looks promising that the performance of Verkle will be competitive with the current Merkle Patricia Tree. There is a shadowfork in the pipeline as well, which will help verify our current assumptions. Read on for the full update below.. And hop into #verkle-trie-migration in the Eth R&D Discord to stay up-to-date, or to join future Verkle Implementers Calls. === Total of five agenda items on the call 1. The relaunch of the Kaustinen testnet 2. Client updates 3. Conversion strategy 4. Post-state in the cryptographic proof 5. Verkle proof verification precompile === 1. The relaunch of the Kaustinen testnet Starting things off, @gballet shared a quick walkthrough of the new testnet: Kaustinen, which is now live and running. Thanks as well to @parithosh_j, @Gajpower, and @jasoriatanishq for their efforts. See kaustinen-testnet.ethpandaop… We now also have a block explorer! Though it is still a WIP, it already will greatly improve our ability to follow along with what's going on in real-time. Currently the only CL client is Lodestar, and Lighthouse is coming soon behind The Kaustinen testnet started off with Verkle from genesis, so there was no need to do any conversion. In the future, the plan will be to attempt a testnet that starts off with the Merkle Patricia Tree, and then does the conversion over to Verkle. Few other changes live in Kaustinen: we now have the post-state in the block. Proofs are also being provided on Kaustinen. (But any client joining the testnet doesn’t need to be able to handle the proofs) Using Guillaume's fuzzer, he was able to do some basic tests: e.g. make sure deploying contracts work, sending a bunch of transactions, and also tested withdrawals. Next steps: work towards a future shadowfork 🔥 == 2. Client updates condensed summary of client updates... @gballet: besides the Kaustinen testnet launch, working on merging PRs into mainline Geth. Also doing some optimization and compatibility work with Ignacio. @jasoriatanishq: @nethermind also joined the Kaustinen testnet, and it’s been stable for the past 5-6 days. @URozmej asked if there is the ability to have a stateless node. Tanishq: will create a new configuration for that and share instructions. @ignaciohagopian: shared a document with some recent analytics from Kaustinen, using a modified Geth. This measures things like the average depth of the tree, witness size for each block, and proof generation/verification times. Super valuable tooling, though also important to note that this is all a bit experimental as we don't have much load on Kaustinen yet. @kt2am1990, @DoctZed, and @gagadrupal: for Besu, working on some libraries as part of the Java implementation of Verkle. The plan is to integrate these libraries first into Bonsai in Besu. This may happen as soon as next week. At the same time, working on the modifications needed to join the testnet. Using the rust crypto libraries. There was a question from Dragan on whether clients need to handle proofs to join the testnet. @gballet: if it’s just about *following* the testnet, you don't need to verify the proofs. You only need to be able to receive an execution engine payload that contains them. Daniel: for Nimbus, good progress, and substantial work on the primitives thanks to Advaita and Agnish. Using a library called Constantine from @m_ratsim. We have extended Constantine with the primitives needed for Banderwagon. Now in the process of integrating this library into Nimbus. Maybe 2-3 weeks away from seeing the first root commitment being computed correctly. Still a bit further away from joining the testnet. == 3. Conversion Strategy Next up, Guillaume brought up a question around the conversion strategy (how we migrate state from Merkle to Verkle), and whether the conversion should migrate N values per *block* or per *slot* After a brief discussion, the consensus on the call was that per *block* is better. Since it is simpler and better in the case of reorgs. == 4. Post-state in the cryptographic proof @ignaciohagopian first shared a bit of context on the rationale for previously including the post-state values in the proof, which is to allow clients to know about the state difference that happened in a block, without needing to execute the block. But if they are not executing the block, they are actually trusting the new root of the tree. Since you are trusting the root, you wouldn't gain anything by having the proof. After some discussion, realized it may have simply been due to prior confusion around the spec. Regarding the post-state values: it is fine to use these values, as long as you are aware that you have to be getting these blocks from trusted or semi-trusted sources. Ignacio has a working version of Geth with this updated, where the cryptographic proof only contains a proof for the pre-state, and *not* the post-state @jasoriatanishq: Nethermind has an implemented version of a stateless client, and though there isn’t a spec, it is fairly straightforward. The idea is that you get the pre-state in the block, then generate a status tree from that pre-state, and you verify that the pre-state proof is correct. Now you have all the values you need for block execution. Instead of using the actual state from the database, you just use this state for block execution. @gballet: Whether it’s stateful or stateless, it’s more of an implementation detail. It is up to the clients to decide what kind of store they want to have. And if they want to implement stateful or stateless it’s up to them. @URozmej: the EVM remains the same.. the only change is that you get the state from the proofs rather than the actual database. == 5. Verkle proof verification precompile Lastly, Guillaume shared a new EIP which adds a precompile to verify Verkle proofs, so that dapps/bridges/etc can call this precompile and get the proof verified without having to understand the inner workings of Verkle. Goal is to reduce friction around the adoption of Verkle. For a bit of extra context, in the future, it is likely that proofs are going to be distributed outside of consensus, and stateless clients will be able to choose their own proof format. This introduces an additional burden on applications. The precompile will make it easier for applications to support newer proof primitives without having to upgrade their contracts. See the Eth Magicians thread to join the discussion: ethereum-magicians.org/t/ver… Zahary added: the main use case for the precompile is bridges between different EVM chains. == 6. Wrap up Lastly, @gagadrupal shared a few quick things regarding Verkle in-circuits that he is currently researching. Spent some time looking into Zeth, which is a zkEVM project from RISC Zero. They showed that Keccak (perhaps unsurprisingly) takes a significant chunk of the resources for proving a block. But in Verkle, there is no Keccak, so that’s a small win already. And after the Verge it seems we will be in a better position to integrate with the latest ZK tech down the road. That’s it! Next Verkle Implementers Call will be in 4 weeks, and from there we will be switching the call to a biweekly cadence ✌️
7
36
2
108
25,372
Dragan Pilipovic retweeted
Ethereum, to be, or not to be (aligned)? I want to share my vision on the concept of Ethereum alignment. 🧐 Controversial? Nebulous? Bullshit ? Crucial? 🤔 Let see, here it is: hackmd.io/@abdelhamid/ethere…
120
90
25
421
327,373
Dragan Pilipovic retweeted
Great resource for benchmarking performance of various VMs: zkbench.dev/ IMO, it strikes the right balance between being un-opinionated and at the same time exposing the right level of nuance for various systems. Would love to see more VMs/langs added to this.
9
37
3,986
Dragan Pilipovic retweeted
collecting a list of public zk grant or training - for independent or aspiring zk devs airtable.com/appv1CMcMbgQHV9… I have @ethereum, @aztecnetwork, @AleoHQ, @axiom_xyz, @class_lambda, @MinaProtocol, @gitcoin, @Ingo_zk Who am I missing? DM or send here: airtable.com/appv1CMcMbgQHV9…
5
23
3
116
17,287