PEEPanEIP #1: Writing an EIP with Matt Garnett
PEEPanEIP · 24 Aug 2020 · 35:50
Matt Garnett walks through how to write an Ethereum Improvement Proposal, guided by host Pooja Ranjan of Ethereum Cat Herders. He defines EIPs and their main types, including core, ERC, informational and meta, then follows the lifecycle from idea and draft through review, implementation, last call and final, stressing that final status is separate from inclusion in a network upgrade. He describes the roles of authors, champions, editors and core developers, shares strong and weak EIP ideas and common mistakes, and Greg Colvin joins the Q&A on how editors treat new drafts.
Speakers
Topics
From PEEPanEIP; community: ECH Institute.
Transcript
Hello everyone, I'm Puja Ranjan the herder and chief from Ethereum cat herders and I welcome you all to the first episode of EIP focus series P and E. Just to give you a little background based on my engagement with the network upgrade and protocol improvement process since joining the cate group. I sensed a gap of education required to understand and accept the Ethereum improvement protocols. This was the motivation behind my proposal of a video series dedicated to discussing Ethereum protocols.
Core protocols are somewhat discussed in the all coder meeting. Maybe that is helpful to an extent to understand the technical specification. But I strongly believe that an ELI5 version could be helpful for community understanding and adoption. Similarly, there are hundreds of non core EIPs resting in draft status. They could use some visibility through this series where EIP will be explained by the author itself.
Today we have Matt Garnet. Many of you may have known him as light client to talk about the basics of creating an EIP. We also have on the call Greg Calvin, an experienced EIP editor, William Shaw from our talented caters group. So without further ado, let me pass the microphone to Matt to get started. Thanks a lot, Puja. You know, I think this series is an awesome thing that you guys are doing for with the cat herders.
I definitely empathize with the need to uh bring this process to more people in the community. I think it's a really important process and so I'm pretty humbled to talk about it with everybody today. So hopefully by the end of this you guys who are watching will understand a little bit more about what it takes to write an EP and what the process uh that an EP goes through to get it in some sort of finalized state and how that differs from the process that it takes to get it included into a network upgrade.
So what I'm going to cover is everything that includes the definition of EIP timeline for EES and people are participating the structure. We'll go through some examples of good ideas for EES and things that may not be as good ideas and then some common mistakes that people make that I've seen that people make when they write an EIP and we'll wrap it up with some Q&A um of this and then other things around the E process. So with that said, let's define an E. Uh I think of it as a concise and thorough document. I generally think it's a technical document in nature. The standards track type of E is one of the types of ES that's most prevalent and
these are technical documents that refer to some sort of specification. Um the most common one that people might uh the mo the one that most people might be most familiar with the the type of uh standard track E that usually is most divisive in the community or the core uh category of EPS. And these are things that would that actually change the consensus um of the Ethereum protocol. And so these sorts of EPS are the ones that are very prevalent in those sorts of discussions. The most popular category of E is the ERC type of standards track E. And this usually defines interfaces
for smart contracts on the Ethereum network. And this helps define standard that let people interoperate with uh smart contracts. And the ERC20 token is a great example of this type of E. It defined an interf a token interface that uh different types of smart contracts could utilize. And so things that kind of live within that live within this ERC category. The interface and networking types of EES are important for the client, but they aren't necessarily things that necessitate network upgrades. It's really the consensus related changes in the core category that uh need to be included in some sort of network upgrade.
The other two less popular types of EPS are the the meta E and theformational E. And I think theformational Essinally underutilized in the process. I think there's maybe four to date. And I think there's a lot of information in the community that it would be better served as part of this EPS repository. And so going forward, I'd really like to see more of theseformational EES where you share knowledge that's beneficial to the the community as a whole. And I'll talk about some examples that I think that might fit really well within that category or that type of later.
So the process of the E generally starts with an idea. And if you're already familiar with kind of what the process for the EE is, you might notice that these aren't exact onetoone correlation with what is listed in the E one, which kind of specifies how this process works. And the main two reasons for that is it's likely that the actual names of these stages are going to change in the future with some work from the Ethereum cat herders. Um, but also I think that the pro the very the general process will always stay the same. And this is, you know, very high level what happens whenever you come up with an an idea for an E and you move it all the way to some sort of finalized state. And it really
starts like with this idea where think that you have something that you want to do to the Ethereum network, whether it's upgrade the protocol in some way that will make it that will make it better, provide more utility for the community, or you want to propose some sort of standard that the community can utilize that should be interoperable with contracts. And this is a stage that's often overlooked. I think it's really important because it can save you and the people in this process time. Uh if you just, you know, talk to some people about your idea and try and understand if it's been proposed before and if something related to it has been proposed before, what the feedback on that was and try and uh use that to to vet your idea some more and decide if you want to move to to next stages.
If you do that and you're happy uh with your idea and you think that there's a a need and the desire for the community to have this idea, then you can move on and actually write a specification and in this draft format, it doesn't need to be perfect, but it needs to embody the idea enough of a way that it's a good reference point for people to give feedback on. And that's going to let you move to like this next stage of iteration. Once you have your draft in that format, then you would want to submit a poll request to the ES repository and the editors will take a look at it and make sure that it meets the criteria for being a draft E. And the criteria is is all listed in the E1, but it's generally like does it uh is it
syntactically correct? Are is the information that needs to be there included in the E and these sorts of things? They might give some some technical ter technical feedback on it but at that point they'll merge it into the repository and you time to start to really iterate on this idea and to share with the community and try and get feedback so that you can um move it on to implementation and testing. And the implementation and testing and iteration phases will probably go somewhat handinand because as you're implementing testing, you'll find things that may need to change within the specification. And so you can work through this process yourself and with the community as they're, you know,
learning about this E and and reviewing it. Once you get this E into a place where it's implemented and tested, it's generally time to move it to motion for it to go into some sort of last call stage. And this is kind of the stage where you want the broader community to take a look at this E. You're happy with the its progress and you don't think that it's going to substantially change in the future. And so you want to make sure that it has a lot of eyes on it before it's moved to this some sort of final state that it can't be removed from. And so if your E goes into this last call stage and doesn't receive any substantial request for changes over the two week or so period, then you can motion for it to become final. And it's
important to note that this final state is really just a statement of the E itself. It's not a statement of will it be included in an upcoming network upgrade or anything. It's really just saying that this E has been looked at by people from the community. the author or the champions of the ZE don't see any substantial changes coming to the ZE in the future and so it's in this finalized state but that does not mean that it will eventually be included into a network upgrade that's a completely separate process from just the EIP uh specification process so during the process I'm sure you noticed there's a lot of different participants and I just wanted to like quickly talk about the different roles
that people play and some generally what they're the importance of their roles and what they do and the obvious you know starting role is the author are authors of the EP and these are the people who kind of have this idea and write this initial draft and it's possible that the person who authors this E uh is either unwilling or unable to to be its champion which is generally referred to as some sort of manager for the the person who really drives it to reach some sort of final state also maybe carries it on to try and make it into some sort of network upgrade. It can be the author and it is the author in a lot of occasions, but sometimes there's the need for champions other than the author to be the sort of
project manager and really make sure that the people are implementing the E and that it's getting tested and socializing it across the community to make sure that the feedback that needs to be given is given. Then we have the editors who you know are probably the most formally defined role in the process. The editors are listed in E1 and their role is generally to facilitate the the E process and to make sure that the EES that are going are properly following the process and that they're syntactically correct and they are filling out the correct structure of the EES. And sometimes they give technical advice um to EES and they try and help people determine if their E
is like is really actually a good idea to be an ER if it doesn't necessarily need to be one. I think that a lot of people put too much pressure on editors to give technical feedback. And I think that it's not necessarily the editor's job. I think it's the community's job as a whole to really help provide technical feedback. It's not it's not reasonable to think that editors are going to be an expert of every aspect of the Ethereum protocol. And I think like a good example is if there's some sort of e for modifying the RPC for Ethereum clients. If you're a developer who regularly uses that, you're in a good position to give feedback and to uh try and comment on that sort of eth and say why or why you don't think that that that's a good
thing. And that helps alleviate some of the the editor's jobs for giving those the technical feedback. And then the last important role, the last participant is the core developers. These are the people who are maintaining clients and have a really good understanding of what's feasible and what's not feasible with the core protocol. And so although their time is incredibly limited, if you can get them involved and you can get some feedback from them early on, it can help save a lot of time and you can understand, you know, from their experience what may or may not be possible.
I don't want to go into too much depth on every single uh portion of an E, but just so that people understand this is the general template that a standards track E would follow and this is very much geared towards a a code heavy E. we have things like uh test cases and implementation and stuff and so maybe theformational or metatype of EES wouldn't have this sort of thing but for the standards track you would want to follow this sort of structure and everything here is defined in depth in E1 and it explains exactly uh what you need to do for each of these and we'll touch on a little bit more about some mistakes that I think people make
whenever they're trying to follow the structure later but this is generally what an E needs to have for it to be considered as some sort of draft E and to to be accepted into the repository. So now I just want to go through just a few examples of things that uh might make a good E and or some things that may not be as eable. And the first example is an E that could introduce an OP code which returns the senders not. This is definitely a standard track core E because it's modifying the EVM. This is something that you would want to do a network upgrade to achieve. Uh it you know it's up for debate if this is an op
code that's valuable to the community is really providing utility to the protocol. It's something that would be determined through the e process but as a draft as an idea this is definitely like along the right path. Another example is something that would reduce gas cost of call data. This is this is something that's been done in the past and is a obviously a good example of you know when you want to do an E. If you think that something is overpriced in the Ethereum gas schedule and you can explain and give some rationale why you think it is then this is obviously a good example of something that that you would want to write an E for.
Something that you wouldn't want to write an E for is something that uh is inherently single use or something that doesn't need to be interoperable across the network. And if you have some gaming contract that you've written for your DAP, this is, you know, it obviously has an interface that your DAP is using. But unless a lot of other contracts on the network need to interoperate with your gaming contract or more of your gaming contract will be deployed with the same interface, it's really unlikely that you need to standardize this. This is something that you would want to standardize for your own purposes, but it doesn't provide utility to the community as a whole.
Another bad example of an E is I think that a lot of people want to add Ess that add a lot of complexity to the core protocol whenever it's important that we we try and keep that as simple as we can and you know there could be an E that adds an op code to transfer like an ERC20 token and I see that as mixing the higher level um DAP level of the protocol with the core level of the protocol Um and maybe this is maybe there's could be a valid discussion that could be ha had here to explain why you think that having native uh creatable assets in the core protocol is valid but generally we try to avoid adding undue
complexity to the core protocol that can be implemented at higher levels. Those are things that we want to try to avoid um having as an E um as anformational E. I think that uh explaining some of the gotchas about client development will be really valuable and I think the Gothereum team does a great job in their poll requests and they've recently written a blog pose about this exact topic about how to efficiently represent the state database on disk and I think that this sort of these sorts of things would be very valuable to write in in each format and save for posterity for the future and for future client developers to understand and
So I think this is a really good example of an informationational type of E because it provides utility to the to the community and the protocol as a whole. Uh the last example I have that I don't think is a good example of an E is if you have if you've released some sort of DAO and you want to give an update to the community on the status of your DAO. I don't think that's a um a good example. Even if your DAO is completely decentralized and open to anyone, it's unlikely that the community as a whole is interested in your specific Dow. And so you wouldn't it's not providing utility to the community as a whole to provide information about uh the specific Dow give updates. You would
want to do that through whatever channels you've built with your community, whether that's like Twitter or a blog or something. the EPS repository is not a great place for that to to to occur. So, some common mistakes that I've seen um while I've been looking through EES in the past, uh I think that the number one mistake is just people don't read E1. E1 is kind of your manual for writing an E. It defines everything uh very clearly. It defines how to write your E, like what should be in each section, what the process, what the stages are. And you know, a lot of the stuff that I've pretty much everything that I've talked about in this presentation is written explicitly in
each one. And so, it's important that if you're going through need to go through this, you can read it several times and understand what what what needs to be done to get it to a certain state. That's going to alleviate a lot of um a lot of back and forth that's going to need to happen between you and editors who are required to make sure that EES conforms that that standard that's specified. I also see a lot of spelling and grammatical errors and we have um tools in the repository to help alleviate this sorts of stuff but I think that this these errors just come from not respecting the process as much. I think it's too easy to do, you know, write an E and
because of how easy it is and because of the lack of respect for the process, people just write out something and not give it a second look whenever this is a really important process for the decentralized very important decentralized network. And so I think the spelling grammatical errors can like easily be alleviated if you if we just um respect the process more and um and people uh take the time to actually go through it and and and double check their work before submitting it. I also see people avoiding community feedback.
This is something that's that's critical to have from the idea stage all the way to the last call. You can't write it e in a s in your own box. you need to re receive feedback and iterate on it. It's really unlikely that you're going to know everything that needs to be done. It's unlikely that you your point of view is the point of view held by everyone in the community. So getting the feedback is critical. I see a lot of people mixing the motivation section of the E into the abstract. And I think it's important that the abstract focuses on just the technical change that the E proposes rather than being more sensational. Both sections are really important and the motivation section is extremely
important to to show why an E should exist, but there's a specific section for it. I don't think that the abstract is necessarily where a lot of that should live. Like the gaming contract, I see a lot of Ess that are focused on these single use cases. I don't know if it's people just want to write an E to write an E or they they want some sort of prestige associated with an E number, but writing a E for a single use case that's not going to provide utility and interoperability for the community is is not useful. And the last common mistake that I see a lot is people who just abandon work. I think there's been some pretty high profile leaps where the author has written some sort of sensational leap. they've drafted it and they've never kind of come back to
actually uh merge it in and and take the feedback that the editors have given them and and integrate that into their work. They just for some reason or another uh never come back to their their uh draft and so it just sits there as a poor quest for a long time. So I think that if we can just avoid some of these I think the process as a whole would you know improve a lot. So if you want to get involved, uh the place for pretty much is on GitHub at the EPS repo under the Ethereum organization. This is where you can see the raw uh version of all the ES and their markdown format and you can submit your poll requests to include your own
EES. There's also a discussion form e magician.org. So if you're interested in following the discussions around EES, this is generally where those take place. If you're interested in following discussion for a specific E, I would recommend taking a look at that E and then seeing where it's discussion to is uh pointed to, most of the time it's an Ethereum magician's thread, but sometimes it could be a GitHub issue or something else. That's all I have for uh the presentation. I'm really excited to see more people get involved with the e process. I think it's incredibly important process in the Ethereum community. And so the more people that we have involved in it, I think the higher the quality the EPS will be and
therefore the higher the quality our protocol is going to be. So with that, is there any questions we have? Okay, maybe first um I might try opening up the floor to Greg just in case there do you have any comments that you'd like to add? You're still muted, Greg. Okay, a lot of background noise here. Um, yeah, I just really appreciate the presentation. So, thank you very much for that. Um, um, not a whole much not a whole lot to add there. A lot of people start up an e
as, uh, as an issue on the repository. U partly that grabs you a number uh before you're ready to actually do a PR and sometimes PRs are a pain if you don't know how to use uh JIT. So you sometimes want to put that off a little and so an editor editor can help you with that stage. Um I think that the meaning of final maybe that's um in flux but we editors from way back only intended that for uh for core EIPs to mean that it actually got deployed.
What's final about it is once it's running on the network it can't be changed uh except to correct it uh to to reflect what's actually running on the network. So that's what's final about it. Um, and I guess that's still under discussion some, but whatever we call it, that's a very important um, what's the word? [laughter] It's an important landmark once once it's on the network.
So those only little things I notice go by. Um, I know there's been a bit of a question which I might hand over to Pua about interacting with the bot as in there is a bot as far as I'm aware that is active in the EIP repo that checks the EIPs are properly formatted. Um, what people who are having difficulty trying to figure out what the bot wants from them or Pujo if you could elaborate on the question at all. Um maybe you'd be able to talk a little bit about what what people can do about that.
Right. Uh so when we submit a a pull request in the EIP GitHub repo, sometimes we see a green check, sometimes it is a red mark that that is easily visible. So my understanding is that's because of validated bot. So uh I would love to hear more about how people can get past the bot. I remember encountering such issue myself. uh for an example like when we submit a pull request the EIP1 suggests that we should not be entering the EIP number it's a job of editor but if we do it without that sometimes we feel the red mark I mean we see the red mark so how how should we proceed towards some mission and see
that we are able to pass the part checks that's a pain. Um, Nick Johnson, I think, wrote wrote the bot and then he sort of disappeared on paternity leave. Um, and I'm not sure I'm not sure if he's coming back or not. We haven't heard from him much. Uh, someone took on some maintenance of it and I can't remember who. Um, so we need whoever that person is. I don't I don't know how much they're sticking to it, but we need someone to to take on maintenance of that bit of code and probably we need a bit of
documentation about what does this thing expect of you. Um, but if you follow the little links into the details, the error messages will uh usually try to tell you what you did wrong. All right. Thank you. Another question is related to uh these kind of stuff only when we talk aboutformational and meta e um as explained in one of the earlier slides about the you know parameters that we should consider. I think security consideration and test cases may not be valid for those kind of eats. So when we uh you know createformational or meta e if we if we remove these
sections do you think it is the right one or do we have different template for different e I think once you get out out of the technical leaps into those all bets are off. Um, and even in the more technical ones, um, you you can violate the structure if there's a reason to, and then the editors will argue about it a little bit. And, uh, from my point of view, if the thing makes sense and you can implement it, I'm not too worried that if it's just information, present it as is appropriate for the information.
Um, Matt, maybe if I could comment on a little bit of the presentation. You mentioned uh problems with spelling and grammar occasionally. Um, I've not I definitely am no expert on the IP repository itself, but I'm wondering is some of that possibly just a language barrier. And I mean to make that into a more practical question, someone who does not speak English as a first language and may have limited faculty in English, how how do you think they should be going about trying to get EIP drawn up? Yeah, I mean that's a good point and I definitely think that part of it is that the you know the EPS repository is mainly an English repository I think all in English repository and so people who
don't speak English as their first language it's hard for them to construct really good grammatically correct heaps I don't know if I have a good solution for you know the sorts of things I would be curious to know how other standards organizations work if they you know primarily say that our standards are written in English and you know to be written uh to write a a standard you have to be uh competent in English. Um, I think that this is a role that editors can help in or that champions can help in and find people who, you know, do speak the language of
the EPS repository. currently if it's an I you know my my my point of view is that if it's an important EE even if you don't speak English we can find people who care about this E and can champion it and you know get it to a place where it is grammatically correct and it's you know very readable for for people who are implementing it. Uh, I hear that. It made me think also that it would seem to me that there's really an importance in trying to build up a bit of a community around an EE, which is something that I think we've been seeing a bit more of. I mean, it would prevent author champion burnout to a certain degree. It would probably also ensure a certain amount of resource into making sure that the IP can actually
clear the various hurdles that it needs to clear. Do you have any particular thoughts about community building around EIPs? Yeah, I have been thinking about this a lot because you know a lot of my frustrations and the things that I see that are you know not going as well for the EPS repository as I think they could be is exactly what you said. to me due to a lack of community and I feel like there's you know a lack of a lack of ownership and a lack of accountability that exists there and one potential solution that I've been thinking about and I'm trying to figure out how to implement in a lightweight way is some concept of working of a working group or working groups because pretty much every every standards organization in the world has working groups who help you
know manage like specific niches within the the this the uh standard And so I think that if we have some working groups who kind of own the concept of the EVM or working groups who own the, you know, interface layer of Ethereum, they're going to be able to help inbound EPS uh and and give feedback to them and they're going to be able to set goals for their group and to set like, you know, have general ideas of EES that they want to author or they want to help find people or, you know, navigate incoming resources to uh to work on. So to me, if we can find some way of developing some sort of working group system that I think that would help
alleviate a lot of the issues that exist. There's a notion of working groups uh called rings in the magicians and I think I think that's been badly underutilized. Yeah, I agree. And I think that, you know, part of the reason is that there isn't a strong level of accountability between the EES repository and rings. And I don't know why there's not I don't know why the rings aren't identified and leaders aren't identified of rings um or you know champions or curators those rings aren't identified in ES repository to give ownership and accountability.
I'm not sure either. It it takes volunteers. Sure. Another question I may have for you Matt related to the good example and bad example of ES that was shown in one of these slides today. So when we uh say that if an E is only specific to a single use case just for example the game use case that we have mentioned. So uh those are not good example of Ess. So when we say that what does that mean those eats are rejected and if they are like uh how do we do that what is the process called these kind of you know selection and rejection I mean I get to
know about this presentation with this presentation that these are good and bad but in general are there any guidelines for people to follow I think E one will pretty clearly lay out the things that might be eable and if there's some gray area I think generally, you know, when there's gray area people and editors and Greg can jump in and, you know, share his opinion, but I think that some gray area that people are pretty willing to hear why you might think it's eable and, you know, if it's pretty cut and dry, it's a very specific use case, it's not adding utility, I think that editors typically just don't merge as a draft. Is that what usually happens, Greg?
Um, editors vary and we'll talk some, but generally we we actually don't want to question the content all that much. Uh, we don't we've gotten in some bad political situations before and so we're more inclined to just merge it if it meets the formal requirements and leave it to the rest of the process. It'll most of those will die on the vine. And at least I'm not that concerned about using up uh integers in the draft numbering system.
EIP overflow. There are a lot of integers to give. Yeah. So yeah, I think we discussed that MCA and I said, "Okay, we can just close them." Um, and if the author shows up again, they could reopen them, but that gets them sort of out of the way. Okay, I think that might be it for for Q&A. what you said PJ yeah I think uh this is like quite informational session and that's all questions that we have received and we
are almost about time so uh if any anyone has anything just conclude I just want to thank Greg for his time he spent over the years working in the EPS repository and being an editor I think it's a thankless job in general. So [laughter] I appreciate, you know, every everything I've done for Ethereum has been both thank thankless and highly rewarding.
[laughter] I mean, we really thank you. We thank you for joining us today. It's been a pleasure to have you both here and I hope all these tips and tricks shared by Matt and you and discussed in this episode will come handy to any of the user while creating a clear and precise Ethereum improvement protocol next time. So I hope to see you soon with another episode of series Penney. Um thank you for being with us today. Stay tuned.
Subscribe to Z and get Caters and thank you B. Have a great day. Thanks for having us. Thank you. Make this happen.
