# Opportunities for the Ethereum Mempool | Joseph Poon - Warp io

- Speakers: [Joseph Poon](https://streameth.org/speakers/joseph-poon)
- Channel: [Ethereum Denver](https://streameth.org/ethereum-denver)
- Date: 2024-10-09
- Duration: 17:07
- Topics: blockchain, web3, ethereum, Entertainment
- Watch: https://streameth.org/watch/yt-bI_NfkUmOPQ
- YouTube: https://www.youtube.com/watch?v=bI_NfkUmOPQ

## Description

Currently, there Ethereum mempool requires a binary state for transaction validity in propagation, there is significant opportunity for improvement. As future work on Account Abstraction and "Intents" become more relevant, there are significant opportunities to improve the base p2p and consensus layer to make things more optimal, decentralized, and increase functionality/use-cases. A framework to think about the mempool will be presented, including transaction relay standardness, as well as other improvements.

APPLICATIONS FOR ETHDenver 2024: #YearOfTheSpork ARE OPEN


APPLY NOW
https://ethdenver.com/apply

## Transcript

we're working we've been working on a new EIP EIP 7640 uh in conjunction with uh Christopher Jeffrey and boa f um so this talk we're going to be talking about how sort of like high level how the M mempool Works sort of how we got here in terms of how the mempool works in reality today um why does proposer Builder separation exists what is the role um and then the proposed EIP and the effects principally uh making intents more decentralized uh encouraging greater proposer autonomy with reduction in TR trust in Builders um greater mle efficiencies and creat creating more decentralization and account abstraction so this is sort of what ethereum's uh you know pending transactions getting into a block looks like you know you can either go in directly or go through you know this like Searcher real you know whole me structure um so this isn't obviously how it's always worked right it's sort of just used to look like this how did we go from this to this you know there's a lot of discussion about me um but ultimately historically you know it was always this client over here that sort of decided why whether something got into a block you know all this other infrastructure exists now and what's the role of all these you know centralized providers what do they really do you know because before it was a peer-to-peer Network you broadcast your block people gossip it nodes gossip it along a peer-to-peer Network and then you know the validators um you know verify the block and then we're good to go so we got here because um we ultimately separated out um creating the block which transactions get into a block and the blocks themselves you know the validation creation and signing of these blocks and a lot of people think it's because well we need to hide this me activity you know there's a the if someone produces some type of me activity then you know um someone else can copy that trade and they want to hide it that's not actually if you think about it from a proposer perspective it doesn't actually make sense this is largely the rhetoric that we've heard from people this is not it doesn't make sense because if it's a hit if it's an activity that you need to hide from other people then the proposers aren't going to be getting a realistically like a high fee for that like the gas the gas tip for that is going to be very very small it's actually only well-known activities you know back running sandwich attacks that type of garbage that actually gets bit up so if you're a proposer if you're a validator those are the transactions that you actually care about if someone's doing some type of activity where they get some from a proposer perspective like if they're the only one I don't care I don't really care about mining this block so why do we have all this infrastructure right why do we have this whole notion of Separation you know and and a lot of it is you know if you're doing these types of attacks you know um that you need to bundle it you know and account account abstraction makes it easier to do this type of bundling without these types of entities um but this proposal is not actually MV proposal this is not actually an me presentation per se you can use this proposal in conjunction with countertraction to resolve these use cases but you know this is not a presentation necessarily unbundling however um you know there is a need for you know intense as we've heard in the space and intense is largely a buzzword we don't like what are really intense from a mechanistic perspective a lot of people talk about intents from a use case perspective mechanistically if you actually break it down what intents are is the fact that you can BR propagate along some type of mempool or some type of pending transaction which cannot be be um be a valid transaction today so in other words this is a revertible transaction this is an incomplete transaction but it's still being propagated so it's that okay this is not a real transaction or it's not fulfilled we're going to propagate it and then eventually it will change State due to someone else into a valid transaction and that is what gets mined so so mechanistically that's all really all this intense stuff is right it's that okay it's not a valid transaction right now we'll still share it but we'll defer uh producing it into a block until it's valid that's all it really is like a lot of people talk about it but mechanistically you know it's that simple and in ethereum whenever people talk about intense these are centralized providers straight up that's what happens you're talking to a server and that server decides what happens with it and you're sort of trusting them to do you know correct Behavior so to speak um and maybe that should be decentralized right but really if you look at why this structure exists instead of this it's fundamentally about contentious transactions and what do I mean by contentious transactions it's that if many people are trying to get the same transaction in think about your standard me then you know you only want one transaction to get in you know and and to to backtrack a little bit like this is not a presentation about getting rid of Ms entirely it's about making a more decentralized system instead of you know uh having centralized trusted providers so when I talk about contentious transactions let's say let's give a simple example um let's say there's an nft being released on chain tomorrow at midnight whoever bids first gets it whoever whoever like gets this into a block first and the first one inside that block just gets it it's that simple um let's say 20 people want it now only one is going to win right um so in the traditional ethereum mempool if you propagate this transaction and there's 20 people bidding on it intuitively you'd be like okay let's put in a higher gas fee right let's get let's get this thing in before other people however if you do this that means 19 other people will lose money from spending gas right and fundamentally if you think about it this is the core when people talk about me when they talk about this like proposer Builder separation this is the real problem if you break it down this fundamentally is the problem that they're trying to solve so you have all this like all these Builders all these relays and all this stuff because they need a market to form off of these people trying to get their transactions in right so so if these 19 people don't get their transaction in a lot of these providers will say hey well withhold the transaction and not include it in a block and we pinky promise to do that right that's all they're saying it's just a pinky promise and you know what happens as a result what happens is is that consequently because these centralized providers have a promise to you not to mine this block this means they cannot relay your transaction to other people and that is where the network effects of centralization comes in that is why on a fundamental level there's only four or six or so Builders out there because these Builders cannot share your information that is the core of this design that's really all it is so why do we have it this way right like why do those 19 people have to pay if you broadcast it along the ethereum mle um it's simply Den service protection um the P2P is an open gossip Network the ethereum like P2P um you know for pending transactions and you know the state of the transaction is not really known until it's included in a block because for example if there's n 19 other people trying to get it in well you know when you broadcast the transaction you don't know if you're the winner so as a result you have to um pay for the revert in order to make it so that the there's no denal of service in the men poool because I could flood the me poool with transactions that are ultimately invalid and this solution of reverting transactions and always paying gas it's a very simplistic solution but it's worked but because of this problem you know people have devised other you know centralized Solutions a transaction life cycle can be broken down into you know you sign a transaction your Lo local wallet produces it and then there's a relay policy and this is often times overlooked and this is a very very important point where in order for a transaction to go from one note to another before it's mined um before it's produced in a block um there's a policy established inside the peer-to-peer nodes on whether to send this to other peer-to-peer notes the pending transactions um an example is there's a maximum depth of pending transactions per account so if you've got an account with like let's say you know a 100 pending transactions you blast it out there well you know it'll only go up to about 75 or so and then you know the proposer decides what to include and then at that point um after it's included a block it can either be reverted or a valid transaction now the fact that there's a separation between reverted and valid transactions is fairly interesting because there's sort of three there's three sort of major filters whether it gets propagated on the PTP level and then whether it gets reverted and whether it's valid um what's fairly interesting is often times the constraint around the PTP layer is higher than what is accepted in a block for example the block can include a 100 transactions from an account but it's not allowed in the P2P layer so here's the proposal it's incredibly simple it's incredibly simple it's not a lot of lines of code um it's simply a new transaction type proposed in ethereum uh hard for core consens change um and it's simply having a field called revert protect and if a transaction has revert protect set then it cannot be included in a block if it's included in a block then that is an invalid Block it's sort of like including in a block like a bad signature or whatever it may be right and that means that you are now free to propagate these transactions among random untrusted parties because you know your transaction will only get in if it is if it if it does not revert however we need to address this denial service attack problem that was the original problem that we're looking at and it's a very simple rule if I'm a standard ethereum node today without an alternate mempool um the default Behavior will be to not relay the transaction and not accept the transaction and therefore there's no real impact in terms of existing nodes with no alternate mempool and then there's an additional op code to detect whether the flag is set in the evm um so in order to construct these alternate M Pools um the what what an example would be you know you have some type of you know public mempool in addition to the existing mol it looks a lot like it except there's flow controls so if you're an account let's say you're staking 32 you can broadcast it along a certain amount maybe let's say one per minute or whatever the flow rate is and then you also have a priority Q algorithm attached to it so if someone's flooding the network with an account you sort of you know downrank it and make it so that only higher priority transactions go through and this is a true peer-to-peer Network we're not talking about a new token model no new validators pure PP right and you can run this in addition to the existing ethereum PTP Network and it basically looks pretty much exactly like that um the minor difference is you can add intense to this but that's a whole another discussion additionally by having this change in this if you wanted to use the existing me infrastructure today you're reducing the trust in these me providers and what do I mean by that because you're trusting ultimately the me providers not to relay these transactions to other people right today that's what's going on with this change and something like account distractions or another EIP you can have an environment where these these me providers these Builders are willing to just share your transactions willy-nilly to other people and why is this important right we only have four to six of these people with this change you could potentially have thousands of these Builders you know there's no real reputation attach to them right now right now there's trust imbued in the block Builders and that fundamentally breaks the system in the long term because what happens is is that these people are withholding block data because they can't trust the proposers and as a result there's some risk in the system in the long term and hopefully this can create a new wave of decentralized mols a new wave of innovation on intents and Building Things on the PDP layer because like the PDP layer is sort of like you know it's a cobweb of code you know and I think we need a great deal of innovation to bring ethereum back to back to the Forefront when it comes to intense and I think we can get back to this this is really what we can get back to I think and so what are some use cases um decentralized Market formation and P2P moles that means that you know that nft example you saw earlier people just bid up their gas fees you know they just they're just the gas tip you just start increasing that it propagates everyone can see that and the pp Network you can just get a view on whoever the current you know winner potential winner is you don't need to rely on these you know centralized parties and it creates the opportunity for True decentralized intents um like I said earlier intents are invalid transactions today that may become valid later which need to be held in the mempool and right now you know you're just hitting some HTTP server for these intents you know they could reorder withhold your transactions ignore you front run you you might not even know and at least on a P2P M Pool it's very very public and you know you bid it up via gas fees and it's very straightforward um and it creates greater proposer autonomy and greater Innovation um proposer autonomy meaning that you know if you're if you're signing a block maybe you should know what's in the block you know maybe you should be building that um and you know this this nft example is why we don't have that um and we need more secure decentralized account abstractions account abstraction is getting in soon it's going to be popular it's going to be interesting um and right now the account extraction has a fundamental tradeoff between having only one bundler for your account of constraction contract or you relying on these Builders and the reason why this constraint exists is because their transactions can get reverted if you're bundling you know 50 transactions to save gas in account abstraction if one gets reverted you're kind of messed up because you you paid the fee for that transaction you paid gas for it and none of those 50 got in what do you do right that kind of messed that's kind of messed up so you have to use these centralized Builders and that's fundamentally baked into the account extraction design today without a change like this so in terms of uh Community process and how you can help um the EIP was just uploaded uh a couple days ago please review comments appreciated um and if you're building D apps I do think intents are coming I think it's a big deal I think you should be biased towards decentralized approaches and decentralized approaches means you're operating on a public mle or maybe even the builders are publicly gossiping your transactions and hopefully this can push forward ethereum towards a more decentralized future thank [Applause] you questions all right thank you
