Good morning. So, we are continuing our discussion on the chemistry of chemical rockets. In the last class, we have discussed the different definitions of fuel layer ratio, fuel oxidizer ratio and all. And also, we defined the standard heat of formation. And after that, we started discussing chemical laws. We have discussed the law proposed by Laval Sier and Laplace. We states that the quantity of heat which must be supplied to decompose a compound into its elements is equal to the heat evolved when the compound is formed from its elements. Now, to continue our discussion on the thermo chemical laws, next let us discuss another law which is Hess's law. This was proposed in 1840 by Hess. This is also called law of constant heat summation. Now, this law states that the resultant heat change, the resultant heat change, constant pressure or constant volume at constant pressure or constant volume that is either isobaric process or isochoric process in a given chemical reaction is the same whether it takes place in one or in several steps. That is whether the reaction takes place in one step or in multiple steps, it does not matter as long as the process is carried out at constant pressure and constant volume. The resultant heat change is the sum of the heat change for all the processes that is taking place. So, essentially the net heat of reaction depends only on the initial and final states. It does not depend on the path taken by the reaction to reach the final state. It depends only on the initial and the final states. Therefore, it is path independent. Because of this, what is proposed is that the thermo chemical reactions or thermo chemical equations for different reactions can be either added or subtracted like algebraic equations. So, the thermo chemical equations can be added or subtracted like algebraic equations. Now, this is a very important law and allow us to estimate the heat of reaction or for different complex reactions without going into the complexity. Instead what we can do is we can break a complex chemical reaction into several smaller or simpler reaction steps and then add all of them together to get the final heat of reaction. Now, let us explain it by taking an example. Let us consider that we want to estimate the standard heat of formation of CO2 at 298.15 Kelvin. We want to estimate the standard heat of formation of carbon dioxide at 298.15 degree Kelvin. We have seen it in the previous class that the standard heat of formation of this from its elements. If you estimate it from its elements, this is equal to 94.054 kilo calorie per mole. We have seen this in the previous class. Now, let us estimate the same from some other path. Let us consider the reactions that it is formed from say carbon dioxide burning in oxygen giving carbon dioxide gas. Now, for this reaction it can be estimated that the heat of this reaction is equal to 67.63 kilo calorie per gram mole. Now, if I look at this reaction, although we are forming carbon dioxide gas, this is not a formation reaction because of the fact that CO carbon monoxide is not an element. It is a molecule whereas we have defined the formation reaction or heat of formation as the heat evolved when the molecule is formed from its elements. So, therefore that is why there is a discrepancy between these two, but we can take care of this discrepancy by using Hess's law. Let us consider the formation reaction for carbon monoxide. So, if carbon monoxide is formed from elementary carbon and oxygen through a reaction like this, then the heat evolved for this process is 26.42 kilo calorie per gram mole. This if I look at this reaction, this is the formation reaction for carbon monoxide because carbon and solid is element and oxygen in this molecular form is also element. So, therefore this is a formation reaction for carbon monoxide. So, we can write the formation reaction for carbon monoxide. Standard heat of formation for carbon monoxide is 26.42 kilo calorie per gram mole. Now, as we can see here in this reaction, both of these are in the standard state, but not in this reaction. So, in order to get this reaction if I look at this two, if I just add this two algebraically, then I get this. So, if I add that, let me call this reaction A and this reaction B.  Now, C O G can be cancelled from here. What I get is C S plus O 2 G giving C O 2 G. So, what I see here is that if I add reactions A and B algebraically, I get the formation reaction for C O 2 which has been shown earlier. Therefore, from Hess's law, now the heat of formation or the heat of this reaction which is the heat of formation from carbon dioxide is nothing but the algebraic sum of these two. So, if I add these two heating values, then this comes out to be equal to minus 94.05 kilo calorie per gram mole. So, what we are seeing here is that this is exactly equal to the heat of formation that we had earlier discussed. Therefore, what we see is that either we take this step or we follow little more complex step, we get the same heat of reaction as long as this process is carried out at standard pressure or constant volume, we get the same value of heat of reaction. So, this law called Hess's law is a very important law which helps us in estimating the heat of formation or heat of reaction of more complex reactions starting from basic elementary states. Now, taking this forward now, this discussion forward, we have to get now what we can say is that if you are looking at a very complex reaction consisting of many molecules, we can get the heat of formation values for different molecules because as I have said in the previous class, these values are tabulated in thermochemical tables. So, we can take those values and then form the complex chemical reaction by algebraically adding or subtracting those reactions and we get the required value. So, then what we have to get now is the standard heat of formation. So, far we have said that the standard heat of formation that we are getting here is the heat evolved. Now, how do we get this heat evolved? We can either do a calorimetry and estimate the heat evolved or there may be some more simpler steps. So, next we discuss a simpler method or for estimating the standard heat of formation or heat of formation that comes from bond energies. So, we discussed bond energies and heats of formation. This method we can estimate the standard heat of formation by using tables of bond and resonance energies. So, we can use the tables of bond energies and resonance energies. Let me explain what is bond energy. Before that, first let me say that where they are useful. This method can be very useful for compounds which have not been synthesized before. For example, here if we are talking about the heat of formation, these are for the compounds which have been synthesized before. We know the heat of formation values or the heat of reaction values. So, these are tabulated in thermochemical tables. But if we are looking for a new compound which has not been synthesized before, then in order to operate estimate what will be the heat of formation for that, we can use the bond energies method. Secondly, there may be some reactions which are not suitable for burning in a calorimeter. In that case also, this method using bond energies is more applicable. So, first let us define what is bond energy. Bond energy is the contribution a particular bond makes to the energy required to dissociate the molecule into atoms. So, as we know that all the molecules are made up of several atoms and these atoms are kept together by the intermolecular bond. Now, if you have to break this molecule into its constituent atoms, we have to supply some amount of energy. Now, the bonds that are there in the molecule, all of them are not same, every bond is little different. So, the contribution of an individual bond or the amount of energy required to break this individual bond is the bond energy for that particular bond and the total bond energy is the summation of the bond energy of individual bonds. So, if the two molecules are together, let us say I am looking at molecule A and B, they are together because of certain intermolecular bond. If you have to break them apart, we have to supply some amount of energy. So, this energy that we need to supply to break this bond is the bond energy for this bond between A and B. So, therefore, this energy required to pull the two atoms apart. Now, this bond energy from modern physics can be shown to be function of the distance between these two atoms. So, if I plot a general energy versus distance curve, you have seen that before in physics, it looks like something like this. So, this is the bond energy when the molecules are infinitely apart. As we bring them together, the intermolecular forces increase, there is a distance at a point where the bond, the energy requirement is minimum. So, therefore, the molecule will be formed at that distance. So, this is the energy difference between the intermolecular forces when the molecules are infinitely apart and this is the minimum distance or value at the potential minimum related to. So, therefore, the value of this potential minimum with respect to the distance when the molecules are infinitely apart is essentially the bond energy. Now, this bond energy, so this is my bond energy. Once again, the bond energies are also fundamental properties of the bonds. So, they are also tabulated in thermochemical tables. So, we can get this information from the tables and then use that to estimate the bond energy. I would like to point out here one thing that while considering this bond energy, we should also take into account the possibility of resonance. Let me explain what is resonance. So, in order to estimate the bond energy for a particular bond for a molecule in a molecule, we have to take into account the possibility of resonance in order to estimate particularly the heat of formation. Let us understand resonance with an example. Let us consider benzene on aromatic hydrocarbon. It can have various structures. It can have like this and few double bonds. It can be like this and now this bonds, the double bonds can be at different carbons. So, it can be here, here, here. Similarly, we can have another structure and the location of this double bonds may be different. For example, we can have it here and we can have it here, we can have it here. So, as we can see similarly, there are other possibilities also. So, what we are seeing is that we have the same molecule, which is benzene molecule C6H6. However, the orientation of the bonds or the final structure can be different. So, all of them represent the same molecule, but with different structure. So, these multiple structures are called resonance. Now, due to this resonance, the actual heat of formation of benzene is going to be much, much higher than what we estimate from the bond energies. That is, the actual heat of formation for benzene is much, much higher than the standard. As we can see here, what we have is 1, 2, 3, 3 C double bonds and then 1, 2, 3, 3 single bonds for carbon-carbon and 6 C H bonds. These are the standard, the bonds that we have. However, because of this possibility of multiple structures called resonance, the actual heat of formation is going to be much, much higher than what we estimate from just looking at the bond energies. So, both the bond energy and the resonance energy then must be considered for calculating the heat of formation for a particular molecule. The resonance energies are also tabulated in thermo-chemical tables in the handbooks. I have to emphasize one more thing here, that the bond energy the way we have defined is essentially the negative of the energy required to form the bond, because the way we have defined the bond energy is energy required to break the bond. Therefore, from the thermo-chemical loss we have just discussed, it is equal to the negative of the energy required to form the bond. Now, let us again try to understand this by looking at an example, because that is the best way to explain the processes. So, let us look at an example that how do we use this concept of bond energy to estimate the heat of formation. So, for the example let us consider that we want to estimate the heat of formation for ethanol is also written as C 2 H 5 OH. This is alcohol we want to estimate the heat of formation for that. So, first let us look at the molecular structure H. So, this is the molecular structure of ethanol. Now, if let us count the number of bonds that we have, we have 1, 2, 3, 4, 5. So, we have 5 C H bonds, then we have 1 C C bond, then we have 1 OH bond and 1 CO bond. Now, from the thermo-chemical tables we can get the bond energies for this. Bond energy for a C H bond is 98.1 kilo calorie per mole. For C C it is minus 88.5 kilo calorie per mole. For OH it is minus 109 kilo calorie per mole and for CO it is minus 86 kilo calorie per mole. Notice that all the bond energies are negative. Now, we want to estimate the bond energy for this. So, essentially rather the heat of formation for ethanol. Essentially what we are interested in is to find out the energy required to form 1 mole of ethanol. So, first let us estimate from the bond energies what is the energy required to form 1 mole of ethanol. So, energy required to form 1 mole of C 2 H 5 OH is nothing but energy required to form 5 C H bonds plus 1 C C bond plus 1 OH bond plus 1 CO bond. So, the total energy is just the algebraic sum of all this. This is equal to 771 kilo calorie per mole. Now, if I write this as a thermo-chemical reaction equation then this is equal to 6 H G plus O G plus 2 C G giving us C 2 H 5 OH G because here we have 6 hydrogen plus 1 oxygen plus 2 carbon. So, this is the formation reaction and the bonds are formed from this. Remember that in order to form the bonds, we have to supply all this in their atomic state. So, therefore, this is the basic constituents of this molecule. So, we write this equation like this. Now, if I look at this equation, this gives me the formation of alcohol rather ethanol from this basic steps or other basic elements, but these are particularly hydrogen, oxygen or carbon in the gaseous state and not in their elementary state. Therefore, we cannot call this reaction as the formation reaction for ethanol. So, what we have to do is first to get the formation reactions. So, the atomic hydrogen will come from a formation reaction and that formation reaction will be breaking, taking 3 molecules of hydrogen and then breaking it into 6 hydrogen atoms in their gaseous state. This is then going to be my first reaction for which gives me hydrogen atoms and the heat of formation for hydrogen atom can be obtained from the thermochemical test tables. This is an endothermic reaction requiring 52.1 kilo calorie per mole and 6 times this actually because heat of formation of this is equal to this. Since we are forming 6 of this, so this is equal to 6 times 52.1 because heat of formation for atomic hydrogen from molecular hydrogen is 52.1. So, therefore, this reaction will require 6 times 52.1 amount of heat. Similarly, we have to form the atomic oxygen from molecular oxygen through this reaction and the heat is equal to 59.6 because the heat of formation of atomic hydrogen gas, sorry atomic oxygen gas is 59.6 kilo calorie per mole. Similarly, here we have carbon in its gaseous state, but the element the standard state of carbon at standard temperature and pressure is solid. So, we have to first convert solid carbon into gaseous carbon and we have 2 of them. So, we take 2. So, that also requires some heat, we have to supply some heat to evaporate the solid carbon into gaseous carbon and the heat required for that reaction is 170.89 that is heat of formation for carbon gas is equal to 170.89 kilo calorie per mole. So, now if I look at these 3 reactions, these are formation reactions for atomic hydrogen, atomic oxygen and gaseous carbon. So, if I now add this 4, let me call this 1, 2, 3 and 4, if I now add these 4 reactions, what we get is the formation reaction for ethanol. So, adding these 4 reactions, we get adding 1, 2, 4, we get 3 H 2 G plus half O 2 G plus 2 C S giving us C 2 H 6 O. So, this is the formation reaction because now hydrogen is in the standard state at standard temperature and pressure, oxygen is in the standard state and carbon is also in the standard state. So, therefore, this is the formation reaction for the molecule we are looking for which is ethanol. Therefore, we can also just do an algebraic summation for all of this, for this reaction delta H is minus 771. So, if I just add all the heats minus 771 plus 715.1 that is if I add this, plus this I get 715.1. So, this gives me the total now heat of formation for this, this comes out to be equal to minus 55.9 kilo calorie per mole. So, if I can summarize that the estimated heat of formation for ethanol from the method we have just described, the estimated delta H F C 2 H 6 O is equal to minus 55.9 kilo calorie per mole. Whereas, we can estimate it using calorie metric and get the actual value which is also present in thermo chemical tables. So, the actual value of heat of formation for ethanol is minus 53.3 kilo calorie per mole. So, what we are seeing here is that there is a slight difference between the estimated value and the actual value. All of this difference is quite small, it is a very small difference, but this difference do exist and this difference between the estimated value and the actual value is primarily because of the fact that the bond energies that we have taken here are the average bond energies, but bond energy for all the bonds are not same because if I look at a C C bond on one side of it, if you have an oxygen bond on other side, if it is a hydrogen bond then they will exert different type of pools. Similarly, for different bonds we can have different type of bond slightly different bond energies depending on the composition. So, therefore, the overall bond energy for individual bond is slightly different from the average bond energy. Now, since we have used the average bond energy, therefore, there is a small discrepancy between our estimated value and the actual value. So, this tells us how to estimate the heat of formation. So, if we know the composition or the molecular structure, we can estimate the heat of formation using this method. Now, heat of formation is not what we are looking for. Finally, for our estimation of final temperature in the combustor, we need to know the heat of reaction. That is the energy that the reaction is going to release when it is in the conditions at which the reaction is occurring. So, the next thing that we have to do is estimate the heat of reaction, which in order to estimate that we will use the concept of heat of formation. So, next let us look at the heat of reaction and try to find out a method to estimate the heat of reaction from the concepts that we have discussed so far, which will be then useful in estimating the final temperature. So, the next topic we are going to discuss is our heat of reaction. Now, if we are, since we are talking about combustion in order to estimate the temperature and the final composition, combustion is concerned with the heat changes associated with the combustion reaction. It deals with the conversion of chemical energy into heat energy. So, we want to estimate how much heat is produced when we have a combustion reaction. Now, the heat change associated with the chemical reaction is an indefinite quantity and it depends on the path taken, whereas so far what we have discussed are the path independent properties. So, if the reaction takes place at constant pressure and or constant volume, the heat change has a definite value. Now, if the process is specified, then and only then the heat change will have a definite value. If the process is not specified, it is going to be not a specific value. So, fortunately if we know the process, the path that the process takes, whether it is a constant pressure or constant volume or constant temperature whatever, if we know the path taken, if the process is specified, then we can estimate the heat of reaction using the laws we have just discussed. So, therefore, since the heat of reaction as we have said depends on the path taken, now the easiest of the processes are either constant pressure process or constant volume process. Therefore, heat of reactions or the heat changes associated with chemical reactions are primarily measured at either constant pressure at constant pressure and constant volume. So, let us now look at the definition of heat of reaction. A closed system, if we consider a closed system containing a given number of moles that is n i's of n different species, a given temperature pressure is caused to undergo an isobaric process in which the values n i's are changed to prescribed final values in which the initial and final values of temperature are the same, then the heat liberated by the system is the heat of reaction for this process. So, let us understand what this definition says. First we are considering a closed system. So, therefore, the system is not interacting with the surrounding. Secondly, this system contains a given number of moles of n different species. So, the composition is specified, initial composition is specified and the system is at a given temperature and pressure. Now, what we are seeing is that this system is allowed to undergo an isobaric process. Isobaric process is a constant pressure process. So, therefore, the pressure remains same and the molecules are allowed to react with each other, but the final value of the temperature is also same. So, therefore, the temperature does not change. So, now we do not have the change in pressure, we do not have change in temperature. Only chemical composition changes and which comes to a different values of n i's and this n i the final composition is also prescribed. So, we know the final composition also. Under the circumstances, the heat liberated for this process is called the heat of reaction for this process. So, this is the definition of heat of reaction. So, when a system makes this change, it goes from initial stage to a final stage, then it may lose some energy, it may gain some energy. The energy transformation can be either heat or work. Now, the chemical reaction typically undergoes the changes under no velocity change. So, this is a closed system, there is no change in velocity. So, we can neglect the potential energy and kinetic energy changes. So, this is and furthermore, this is a constant pressure process. From thermodynamics, we know that for a constant pressure process, the rate, the change in heat is equal to the change in enthalpy. The heat transfer is equal to the change in enthalpy. So, for a constant process, no flow reaction, heat liberated is equal to the change in enthalpy. This we have seen in basic thermodynamics. On the other hand, for a constant volume process, the heat liberated is equal to change in internal energy. That also we have seen in thermodynamics. For a reacting flow, if we neglect the potential energy and kinetic energy term and we consider that there are no work other than the flow in flow work that is PDV work, then the net change in enthalpy is equal to the heat of reaction. So, if we are talking about a reacting flow, then this condition is also valid. So, therefore, for our cases, we are talking about reacting flows. So, therefore, the change in heat is nothing but change in enthalpy. It is a common practice. First of all, I have to point out here that this is a common practice to deal with moles in flow system and mass in closed systems to designate the amount of species involved in the process. Now, coming back to our description of heat of reaction, we are still dealing with the notations. So, the notation for the heat content or enthalpy of a system, first of all, at its standard state can be designated as HT naught. So, this is the notation for heat content or enthalpy of a substance at standard state. Here, the index O, superscript O, specified the standard state and the T is the temperature in Kelvin. So, at a given temperature, if the element is the standard state, there is a sudden heat or enthalpy associated with that system. So, for example, if I write G 0 0, then this is the enthalpy of a system or a substance in its standard state at 0 Kelvin at absolute temperature. Now, we are dealing with gaseous species. So, first let us define now the equation of state. So, for a gaseous species, the equation of state can be defined as a and we are considering perfect gas. So, this is by equation of state that P v equal to M R T, where M is the mass of the system, R is the gas constant, T is the temperature in Kelvin, this is pressure, this is volume. It can also be written as the number of moles, the universal gas constant times temperature. And enthalpy is defined as U plus P v, this is the standard thermodynamic definition. Therefore, the standard heat content can be written as the heat content at a standard state is the internal energy at a standard state plus P v at its standard state. Now, P v as I can write here as M R T. So, this can be written as M R T or it can also be written as M R T. Now, at absolute 0 temperature, which we have defined here. Since from this equation of state, this term the P v work done term is a function of temperature such as goes to 0, this term goes to 0. So, at time at 0 temperature, we can show that we have shown that the standard enthalpy of substance and the standard state at 0 degree Kelvin is equal to its internal energy at that condition. So, that has been shown here. Therefore, the 0 degree Kelvin can be considered to be a good datum to start our discussion. Now, in thermodynamic as we can see here, all the parameters are given in terms of delta H or delta of U, essentially the change in state from state 1 to state 2. Whereas, this definition is for at a particular state. So, therefore, if we know the condition at a particular state that does not help us, we have to describe in terms of in the in terms of the change in properties. So, if we are talking about the change in properties, we need to know an initial condition. Now, from this description, since we are showing that the enthalpy and internal energy at absolute 0 temperature are same, that can be considered to be a good initial condition. Then from there, if I look at the change in properties with respect to absolute 0, that gives me good description of the system. So, let me consider, let me put this as equation 1, this as equation 2 and this as equation 3. So, now if I subtract 2 from 3 from 2, so, subtracting 3 from 2 gives me h t naught minus h 0 naught is equal to u t naught minus u 0 naught and plus M R T, let me call this equation 4. Now, let us look at this equation. If we consider a constant pressure, because that is how we have defined our heat of reaction and no flow reaction, then this is my delta h, the change in enthalpy is equal to the change in internal energy. So, this is delta u plus the M R T term which is equal to the p d v work, let me call this equation 5. Now, if v is the volume of 1 mole of any ideal gas at constant pressure and temperature, if v is the volume of 1 mole of any ideal gas, then delta p v is equal to can be written as p del v plus v del p, but since we are considering a constant pressure process, this term is 0. So, therefore, del p v is equal to p del v, therefore, that is why this term was del p v which is equal to p del v from here, that is how we get this relationship. Now, for an ideal gas, we have already shown here that p v equal to M R T, so p del v will be equal to nothing but the change in this property. So, let me just look at del p v equal to p del v which is equal to del M R T. However, for the heat of reaction, we said that temperature remains same, only change is in N. So, I can write this as del M R T, where this R is my universal gas constant. So, now, if I put it back into this equation, my expression for change in enthalpy becomes equal to delta H equal to delta U plus delta N R T. Let me call this, this was 5, let me let this be equation 6, this is equation 7. So, now, we have represented the change in enthalpy as a change in internal energy and change in number of moles. Now, let us look at this term little more closely, the change in number of moles. What is delta N? It is essentially the total number of moles of the products minus the total number of moles of the reactants and of course, everything is a gaseous species. Let me call this equation 8. So, now, let us look back at our definition of heat of reaction. We said that it has to be at the constant pressure which we have incorporated here. It has to be at the initial and final stage of temperature as same. So, that has been included here. Now, the only change is in the number of moles. So, that is represented through this expression, where the change in number of moles is the total number of moles for the products minus the total number of moles for the reactants. So, this gives me delta N. Now, if I consider the generalized chemical reaction which we have expressed earlier also, it will be given by this expression. Then, for this chemical reaction, the heat of reaction at standard state that is delta H R at standard state T naught, where T naught is the standard temperature is given by delta H R T naught now is equal to nothing but the change in enthalpy of the products minus change in enthalpy of the reactants in its formation state. Let me call this equation 9. So, this is the heat of reaction at its standard temperature also T naught. So, at standard temperature now initially we had been considering the reaction at constant pressure. If this pressure happens to be the standard temperature at standard pressure and the temperature that we are at which we are working also happens to be the standard temperature. So, if the reaction takes place at standard temperature and pressure, then the total heat of reaction at that standard temperature and pressure is equal to the heat of formation for the products minus the heat of formation for the reactants. Why? Because the heat of formation now in this case becomes equal to the heat of reaction. So, delta H F M i is the heat of reaction for the products or the total heat in total enthalpy of the products at the standard state minus the total enthalpy of the reactants at the standard state. Since both of them are defined in the case for the standard state therefore, the total heat of reaction at the standard state is nothing but the total enthalpy at the standard state for the products minus total enthalpy of the standard at the standard state for the reactants. So, this is how we get the heat of reaction. Now, in many case here, the heat of reaction is defined at the standard temperature T naught, but many cases we would like to define it not at standard temperature T naught, but some other temperature, the system temperature. So, if instead of T naught, if this temperatures are the heats are whether the reactions are differ occurring at some other temperature T 2, then we can estimate that as well. So, let us say that in this description, we are considering the reaction is occurring at standard temperature T naught. We said that it is not T naught, it is any temperature T 1. So, the initial reactions are occurring at any temperature T 1 and we know the heat of reaction for that temperature T 1. We want to estimate what will be the heat of reaction, if the reaction occurs not at T 1, but some other temperature T 2. So, for that let me draw a path diagram. Let us say that our reactants were initially at this point. Now, after the reactions they go to this point, this is my condition T 2. Now, this is my delta H, both of this states, this was my temperature T 1. Initially this was at temperature T 1, further reaction happens and it goes to temperature T 2. These and these two states are also equilibrium states let us say. Now, we want to find out if these conditions are defined T 1, what will be the conditions at this temperature T 2? As we can see here, now we can take two different paths. Actually, it can be multiple different paths. I am considering two different paths, this path A and this path B. In path A, what I am saying is that the molecules whether the products which were initially at temperature T 1 are first heated to temperature T 2 and then we allow the reaction at the constant temperature at T 2. So, the path taken is path A first of all is first heat the reactants which are initially at temperature T 1 to temperature T 2 and then second we have isothermal that is the constant temperature reaction at T 2. So, now with following this path we reach this condition. So, now my products are at temperature T 2 and we want to estimate the enthalpy here. Similarly, we can have another path, path B where we can have the isothermal reaction at temperature T 1. So, we come here and then heating the products to T 2 from here to here. So, in following both the paths, we reach the final state T 2 from the initial state T 2. Now, we have to find out the heat changes associated with that and as the diagram shows the total heat change will be same. So, we are running out of time today. So, I will stop here today. In the next class, we will first revisit this portion and then continue from here with our description of heat of reaction. Thank you.


Okay, this is the Gas Scythe and Attack. It's called the technical and economic realities behind hacking and exchanges. It's a little bit of an intro to gas token and then a story about a bunch of exchange exploits we found last year and then how that all came about and what you can do to protect yourself against it. We're gonna start with a live demo. So if you guys wanna take out your phone and scan this, this is a cryptocurrency or an Ethereum address that's a contract. If you send any money to it, you will, I don't know if you'll get it back, so it doesn't sound very much, but it does bring you gas token. So the whole point of this talk is about gas token. So if you send a transaction, what you'll do is make yourself $5 in gas token, so you will lose $5. You do this, but you will get it in gas token. So try that out if you want. And wall, wall, this is up on the screen. I'm gonna basically take a second to describe what gas token is, what the hack was, and then we'll go through how it all played out. So it looks like everyone's all done. So what this was, what the gas site and the hack was, was an exploit. Basically anyone who subsidized costs of Ethereum transactions were vulnerable to this in that someone could use the subsidized payments to print out gas token. And what gas token is this mechanism? Let me take a step back. In Ethereum there's a mechanism in which you can be rewarded for refunding, for removing state from the network. And so when you remove state from the network, what Ethereum does is it pays you back in gas refunds. And what this hack is is taking advantage of those refunds that are built into the Ethereum ecosystem. And so in order to execute this kind of attack, it's very simple, you deploy a contract, we'll go over in a minute or in the same kind of contract you guys just transact with. You initiate a withdrawal from an exchange for someone who pays for your transactions. You send the withdrawal to this contract and the contract does its magic. And then at the end of the transaction you get minted gas token and the money comes straight from the exchange, independent of your actual holding on the exchange. And then a little background about myself. So myself and Chris are co-founders of the Gas Siphon attack. So we kind of found this and helped bring it to the attention of the public. I'm also co-founder of Law Ethereum, which is a wallet provider and dad login solution as well as ZeroTrust, which is an auditing firm and we audit a bunch of smart contracts. This is a little definition of gas token, but like I said, it's basically a token that represents a refund on the Ethereum network. The refund is in gas and the idea being if you spend 100,000 gas on a transaction, you can use this refund to actually only pay 50,000 and there's reasons it exists that we'll get into in a minute. And then one big question I always get is says is gas token good? So is it good to offer someone an incentive to clear the stake on the network? And it sounds like a good idea. The reason it exists in Ethereum is because developers should create state on the network and then clear the state later on so that the change is not as big. So the incentive is there, but the problem is people are starting to use it for bad. They're hoarding gas tokens that they're floating the state so that in the future, when the network is very bloated and gas is very expensive, they can get these refunds at a much more efficient price. And so the idea of gas token is a very good idea. The implementation as we've seen it isn't so good so we'll see how it plays out in the end. And how people are using gas tokens today. A lot has to do with arbitrage. So the idea being if I want to make a transaction on Uniswap and make some arbitrage through exchanges and I might have a dollar profit to be made, someone else with gas token might be able to make that same transaction. And what they can do is use gas token and like I said, it reduces the fees. I'm sorry, the gas costs. And so what that $1 now turns into $1.10 for someone. And when that happens, they've now effectively gotten an advantage in arbitrage that no one else who doesn't have gas token does. So it's pretty dangerous in that sense. That's usually pretty well coupled with front running. So a lot of people do front running and gas token arbitrage in the same vein in it. If it works for them, no one really knows how it really affects the network. Finally, exchanges can use gas token as kind of a hedge or gas futures. So you can imagine if exchanges print a bunch of gas token now or in the future when one gas is very expensive, they might be able to even that out by basically having bought gas futures now so that when the networks clog, they can still provide their customers with a very constant gas price. I'm gonna run through the code real quick via the gas token. It's quite simple. You don't really need to understand code to understand this. But here's the whole contract you just interacted with. And there's only four functions. So here's a set min rate, set min rate. And all this does is set a rate of tokens you want to min. So this would say, you do set one min five tokens per transaction. So that when you withdrew from an exchange, you'd min five tokens and you can change this. And the higher the rate the higher your gas limit of the transaction would be. The actual min function, again, this is just a token. It's an ERC 20 token. And so you just call token dot mint and then the number of tokens that you pass in. So that's also very simple. This is the fallback function. So the reason this works with exchanges is when you don't provide data to a transaction, the contract automatically calls the fallback function. In this case, it is mint. So now it calls the mint function given the min rate you previously provided. You don't need to do anything. The exchange now is basically paying for you. And finally, you can withdraw the token. So the tokens will live on the contract and then you withdraw them. And so this is just transferring the tokens out as well as either there's some in there. So it's very simple to execute this. It's dangerously simple, some would say. So good. Here is an example transaction. And then you probably can't see this but it's an Ether scan contract and this is a withdrawal from an exchange. And it's a withdrawal of 0.01 Ether so nothing too crazy. But if you look here, there's a transaction fee of $34.2 Ether effectively and the gas limit is six and a half million. And so this is from a big exchange and it basically went straight to the contract and the exchange paid six and a half million gas at 30 gigabyte gas price for free. And what people can do with this is now take advantage of it and print gas tokens. So this is the first transaction we did when finding the exploit. And so you can look it up if you want but it's pretty dangerous. And so who was affected by this? The exchange is like we've just been talking about. Metatransaction relayers who subsidize gas costs. This can kind of be scoped out to just anyone who subsidizes gas costs. If someone's paying for your gas and for your transactions there's a really, really good chance that you can print gas token on their dime. So if any of you are doing this, just watch out for this. You can set limits to the transactions but we'll go over that in a minute. In any really EVM based chain that again subsidizes the transactions and has this kind of mechanism built into it. How can they fix it? Don't pay for users gas. I know it's a really nice UX to be able to pay for your users gas but if you are paying for gas they are gonna try to take advantage of the free money. And this is one of the best ways for them to do it. Now getting into a lot of pictures and a lot more interactive stuff. So here's a bunch of pictures of mobile wallets. So this is, you can't see here but trust wallet point-based metamask. And why these exist is because I'm showing you that they try to abstract gas away from users and when they do this they make the user vulnerable. So you can see here they have this concept of network fee, network fee transaction fee and users can almost guarantee most of you don't look at that too closely and but what these are saying is hey I'm sending 0.001E but the fee here you see is $3.85.  It could also be $30 or up to $300 maybe.  And I don't know if there's a good answer. These wallets are all trying to abstract the gas away from the user and that's a really good idea but at the same time it's also dangerous. This is also urgent and the reason it's by itself is because they kind of do it the worst in that they say it's free, it's paid by origin. So they don't even give the user the idea that there is a fee associated with transaction and it's dangerous. It's nice but it's dangerous and so it's just something to look out for. And then going into what we actually did last year so the hack happened or the exploit happened last year at DevCon around this time. And we were basically realizing that every exchange was for all the world to an extent. So some exchanges you could have taken 50 million, sorry, $50 per transaction from some $2 but if you were at a script you can basically take a million transactions. And so when we found this, we went to one of the more prominent members of the ether community and when you realized what this was he basically said, and you can smile and he said, oh, well code is law and he walked away. Meaning you guys should take all the money and run but it's a lot of the exchanges are interesting jurisdictions and we just really wanted to do that. So we decided to work with different people to kind of get this resolved. We got in touch with all the exchanges and what you'll see here and we figured, hey, we'll be the good guys and maybe we'll collect some bug bounties for this. We'll put in a lot of work but we'll get paid a little bit. And so here's an example of one of the exchanges bounty pages. You don't need to read about what is good to see. It says, if you find an extraordinarily severe issue you can pay up to $100,000. And so we did the math. Could have taken 10 million from them. That's pretty severe. They would have stopped their exchange and they can just give us $100,000 instead. And so we worked with them and we got in touch with all of them and we had telegram chats and more chats and more chats and more chats and it actually went on for a month. And so all these exchanges we talked like this for about a month and it was two to three, maybe even four engineers almost full time job for a month. And so this is one exchange in particular and we got through this whole thing and basically saved them and they offered $800 worth of their token. And so that was a little frustrating. So we responded with a very large email or large telegram message you can read later but what it's saying is incentives are really hard in this space and you guys are one of the biggest exchanges and this is what you're offering. And if you can't do it right no one else is gonna do it right. I didn't say it but it kind of sounds like next time we find something we're just gonna take the money and give you what we want but it's hard to explicitly say something like this. They ended up responding and they gave us much more money, a couple thousand dollars not anywhere near $100,000 but it was something and that's honestly all you can really do with this kind of stuff, unfortunately. This is another example of an exchange and this one's quite funny. Again, you don't read it all but I'll highlight some things in the next slide but what we ended up doing was sending an email to a ton of different exchanges. It was very hard to get a hold of them so we basically sent an email to maybe 50 or 100 different people with the same message, hey, there's a vulnerability we can't get in touch with you but if you get in touch with us we'll help you out. So we got this email from this exchange and this was the CEO and Chris sent the email and he said, hey, here's who I am, here's what we found. We think you're vulnerable and he responded with good for you. We are not fraudulent, there's nothing wrong with our security and I am several companies that's talking anymore. And that was in response to, hey, it wasn't everything, we know your exchange is vulnerable so that was not a good response. Nine minutes later, we got this email from the same company but this was from an engineer saying, oh wow, we really appreciate this. We'll give you a shout if there's any questions. So the same company, two different people, two different responses. I think we ended up sending forwarding this email to the CEO and we never heard from them again. So we got them. So that's kind of the history of the attack, gas token, but there's a lot of interesting metrics and stuff going on with gas and gas markets and gas tokens now and here's gonna be a bunch of screenshots that kind of describe that in a pretty interesting way. I'm sure you guys have all seen this but when Fair One was going on, the gas prices were pretty high. They're lower now, but I assume they'll be higher at some point. When these prices are high, people can really start taking advantage of gas tokens and so if people printed gas tokens when they were cheap, when gas was maybe one gig away, they can now print it, they can now start using this at a much higher price. This is the block gas limit. Again, this was made about two weeks ago when we were rising the block gas limit to about eight and a half. I think we've got up to 10 million and I think since then it's back down to eight but this is basically showing that gas usage is really increasing on the network and good or bad. Maybe it's a Ponzi scheme. Maybe we have a lot of actual usage but my intuition is that Ethereum's gonna grow and the usage is also gonna grow. This is actually pretty interesting. After the, a lot of this stuff stemmed from Phil Dian's talk at the last DevCon, but once that happened and once this exploit happened, what a lot of miners started doing was mining blocks and only filling in with gas token printing and so you can see here all, most of these transactions are all zero transaction fee meaning the miner included his own transaction and he paid zero for it and so he didn't have to pay a single dime for any gas and he got minted eight million gas worth of gas token which is, if someone like you or me were to do it, we'd have to pay the normal gas price and so what we're seeing now is a lot of miners are actually basically filling blocks with zero gas limit, I'm sorry, gas price and what's happening with that is it's a win-win for the miner because they get gas tokens but what happens is they also start clogging up the network because they're not propagating normal transactions and so that's one of the reasons why this could be a dangerous thing if you have all the miners who are just including their own transactions for the gas token, they're not sending actual transactions through and this is a graph of the transactions of the gas token. I didn't put the line in here but right around this time was that problem last year and you can see that people started getting interesting, interested in it. Phil Diane had a great speech about gas tokens and front running, our exploit article came out about a month later so I think a lot of people started recognizing it and then a little later on it just kind of became a thing and it looks like it's growing and it's gonna become more and more ubiquitous. It was also used, gas tokens were also used a little bit during the crypto-giddy space for arbitrage like I explained earlier, I'm not gonna get into that but there's a lot of articles on it that are super interesting. It's also happening on ETH Classic. Miners were also basically paying nothing and getting gas tokens. ETH Classic's a little more interesting or a little interesting in a different way in that it's really cheap. For $5 you can basically print tons and tons of gas tokens. Now the proportionate price of ETH Classic versus ETH means that these aren't worth much or anything and it doesn't totally matter that you don't need to pay much but this is kind of showing that pay it is happening on ETH Classic too. The elected ETHerScan page is in the ETH Classic Explorer that shows the same thing with no gas payments and just gas fencing. And what's interesting is you can imagine this is an ERC-20 token and so people can trade it. So this is an example of an exchange on ETH Classic and it doesn't look like it's too highly used but it is an exchange and people are trading gas tokens. The price is, it's an interesting market because you have an exchange. You can also mint the gas token out and so you can natively like price the token. You can also trade it in basically two different markets going on. Mainnet on ETHer Ethereum doesn't necessarily have a marketplace at this time though I did see right before this talk that there is a Uniswap gas token marketplace. So it's coming, I don't know when it's gonna happen. There's a good chance it might be removed. There's a whole concept of storage rent that may actually nullify all of this but it's all in the future and we'll see if it actually happens. Finally, there's a package that you can just install and start running. It's called the gas token miner from the Statter Network and you click one button on your computer and it just starts minting gas token for you. You have to fund it obviously but it's about as easy to mint gas token at this point as just clicking a button on your computer. So I think it's gonna become more and more prevalent as time goes on. This is more of a reference slide but here's a few addresses that are currently arbitraging the network on different DeFi exchanges. Some of them are using gas token and if you wanna see how people are using it, try to kinda look into these addresses and the transactions and how they process it because it's pretty complicated. A lot of transactions going on. I'm sorry, a lot of blood calls are being made in one transaction. It's really, really fascinating but it'll give you an insight to how this is actually being used. Finally, how to protect yourself. Pay attention to your gas limits like I showed with the mobile interfaces. If the app is abstracting away gas from you, it's almost dangerous. It's almost more dangerous than knowing what you're getting into so maybe it's more of a social thing about learning about this instead of abstracting away. Transact with only trusted parties. This is hard. This is like saying, only give money to your friends and not an merchant. Obviously it's not realistic but if you do know that hey, I'm interacting with Uniswap and I know them to be good, there's a really good chance you're not gonna get psyched. When you're subsidizing costs, set a gas limit. If you do set a gas limit, attackers can really not take much from you. If you have civil protection like an email and username, it's really negligible and so that is the best way to do it but that's not always possible in crypto. The last two are a little more interesting. Look at all contracts, interactions and learn to code. It's not for everyone but if you are playing in this space, there's a good chance that you're interacting with potentially malicious code and if you really don't know how to protect yourself it's hard and learn to code doesn't mean like sit there and become a developer but at least understand the basics of what's going on. A very simple understanding could save you from a lot of this stuff and maybe not even coding but understanding the ecosystem around coding and then where to look to see hey, there might be an exploit that's not on a news site or something and so basically being more familiar with everything is the point of those last two. Finally, you can look at these later but there's references here and a lot of these slides came from this in our own experiences back about a year ago. Thank you. Because I don't know how they'd respond if they saw a talk with me. There should be at least an informal way to know what's going on. You can look at these, there's hand transaction, it'll show you. For the exchanges to protect themselves is something more complicated than just setting the gas limit required? There's a few things, they all hold so for example with Ethereum specifically you can check if the interaction is going on with the contract and the exchange should probably assume hey, I'm only interacting with a non-contract and they can actually check that and a non-contract can't do this stuff but a contract can. So an exchange can check hey, am I interacting with the contract? There are ways around it. For example, if you deploy a contract and make the withdrawal in the same transaction it doesn't look like a contract at that point but it's pretty far out there. The gas limit is the best but then that also gets into questions like what a user is trying to withdraw into a contract safely and it's a really hard question and I don't really know the answer. They could just charge you for your fees. They could charge you and some exchanges actually charge you withdrawal fee that is greater than the amount of tokens that they could mint for you and that is a really good answer. But again, it's not the perfect answer. How good are the nodes of estimating the stuff? Because nodes, if you're running a node you can go and estimate the gas usage of a function call. How good are they at estimating whether or not the contract underneath the gas token contract is going to go and create X amount of data on-chain? I want to say it's super easy. I just don't think people are doing it. Okay, okay, yeah, yeah, yeah. So yeah, that is a good answer. We got one more. So I know there's two different variants of gas token. Can you explain a little bit about when you would reach for either variant? Yeah, so the deeper answer to that is go to gastoken.io. I think the quick answer is there's two ways to get a refund on Ethereum. One is to reduce states. So setting a variable from one to zero collects this refund. Another way to do it is to self-destruct a contract. I think that's the more efficient way and so if you basically create what gas token two does it creates a thousand contracts for you and when you go to use it you just destroy the contracts and that's the type of refund. So but gastoken.io, they have a very, very in-depth analysis of all of that and I think that's all my time. Thank you.


Yep. Go ahead. Yeah, it's working. I think people can hear me, yeah? Then we're getting it on tape. Hi, everyone. This will be the last talk in this auditorium for DEF CON for 2018. And we have Josh Berkes, who's the Curvidities Community Lead, who will be telling you how you can be a communities contributor. Thank you. Well, welcome, everybody, to the last talk of the session of the last talk slot of the conference. We'll be talking about contributing to Kubernetes. Just to be clear, I'm Red Hat's Kubernetes Community Manager, which makes me one of seven or eight different community managers in the Kubernetes project. We have ones assigned from the other corporations that can contribute on a corporate basis. And this presentation is actually a super cut-down version of a three to five-hour tutorial we regularly do at KubeCons. So I actually have a lot more material than we're going to actually cover today. Hmm. Oh, hold on. I have a lot more material than we're going to cover today. So I actually wanted to get an idea of where people are so that we can cover the most relevant stuff. So out of our small crowd of folks who are here in the room, how many of you are currently using Kubernetes for something serious? Okay. Those of you actually said you weren't using Kubernetes for something serious. You just learned about it. You haven't done anything with it yet. You just learned about it. For those of you who actually are using Kubernetes for something, are you currently involved in the Kubernetes community at all, like socially or getting help or anything else? Okay. Yeah, kind of. Right. And from that, I'm going to guess is the only actual contributor to Kubernetes we have in the room is the one I already know about. So, um, so in that case, we'll go from the beginning here. So when I first got involved with Kubernetes, um, uh, before the release of Kubernetes 1.0, um, it was a lot like showing up to ride in your friend's sailboat where you show up and you say, hey, yeah, I want to go out in the water too.  Um, and so it was very easy to get involved and end up responsible for a whole bunch of things that you weren't necessarily sure you wanted to do in the first place. If you join the Kubernetes community now, it's more like getting on one of these giant floating hotels that they call cruise ships that host 6,000 people, um, because we have something over a thousand contributors. And so part of the idea of this talk is that I'm standing in for Captain Cates here, um, and giving you a little tour so that this gigantic floating hotel that is the Kubernetes project can be a little bit less confusing, um, in terms of you finding where you fit in. So there are really two basic reasons why people contribute stuff to Kubernetes. Some people are really excited about orchestration or distributed systems or microservices or, uh, controller managers or operators or something else. And they want to tinker with those things. Um, and some people are, for example, working somewhere where they have infrastructure that is dependent on Kubernetes and therefore they need to change something or they need to make sure that something keeps working. How many people here would be are here in the room because they're in the first group? Okay. How many people are here in the second group? Okay. Wow. So a lot of, you know, how many people in the second group work for Red Hat? So is that most of you? Yeah, that figures. So, okay. Um, so there's both of those. And those are both completely valid reasons. Like we're not, you know, expecting one group to be the other group. Um, and some people both apply honestly. Um, but so I actually put together the new contributor workshop with one of your Sanger, um, who also gives it at some of the Kubecons. And she has this great story where she got actually involved only late last year. And she started out by jumping on to GitHub and filing an issue that our contributor documentation was horribly out of date and completely disorganized. Three months later, she was the lead author for our contributor guide, which by the way, um, there's that link, uh, akds.io community contributors guide. Read me. Um, I've got, that's right here. And that actually covers in text form a lot of the material that I'm about to go over right now. Um, so that is where you would follow up in this presentation to find out more. Um, this can happen to you too. So how, we can break down what happens when you want to contribute to Kubernetes into sort of six steps. One is where our foundation project, we have a CLA, um, for anything you're going to do in GitHub, which is more things than you would think that would be on GitHub. Um, you need to sign the CLA. So do that somewhere concurrent with figuring out where you're going to contribute first. Second finding first topic, a first thing, a first thing that you want to get involved with, find a SIG and I will explain what that means in a minute. Make a contribution, spend a lot of time arguing with bots, um, because we rely on bots for GitHub automation heavily, um, and then become a Kubernetes org member. And then there are steps beyond that, but this is, this is the beginning. This is the first contribution dates. So like I said, foundation project, cloud native computing foundation. We require a CLA to assign stuff. There are two versions of the CLA one for individual contributors and one for contributors whose people who are employees of a company that support the project. Um, and it's fairly straightforward. There's an automated process to signing it and submitting it. Next, and this is the more fun part, um, you want to figure out where it is you're going to contribute first. What is going to be your thing? Um, and there are a lot of things to choose from.  I mean, some people just want to get involved with the project and want to improve things and that sort of thing. A lot more people get started where they need a specific thing from Kubernetes. So anybody here actually jumped in like maybe when they came in here because they already maybe filed a bug or they were thinking of filing a bug around something that was broken with Kubernetes. Anybody? Okay. Haven't gotten that far yet. Yeah. What was it? Things that we're solving with like Rancher or other things. Yeah. Okay. Okay. Yeah. So it's a pain to figure out how to configure a Kubernetes as part of your larger system. Yeah. Well, that's fine. This is actually all about Kubernetes. Honestly, this whole talk is about the upstream project. And honestly, some people actually are more interested in our community. We have a gigantic community. It's actually very welcoming. It's a lot of fun. A lot of different people in it. So some people just pick things up based on where it is they land in the project. And they're like, oh, I'll work on that. And you can do any of those things. This. Okay. Now, one of the first places that people contribute is going to be documentation in the website, which in the Kubernetes project are the same thing. They're the same GitHub repo because the website started out as documentation only the same GitHub repo there the same team. And pretty much everybody if you've used Kubernetes seriously have come across the dock page that was out of date or wrong or incomplete. And that's just one of the first things like all of us are pretty much who are contributors to Kubernetes in any way are also doc contributors because you end up improving the docs and they have a really good workflow for that. And it's actually a really good place to start because it doesn't require you to know about the testing and doesn't require you to know about the go build stuff or any of the other things. The other place that a lot of people don't think of as an area to contribute is we do a lot of automated testing for Kubernetes and a lot of test infrastructure and a lot of process automation around our CI CD Street. So if you're actually interested in CI CD, if you're interested in testing distributed systems, etc. Kubernetes actually a great project to get involved with because that team always needs more people and there's a lot of interesting problems to solve. And then of course, a lot of people contribute to the Kubernetes code. Whether core Kubernetes itself or any of the many, many satellite projects that are integrated with Kubernetes to a greater or lesser degree. As a matter of fact, if you're starting now, you're more likely to be working on one of those than working on any kind of core code. Well, work has actually honestly slowed down a lot. So find your first topic, your first area because you notice a bug, you want to feature, you want to improve something, you're trying to learn stuff. You have time to work on open source stuff and you want to do something interesting or you just want the documentation to not suck. Any of those things. Find that just like any other open source project. Now the next stage is to figure out how to actually do that contribution. And this is part of what I need to talk about how we communicate in the Kubernetes project. So again, I mentioned over a thousand contributors and over a thousand means a heck of a lot of talking in multiple different media. So now before we go into the various places, you can contact people and you will get involved in talking. Let me say first of all, we have a code of conduct. We believe very strongly in contributors respecting each other and treating each other well. So that's it's a critical thing. It's very important for us to remain a community where anybody feels safe contributing. And for that reason, please don't bring baggage with you from other communities if possible. The other really important thing about that is remember to use emoji. That's also very important to our community. So various places to ask questions. So we have a discourse board called discuss.community.io. It's relatively recent. It went up about four months ago. So it has less traffic than some of the other things, but we already have a whole section in there for contributing to Kubernetes that gets used. Plus it's also a good place to interactively discuss problems. Like, hey, I'm looking at Ingress controllers and what are the pluses and minuses of the different ones? Good place to ask that. Interactive chat, slack.kubernetes.io. We use Slack very heavily. People do both development coordination and user discussions and stuff on Slack. If you just have sort of support-ish questions, we really route those over to Stack Overflow and Stack Exchange and not to the sort of contributor forums, because otherwise we tend to get overwhelmed, although you can also ask a lot of those in discuss.kubernetes.io as well. Now, so if you're specifically looking for help contributing, there are various mechanisms, right? You can use Slack, you can use Discuss. On a monthly basis, we run a forum in two different time slots that is a combination of live video and chat called Meet Our Contributors, where it contributes to various sorts. Like actually next Wednesday, we're going to have four members of the Kubernetes Steering Committee hosting that to talk about various things, and that's a good question to ask questions about, say, governance, for example. We have these contributor summits before every KubeCon of the three, at this point, three KubeCons per year. And like there, for example, Shanghai, with a bunch of people who speak Chinese a lot better than me, we'll be doing a full day version of the new contributor workshop, et cetera. And so that can be a good way to get started if you can afford to go to a KubeCon.  Some of the SIGs have one-on-one programs, some of the group mentor programs, that sort of thing, that you can get involved in if you want a more structured environment for contributing. And then when you sort of get into contributing, you're going to use some other communications methods in order to continue, the biggest one of which obviously being GitHub. GitHub issues and PRs, a lot of actual project communication goes on through those, including design discussions and that sort of thing, like the way somebody, like, if you're going to design a new API, you'll post either, depending on how far along you are, an issue or a PR, and then people will discuss it and pick it apart and a lot of other things until we nail down what we actually want. We also do a lot, a lot of video meetings usually via Zoom, because that's been the least bad video conference and platform we've been able to find.  And then, of course, we have face-to-face meetings and we have developer meetings around the Kubecons, and then some groups will individually do face-to-face meetings, like we had recently at the Helm Summit in Portland for people who work on Helm. So I mentioned SIGs, like, at least five or six times now. Those of you are brand new to the Kubernetes, who haven't been any involved in the Kubernetes community before. SIG stands for Special Interest Group. It's an old term in computing. We're using it in the same sense that the IETF does, which is that the SIGs are the sort of building blocks of the community. Each SIG is a department, and they have authority over a particular area. And in a lot of ways, the Kubernetes community is actually a collection of SIGs, as in the SIGs and the SIG leaders have a lot of authority over how the project runs and what's acceptable and what's not acceptable, etc. And even some slightly different character and how they handle contributions and mentorship and other things within the individual SIGs. I do have an opportunity to flip through this really fast because if we went through it slowly, it would be the rest of the time. There are, I believe, 41 SIGs and then some other organization types. But you can actually kind of go into sort of different areas with SIGs. If you're just getting started, you're most likely to be looking at one of the SIGs in the feature areas, and that would include things like authentication, node, which is management of the individual machine, scheduling. If you're into improving Kube control or adding to it, you might get involved in SIG CLI, you know, all of these things. And that's generally where you're going to start with. But there are other ones, like for example, SIG cluster lifecycle and API machine or any instrumentation handle a lot of the plumbing that holds together the other parts of Kubernetes. Or if you work for or involved with or implementing on a particular public cloud provider, those all have their own groups to manage all of the plugins for those. Or this is where I spend most of my time. There's a set of SIGs that handle a lot about how the project runs, like SIG release and contributor experience. And I'm basically giving this presentation as part of my role in SIG contributor experience, which is concerned with how do people contribute to Kubernetes? We have a group for that. This is generally for the when you've been involved for a while though, because you just hop into one of these are not necessarily what you know what's going on. Caveat though, this is exactly where a couple of people have started, because they wanted to improve things for other contributors rather than hacking on stuff. And of course, the number one, the entry point for new contributors, which is SIG docs, which also documentation and website. Huge SIG, lots of people, very organized program for new people getting involved, which is why it's nice to interview there first. Now there are some other things that you'll see people thrown around. There's working groups and working groups are generally task-based organizations, like the resource management working group that's specifically looking at how you control things like memory usage within Kubernetes. Or sub-projects that are fairly specific projects under a particular team, like under SIG API you have the cluster API team that's looking just at the how do I manage a whole cluster through a single API. There's new API that they're building. And if one of those projects is your project, you may join that sub-project. But if you join a sub-project, you probably also want to join a SIG as well for sort of community reasons, because the sub-projects don't generally have much involvement in how the overall project runs. So basically figure out where you want to work on first. Figure out who covers that, which is probably going to involve like Pinguis and SIG Contribux and Slack. And saying, hey, I want to work on X. Who's that belong to? Because some things like CLI are obvious, but a lot of other things are not in terms of who's responsible for them. And it's better to just ask. And then attend a couple of meetings so that you can actually see how things go and so that you can introduce yourself to people. Now, if you are looking at contributing to, well actually looking at contributing anywhere, you probably want to be aware that we have an enormous number of GitHub repositories covering just about everything. They're very disorganized right now and so we're in the process of moving them around in order to make them more rational. But in general, we have a few things like there's the core repository, which is Kubernetes Kubernetes, which we're honestly actively trying to move stuff out of because we're really trying to make Kubernetes become more of a plug-in infrastructure. And plus the core repository's gotten really huge. So we'd really like to actually take stuff out of the core repository, but that's also a very hard thing to do.  Like if you were actually like in sync contributor experience, we spend a lot of time contributing stuff to the Kubernetes community repository, test infrastructure, performance tests, that sort of thing. Again, all have GitHub repos. We have the docs and website, which is starting to branch out. We have the main K website. So if you look for the documentation repo, you're not going to find it. The repo is actually called website. And then we're starting to have separate translation repos for things.  Some of these might actually use this thing called staging repos, which are actually portions of Kubernetes, Kubernetes that are broken, mirrored onto a separate repo for ease of development. So if you're actually working on things like the API server, you're actually likely to spend a lot of time working with a staging repo instead. And then some of the SIGs have their own repos, but most of them don't. Most of them have their own directories within the main repos and other things rather than having their own repos. Oh, and a few of the Cloud providers have their own repos, but not all of them do. So for any of things. And then remember how I said, if you're starting to contribute in code, you're actually a lot more likely to start with a satellite project than you are to start with the core project at this point. And so there's a whole bunch of repos for there, some of which are in the Kubernetes namespace, some of which are not. And also the Kubernetes SIGs namespace, which is where a lot of the sub-projects are. But again, if you're into a lot of these things, you want to improve Helm, you want to improve Minikube, you want to improve the installation experience, something like that, you're actually going to be going to one of these satellite repos. Now, one of the important thing to know about all of these repos is that the project allows the developers who manage a particular repo a lot of leeway in the workflow of that repo. So we have a whole lot of writing like the contributor guide and stuff about how stuff works. But by how stuff works, we mainly mean in Kubernetes, Kubernetes, and a few of the other core repos that are under central project management. If you're actually contributing to something like Helm or COPS, you may find that the workflow there, in terms of how things get approved, how things get reviewed, et cetera, is very different. You have to find out how it's different interactively. Just be aware that it will be different. Now, one thing that we are enforcing project-wide but is not yet complete is the use of owner's files, putting owner's files in project route and in every directory so you know who's responsible for a big good piece of code. And if you are getting started contributing, these owner files are extremely valuable to you because you're like, hey, I'm really interested in adding this extra interface to this particular thing. Who do I ask about? And the owner's file, look in the owner's file in that. If there isn't one in that directory, look up the directory route. Find out who's actually involved with it because if you can ping individual names, you're more likely to get a response than jumping on a SIG's channel and asking the group at large because often is not the person who actually has the answer for you is in a different time zone and if you don't tag them in your question and they get online 11 hours later, they won't see. So use those owner files to look at it. And later on, you will need the people that own the files to approve your work. So better to make friends with them now. The first place that you get started contributing often is actually through issues. And I know every project says issues are a contribution but in Kubernetes, we really mean it because one of the terrible things about distributed systems that take lots of plugins is the combinatorics on the different things that we theoretically support are really insurmountably large. You know, we have the giant testing group and hundreds of automated tests and they still cover less than 10% of how people actually use Kubernetes. And so if you have a way of using Kubernetes that is maybe different from what is automatically tested, your response on how that worked or didn't work is actually extremely valuable because we have no idea otherwise. So contributing bug reports is often where people start as you go in there and the first thing is to find the right repo for the bug. And if that is confusing ask again, jump on discuss or in Slack or something else and say, hey, I found a bug in X where do I file bug reports about it? We do. I mean, I'm giving this into the Kubernetes community repo. We have a lot of description of who owns what. You'll discover that description is really complicated because there's a lot of stuff to own. Really asking people is the easier way to find out where you should file these things. Your first time. Create a complete and detailed bug report and then very, very important follow up when people respond to it because if you file something and you don't follow up chances are it's just going to get deleted as won't fix because people don't have enough information to help anything. So get some example of, you know, a complete technical bug report. We also accept bug reports on community process things and things that are not technical. Also, if you want to change things about Kubernetes like say you want to add support a new driver or support a new API or something else add a tool other contributors going to want a specification for that and you will create that specification in the form of an issue. Create an issue of kind Kubernetes of label kind feature and give a spec for what it is you want to change and how and why and again follow up to the responses and the arguments and the discussion that you get on that. So, and then the proper workflow is you then go from that when you get more or less agreement on that issue of what's going to be done next then you write the docs or work on writing the code or whatever in order to create a pull request for that. Now, I'm not going to go into this in detail as part of organizing all these issues we do have a sophisticated system of labeling issues in terms of labeling what kind of an issue it is and who owns it and that sort of thing. Again, you can ask for help here and there's a bunch of documentation in the contributor guide for what all the various labels are for and which ones you're required to put on. Just know that you will be required to put on some labels and then other people more experienced to the project will be putting on labels for you. Now, follow up with all of that and here's an important thing. When you find out what SIG or work group or whatever owns the area that you want to contribute to follow up with them socially on Slack on a mailing list in a SIG meeting so that people in that SIG are aware of the thing that you want to do because otherwise stuff can languish for a really long time without any attention because we get I don't know whatever it is a thousand issues a month something like that. Documentation I talked a little bit about in these terms and contributing to documentation really good place to get started. There's a website repository. They're very responsive via Slack. It's a good way to actually connect with the documentation team. The they have a whole branch set up where the core thing going forward is master but they have branches for each major Kubernetes release so that we can have past versions of the docs for using older versions of Kubernetes. Now once you have an issue that you have consensus on then you're going to be looking at actually creating a pull request. Now I'm not going to go over how pull requests work. You don't know already learn that online. We do have a lot of people who basically get started with GitHub via Kubernetes. So there's that track available and we'll just sort of explain that. What I would say more is when you're looking at stuff like for example say the issue isn't your own but you're saying hey I want to get involved with Kubernetes. I want to find out how stuff works. I want to find out how the API works. So I can contribute my own thing to it later. So in the meantime let me do some stuff. So there's two tags that are used sporadically in existing issues. One is help wanted and the other one is good first issue. Now good first issue means it's almost always something that a new person can get started. Issue maintenance is a thing so do double check that it's still a valid issue at this point on Slack or otherwise. Help wanted tag theme to be all over the place. Sometimes it's help wanted because it's a good first issue. Sometimes it's help wanted because we need somebody who has specialized knowledge in order to resolve this issue. In which case unless you happen to have that specialized knowledge this is not actually the place for you to start. The go through branches and a couple of other things. Now obviously it's a bunch of general stuff for pull requests as applies to almost every project. Keep your individual PRs as small as possible. Make your commits logical squash commits if you need to. Put in commit messages that explain everything even if you're going to explain a whole bunch of things in the pull request as well. And this is something that is not well-onored even by experienced Cooper days contributors. We harass people about it all the time but please please do that. And you know obviously look out for committing a rebase or something else where you've got unrelated material because that will tend to not your stuff reviewed. Open your pull request what you're immediately going to response from will not be from a human being but from a GitHub bot. And that GitHub bot may tell you that you need to make changes to the pull request to make it acceptable. It almost certainly will if it's your first pull request. So look at those instructions and follow them. We work hard on making those instructions actionable so that you can follow them. If you can't understand them again hop on slack or discuss and say the bot's telling me X what does this mean? Make sure your CLA is signed because this is the point where you need to have a CLA or we can't take the pull request and then wait for a reviewer or plead with somebody to review your thing and they can actually put in the okay to test label so it goes into the automated testing. If it's your first contribution it doesn't get tested automatically because we don't want people to put in Bitcoin miners as pull requests. So we go through all of this and the bot puts all kinds of tags and you'll notice a lot of labels are generated by the bot to tell us the status of things. It's really a very heavily automated project we're making up for all of GitHub's many limitations with bots. You can talk to the bot you can assign things it'll tell you have to assign something to a SIG and you do that with these backslash or forward slash instructions. Also going to have fun sometime the putting the forward instruction wolf or meow just do it. Follow up on your pull request if your pull request is not getting reviewed and you found out which SIG first of all if it's not assigned to a SIG it will almost certainly never be reviewed. So find out what SIG it should belong to make sure it's tagged with that SIG and then go to a SIG meeting and get yourself on their agenda to say you know hey I submitted this can anybody take a look at it? I mean be polite out of new stuff into the project all the time and sometimes you do need to actually get in front of a person. Look for failing tests and fix the reasons why they fail and then discuss and obviously be nice if you start shouting at people most likely they're just going to close your PR and if they're not being nice then come to SIG Contravex and we'll work it out.  Once you're a Kubernetes contributor or even if you joined a team and taken on some volunteer responsibilities but not actually contributed anything yet apply for what we call org membership this is in GitHub org etc. It's like your sort of first step on Kubernetes later it's basically saying hey you're a real person and you've got some commitment to contribute to Kubernetes it means that the bots will listen to you more among other things and it's also the first step on what we call the contributor ladder and we are very very interested in moving people up this ladder because particularly on that approver and owner level we do not have enough people so we would really like people to move up from member to reviewer to approver to owner so we have more maintainers of our rapidly growing code base so we want to help you move up that way. So basically get there now one of the things is the process for asking for org membership changed recently from a process that depended on email to one where you open file an issue against a repo and we're still working on some of the details of that so if you're doing this next week it could be a little janky just you know go to the org repo file an issue request an issue and say hey I should be an org member because X preferably get find someone else in the project who will endorse that via whatever of our many discussion media that you have you can help with contributing again SIG contribex meet our contributors on Slack discuss.coupernaise.io all of the general events you can even join a structured mentorship program and again the place to ask about that would be on SIG contribex and most of all remember to make friends open source is fun it's often chaotic people are contributing to Kubernetes because they like it and because they're enthusiastic about it and if they hurt your feelings they probably didn't mean to and if you see something that's broken or needs fixing or whatever treat that as an opportunity and most of all talk to people so we are at the end of our time slot yeah? Yeah, I take a couple of questions and please do use the mic I, well it's from the other speakers I have an air conditioner directly behind me so I can hear him but really nobody in the back so you mentioned that that you have tags in some of the refills so do you have particular levels of experience for certain people? for example at Apache some of the projects what they do is they have apprentice bugs or first bugs do you guys have labels and tags like that? that would be nice but no no it's really limited to like good first issue okay another question? yeah I mean our big issue is even with good first issue we have trouble maintaining those because the problem is that stuff is tagged good first issue and then people forget about it and then it becomes no longer relevant because say the underlying API has changed I mean that's why I said when you find a good first issue if it wasn't, if it was filed more than a few weeks ago do double check that it is still valid so you know maintenance of things that have been open for a long time is always an issue okay well thank you very much I hope to see some of you online on GitHub and discuss and Slack as potential Kubernetes contributors in the future thank you thank you all so we'll be skipping over the afternoon break and heading straight to the closing ceremony we do have some fabulous prizes to be given away there will be a trivia game conducted so please be there thank you


The Qolsys IQ Panel 2 Plus wireless security and automation system. The Qolsys IQ Panel 2 Plus offers all of the same features and monitoring rates as the original IQ Panel 2 system we reviewed earlier, but in addition it contains an onboard Power G transceiver. This unlocks all the advantages Power G brings to the table, such as two-way military grade encryption, up to eight-year battery life, and with the IQ Panel 2 Plus, the second best wireless range of 2,400 feet without a repeater, and 4,800 feet with a repeater. Also, the IQ Panel 2 Plus has several different models that will allow end users to use their existing 2GIG, Honeywell, Interlogix, and DSC wireless sensors to save money. Click the Show More tab below for more information on specific product numbers. In addition, when non-Power G sensors are utilized, they will not enjoy the features of Power G. When an end user uses Power G smoke detectors, they will be able to enjoy the one-go-all-go feature. Lastly, since the IQ Panel 2 Plus uses Power G technology, end users can add a much less expensive secondary keypad if they choose the WS9 LCD WF9. The only downsides to the Qolsys IQ Panel 2 Plus we could find were the IQ Panel 2 Plus isn't able to use alarm.com image sensors because the Power G module is hosted in the same slot. The IQ Panel 2 doesn't offer any interchangeable cellular communicator options. You can't bypass sensors remotely from the alarm.com app. The Honeywell Lyric Encrypted Security and Automation System The Honeywell Lyric Controller serves as the main controller for the Lyric Security and Automation System, which comes with a 1024 x 600 7-inch touchscreen display. End users will have the luxury of choosing what communicators to activate, the onboard Wi-Fi, optional LTE cellular only, or a combination to obtain dual path alarm monitoring services. Lyric offers interchangeable cellular radios in the event a new one is needed. The panel has a 2 megapixel front-mounted camera so when the system is disarmed, it can text or email a notification to end users that have the Total Connect 2.0 services and the onboard Wi-Fi communicator activated. Lyric offers its own line of security sensors called SIX devices. SIX offers a 128-bit AES one-way encryption back to the main controller with a 300-foot nominal range. This helps protect against a possible intruder from jamming the signals of the sensor back to the main control panel. One of the biggest advantages end users seem to love is the one-go-all-go feature. This is when one SIX smoke detector is triggered, all of the additional SIX smoke sensors will trigger as well. Not only is the Lyric Controller a home security system, it can also be set up to use Z-Wave Automation devices so you can create a smart home wireless mesh network. Include these Z-Wave or Z-Wave Plus devices into scene so that at the touch of one button in the Total Connect 2.0 app, end users can automatically have the system arm or disarm, set thermostat temperature accordingly, toggle lights on or off, and either lock or unlock a door simultaneously. Lyric has access to its own recordable 2-way audio IP camera line which offers an indoor, outdoor, and dbcam video doorbell option. Honeywell has been working for quite some time on becoming compatible with several key integrations such as Apple HomeKit, Chamberlain Garage Doors, August Smart Locks, Amazon Alexa, as well as the Honeywell Lyric, Honeywell Wi-Fi, and Honeywell Red Link thermostats. The downsides to the Honeywell Lyric Controller we could find were, you can't view IP cameras from the main touchscreen like you could in the past. Lyric from factory doesn't come with a 24-hour backup battery, it can be purchased separately. No wireless repeater for 6-series sensors yet, no recessed 6-door window contact, no hardwired 2-wireless module that will allow for encrypted signals back to the Lyric Controller. Lyric doesn't integrate with Nest thermostats at this time, no Rachio-Sprinkler control for irrigation, no LUTRON light integration, as of now there is only an AT&T LTE cellular backup option, though in the future there should be a Verizon option. 6-series sensors are listed as the lowest wireless range for RF sensors at 300 feet nominal. Lyric doesn't offer any additional partitioning. This system works with Z-Wave Plus automation devices, but they will not enjoy the encryption factor. With Total Connect 2.0 app, there is no way to include scenes on the front screen, you must select a few more buttons to run a scene. Please comment below if you have any questions, we are here to help. Make sure to subscribe to our YouTube page and click the Show More tab underneath the video where you can view valuable links pertaining to this product, similar how-to videos, and our low-cost no-contract alarm monitoring services.