Building with Anon-RPC and the alt mempool | Andrew Morris, Pierre Daix-Moreux at ETHGlobal Mumbai
ETHGlobal·Fri, Nov 6, 2026, 12:00 AM
Transcript
Oh hey, nice to meet you. I'm Andrew.
Nice to meet you.
All right, should be starting soon. All right. Not sure where this is started. Um can you guys hear me okay? Some thumbs up.
Sweet. Um all right. Uh super excited to be here. My name is Andrew Morris. I work on the access layer at the Ethereum Foundation.
Um [clears throat] and yeah, I'm here to talk to you about this anonymous RPC or anon RPC for short. Um, yeah, I'll get a QR code up here in a minute. I wasn't quite sure of the format here for today. It was a workshop, I believe. So yeah, I'm just going to be guiding you through what this project is.
So basically like anon RPC is a standard so that you can you can integrate anonymization into your applications. It's particularly designed for the web, but one of the things for the hackathon is that, you know, if you want to support it on a different platform, that's one thing that you could do. And but so who here like I imagine people know what Tor is as an example to make things a bit more concrete. Yeah. So the big thing that I did before anon RPC is actually a Tor integration for the browser.
So Tor we've been working with Tor Project because they have a rewrite of Tor in Rust. And the great thing about Rust is that it compiles to WebAssembly which runs in the browser. So we got that working and packaged it up as a nice NPM package and you can use that on your own if you like, but the nice thing is we've rolled it into this broader standard so that other anonymization networks can can work as well. And yeah, I have a diagram here about this. Yes, here.
I meant to put this up first. So yeah, this is the idea. So you know, you can imagine like there are, you know, other networks, other anonymization networks are not as well known, but there are, you know, different competing ones with different pros and cons. And at Ethereum Foundation, we don't like to sort of pick a winner and say, hey, everybody use this thing, you know, for applications and things that are outside of Ethereum itself. For the same reason that we don't say, hey, you should use this wallet.
This wallet is really great. We don't really want to be doing that for anonymization network either. So we made this standard for that purpose and also just to make it easier as well. So potentially your users can just plug in a different Ethereum address and it can load that code and run it in a sandbox and get that working on the fly because it's implementing the same standard. And so it's a little bit of explanation of the technical detail.
So because the code is loaded dynamically, we make sure that it's running inside of a sandbox. So a little bit, I think it's an underappreciated thing about web browsers. They're actually designed to run untrusted code. You know, obviously it's not foolproof and there are exploits that happen, but it's a lot better than just running code normally on your machine. And so we make use of that so that when you load this code dynamically, so that your application can talk to either Tor JS or Nim or other networks that work with this thing, that it can just swap in that code easily.
And you know, there's still some amount of trust that you need to worry about, but it's not as much of a problem as just kind of dynamically loading code straight into your app because if your code is running like over here, you know, you've got like private keys and things inside of your wallet and you don't want that stuff to be exposed so easily. So instead the code gets loaded into a web worker inside of a null origin iframe and that prevents it from talking to anything that it's not allowed to have. So yeah, this is this is the website. The I've got a This is the QR code if anybody wants to capture that one. So I I mean, there are links on the the Global website, I believe, but you can also just scan this one.
I'll leave it up there for a moment so that if anybody wants to to capture that one, they can get to it nice and easily. All right. Yeah, I'm sure you can find it. Let me know if you if you still need it. So, what do I want to show next?
We have a demonstration for on RPC. So, like I said, we work with tour. So, this is tour running in the actual web browser. And so what it does is it loads the code from from on chain. I'll Let me just I mean the demo is not super interesting just to look at it.
Basically, it you know loads the code and then it looks up a contract and queries its balance. Be a very large amount of ETH because it's like the deposit contract for the consensus layer. And it might struggle a little bit over the ETH global Wi-Fi. Yeah, I promised I promised that it would I tried it right before the presentation. [laughter] It worked just fine.
Okay, let me like walk you through a little bit about what it does. So, in order to configure a network, you specify a contract here. So, this contract you can look it up on Etherscan or your favorite block explorer. And if you go into Where are we? How can I find it?
Contract and read contract. You can see what this contract is doing. So, in order to figure out what code to run and like where to get it, the contract gives you that information. We can't just put all of that code on chain because it's not economical to do so. So, what it does is it has this worker hash function that will tell Anon RPC what is the hash of the code that is supposed to run for this network.
And so it can get it there like that. And there's also a list of resolvers that are basically like URLs. And so you can get it from any of these places. Let me see if I can actually Here we go. So, if I actually like try to load this code, we'll see whether the the Wi-Fi wants to agree with me or not.
I mean, it's not very interesting. It's basically a big JavaScript blob. Uh Oh, I accidentally copied two URLs. Hang on. It's that one.
It's much shorter. Here we go. Um so yeah, just like lots of JavaScript code. So, embedded inside of here is actually implementation of Tor. Um this actually in WebAssembly.
So, there would be a like a big web um WebAssembly blob in here somewhere. I'm not sure where it is. There it is. Um So, this is just like a big base 64 encoded blob of WebAssembly that needs to run. And so that will run inside of a sandbox inside of your application and allow it to talk to Tor.
And then if you want to talk to a different network, all you have to do is supply a different address. Um so I think I'm running out of time. I'm sharing the stage with colleague of mine who's going to talk to um uh about the alt mempool. And so before his slot comes on, let me just cover So, this is we have a $5,000 um prize pool for building on on on RPC. Um and there's like there's three different components to to on RPC.
And so you can get creative with this, but if you want to hack on something with on RPC, there are basically three different ways to do it. You can make an application that uses RPC. That's the, you know, most obvious way to do it. Um but you could also try making your own anonymization network um and writing the the network code to make that work with on RPC. Um or you can implement the what we call the harness for RPC itself.
So, the part that does have to get integrated into your application that's um uh not the the network code that gets loaded dynamically, but the the code that's responsible for fetching that code and making sure that the hash matches and all of that sort of stuff, um you could implement one of those uh as well. Um so yeah, I apologize if that's not uh totally clear cuz I have to go through it pretty quickly. Um but uh yeah, I'll be available outside after this if anybody wants to uh come and get some more detail on that. I believe there is an Ethereum Foundation booth kind of over there. Um so I'll be there and I'll be happy to uh hang out for a little while and take some questions.
So I think uh I think that Alex uh is also here. And yeah, if you want to come take the stage. Yeah, um meantime thank you so much and uh good luck everybody.
[clears throat]
How's this on? Is it uh Yeah, hi everyone. Uh my name is Alex. And uh I will uh explain the uh prize for alternative mempools for frame transactions in Hegeta. Um so uh next year sometime uh Ethereum will be upgrading to the uh Hegeta hard fork.
And one of the main innovations of the Hegeta hard fork will be the new transaction type. It is called uh frame transactions. Uh frame transactions uh basically introduced like native account abstraction on Ethereum replacing uh what was formerly implemented usually using ERC 467. This allows you to programmatically validate Ethereum transactions. If all transactions were using like just ECDSA recovery and balance checks with frame transactions, you can actually program your own validation.
What we talking specifically here tonight about is mempools for frame transactions. So because of the like more complex setup that frame transactions have, propagating frame transactions through the mempool is a more difficult problem for mempool nodes to solve. And they need to execute the validation code that you are providing them, and this can kind of overload the mempool nodes and they can be potentially attacked by like denial of service. And the mempools need to limit how much work they are doing. So for example, mempools are limiting the amount of gas that you spend validating your transactions.
They restrict which opcodes you can rely on in the validation. They restrict some opcodes entirely, like if you have a timestamp or a block number, you are not allowed to use them in validation because you could therefore use rule that like my transaction is valid in the blocks that are like divisible by two, and that will create a lot of like overhead with no gain for the Ethereum system. And some contracts can be like created like in association with people working on EAP, and they can then become canonical, meaning they get some exceptions from the rules imposed by the protocol. And therefore like we we do a lot of things for the mempool and we don't need to force all of our ideas about how mempools can be organized to the Ethereum L1 to the mempool rules of the canonical mempool of Ethereum. The canonical mempool will be designed in a way to minimize risks and avoid unnecessary complexity on a any complexity at all cost.
It will be designed in that way. We can prioritize more features and permissiveness in alternative mempools. We can build things like reputation systems where we recognize contracts that are used in the mempool and therefore create trust. Like this is similar to how like people learn to trust each other by interacting and learning that this person is reliable. We can introduce like mechanism for cyber resistance so a single attacker does not have an opportunity to deploy thousands of contracts under its own name and overload mempool nodes by doing this.
And we can create advanced heuristics for transactions entering the mempool which allow us to detect which ones are worthy of admission and which are not. So like examples of what we really can do and achieve for the users of Ethereum frame transactions with alternative mempools, we can just raise gas limits on validation. So if your validation needs to like verify a post-quantum signature and it takes 2 million gas, you would definitely not be able to do it using a canonical 8141 mempool, but with alternative mempools it is possible. You can fill a mempool with more transactions in parallel using the same entries which is important if your entries this are supposed to be shared by multiple participants. If you have a paymaster, if you have a sender that is also like a privacy protocol, uh you need to have this capability.
Uh you can write storage in the validation. If you go to the specification of uh trend transactions today, you will see that you need to verify your transaction statically without writing any storage slots. This is no longer required if you are willing to use an alternative mempool and change how transactions are validated. You could, for example, pre-charge the user uh ERC 20 tokens, same as you did in ERC 4627 if you worked with that. And then uh after the execution uh re like convert it to ETH.
Uh you can relax some opcode limitations. Uh you can customize rules for your uh exact use case. Uh and crucially, we don't even need like everybody in this room, generally speaking, to agree on what mempool rules are. Uh you can have groups of nodes. Like if sufficient number of uh people in the mempool nodes uh agree that this mempool rule set is uh valuable for their use case, uh they can create a sub mempool.
And by this way, they can create like additional exceptions or additional rules in the mempool and only exchange the transactions that satisfy this mempool among themselves without flooding the rest of the mempool with transactions that it cannot uh verify. So you can uh provide exceptions uh for codes that you know, like you trust this contract, you deploy it, and you can exempt it from some rules. Or if you need to run this like 2 million gas uh validation function, um you can create an equivalent of that function in Rust. You can just compile it into a binary for your architecture. And then when transaction propagates through the mempool, you you you can give it a a You don' need to charge gas for this accelerated transaction validation in the mempool.
Like on-chain, of course, you would still pay this money, but your mempool nodes can learn from it and not like exempt this transaction and reject it for using an expensive validation. You can a completely custom approach to like how you track reputation of participants of the mempool, change how admission rules work. Like you can do any innovation because the mempool itself lives in the application layer in this case. This is your application or like shared, but it's an application on top of Ethereum mainnet and not part of the core Ethereum. And it is not a theoretical like use sometime in future idea.
There are like real use cases that as defined today could benefit from having a shared but alternative mempools. Top one and the most important one, of course, is privacy protocols. So this this is a very important feature and important thing to have on Ethereum. We want people to be able to withdraw transactions privately and without relying on a centralized relay or decentralized but still relay and they should be able to just broadcast their transactions to a certain mempool. And privacy protocols often like have a high spend of gas when verifying that you have a deposit.
And another use case is obviously like token paymasters because token paymasters write the storage usually, especially like the ones derived from ERC-4727 in as part of validating a transaction. Another common like referred use case is a key store contract. So, uh you want uh to store the credentials that unlock your account in a separate storage place that is maybe protected by different rules. And uh this uh is an external storage if you look at the frame transaction layout. And you can be concerned by like the mempool, canonical mempool will be concerned by you having access to an external storage, but an alternative mempool would uh allow such operation for a specific key-store contract.
And of course, the very high like gas use uh operations of in cryptography like quantum cryptography and zero knowledge proofs uh would not be very feasible when if you have to propagate this transaction through the canonical mempool uh if the every node of the mempool had to like validate the zero knowledge proofs, they would be without knowing if they will be compensated or not, that would be uh very wasteful. But with introduction of the reputation systems and civil resistance, we can uh accept such transactions in an alternative mempool. So, the paymasters uh with storage write capabilities uh already commonly exist in the ERC-4337 ecosystem. Uh usually that is uh ERC-20 token paymaster uh pattern where token just is charged from the user and swapped to ETH. But there are other uh ways uh that like paymasters are done.
They You can have like NFTs uh moved in the paymaster or like uh customized internal deposits uh in the paymaster. And all of these use cases require an access to like storage reads and writes. Uh so I I've talked about uh mempool level pre-compiles, which means that the some uh code in the validation uh has a special role in the mempool and therefore is replaced by an like executable and is given like an acceleration and a discount in terms of gas. So like looking practically what we have built in our team is an mempool node process which is a separate repository separate process that block builders run like on the same machine or adjacent to the block building process that they have. And this sidecar mempool project maintains a connection to other nodes on the network accept the transactions, validate them, refreshes the validation when the new blocks are created by other builders and when your builder gets time to build the block it gets the array of frame transactions that are valid at this point and are already pre-validated and can inject them into the block building pipeline without having to re-run the validations themselves.
So like block builders and like mempool sidecars interact we are a like trusted RPC endpoints. They authenticate each other and the mempool nodes join over the peer-to-peer network and different sub mempools are how much?
Time's up already.
Time's up. All right. So what you will not know for the hackathon you start with a mempool workshop. This is a repository that has all the steps that you will need to get connected to the running mempool. You can also read the details of the project on altmempool.
wtf. Let me know when you have this link. We will have a booth out there like just a second. So this is the uh workshop. Uh I suggest you let your agent check out the steps that uh if it is able to complete all the steps that means you are fully on board with uh the mempool rules.
Yes. And uh uh the cut on rules are not loading. Yes. Best use of frame transactions alternative mempool. Uh $5,000 first place, two and a half, second place one and a half, and third place 1,000.
We are looking for something that is making on specifically uh enabled by the alternative mempool. So applications that need frame transactions and applications that need an alternative mempool that cannot exist uh without frame transactions. Uh yes uh that's it. Uh you you can go over the details uh after it. Uh yes uh that that would be it for Um should I Okay.
Thank you.
Automatic transcript — names and jargon may be misspelled.