#221 Greg Meredith & Nash Foster: RChain – The Scalable, Concurrent and Performant Blockchain
8 Feb 2018 · 1:07:14
Greg Meredith and Nash Foster of the RChain Cooperative join Epicenter to explain their concurrent, sharded blockchain platform. They describe how RChain spun out of the Synereo project, the Rho Virtual Machine and Rholang programming language behind it, how Casper proof-of-stake consensus secures the network, and why the team chose to organize as a cooperative.
Speakers
Topics
Transcript
[Music] all right welcome to episode show which talks with technologies projects in startups driving decentralization in a global blockchain revolution my name is Sebastien Ogier and I'm a hero today we are talking about our chain which is an ambitious blockchain project that seeks to solve the problems of scalability and smart contract safety on this conversation we have Greg Meredith who's the president of the cooperative building this blockchain and
Nash Foster who is the CEO of CEO at PI R effects Corporation that is leading much of the development work Nash and Greg welcome to the show thanks for having us yep thank you yeah so Greg you've all already been on this show and at that time you were working for this project called scenario and we talked about role and smart contract language you were developing tell us a bit about what has happened in the meantime for you personally and professionally well I mean one of the things that was was crystal clear back in in at the end of 2015 in beginning of 2016 it was that if
we were going to create a blockchain that could scale to kind of be the combination of Visa and Facebook that the existing architectures were not gonna not going to work and so we conceived a version of our chain at that time which was built on you know a model of computation that I had discovered back in the early 2000s and and there was so much community support there was this groundswell of community support that when scenario decided that it wasn't in their best interest to pursue that I said well you know but we promise the community we're gonna build it so
let's build it and the community gathered themselves around the prod and it's just been remarkable everyone has has kind of pitched in and and created this well-funded and viable project to where um we're just moving at this unbelievable pace uh we just dropped the SDK last week kudos to Nash and his team for that it was just amazing the the the work on consensus has has accelerated to this huge point where we're now able to take a variety of existing consensus algorithms and express them in this Kasper correct by construction framework
and we'll and we're already committing code against an implementation of that the rolling itself the SDK includes a version of the compiler so people can start testing that out for themselves and you know one of the things that I'm most proud of with respect to this community is is how we have addressed governance so the model that we've addressed here is the co-operative model so our our corporate structure is basically completely cribbed from REI recreational equipment incorporated which is a very very successful cooperative Washington state cooperative
so we're we're modeled after REI and I'm just delighted in October we held our first annual membership meeting and the membership expressed its will and voted at the time we were about 300 members now we're over 600 members and we're about to go into our first governance forum in which the membership talks about what it means to scale not only that you know in terms of throughput but but in terms of the size of the organization what does it mean to be a scalable blockchain that is also the first and to my mind only publicly owned and publicly operated blockchain so - this is your first time on our show tell
us a bit about your background and how you came to work with the Archon project yeah thanks for having I've spent about 25 years in the industry building large-scale systems and securing them I spent a number of years working on the cyber liability team at Google where I met my co-founder of pyro effects Mike stay and we got involved in our chain because Mike and Greg have been research partners on category theory and some other mathematical stuff for a number of years we started Peyer of X in 2016 as a company that was dedicated to building distributed systems tools to make it possible for large-scale distributed programming to become convenient for the
average programmer that has really blossomed with the coming of the blockchain and our ability to contribute to our chain so I'm in a lot of fun you know our focus is on execution we're here to make sure that the code gets written and delivered and that it's correct every every week so Greg you mentioned that our chain is a cooperative that's that's a really interesting I guess structure to have for an open-source project is is this a bad I haven't really heard of any other open-source projects that organized as a cooperative can you explain why you chose this model um yeah largely because
we were looking for something that was in alignment with the open-source the principles and values in the open-source community and which seemed to me to be largely about democratic processes and the most democratic process that I can imagine was one member one vote which which is what you know in our bylaws III honestly think that that over time we're going to see an elaboration of our governance structure that that makes it more nuanced or more sophisticated then then just the the than our beginnings
but I wanted to have a good beginning I wanted to have a good structure especially as as we as we scale out it's it's going to y're i i think a lot more sophistication in terms of governance but this is a very good start i mean it certainly makes a lot of sense for an open-source project maybe well maybe others will follow you down that path who knows well well actually there are so we we've been working with a group called resonate which is based out of berlin and they're a blockchain based music sharing service and they've also structured themselves so yeah right that's right they're also cooperative so what as a member as a voting member what types of things do
you get to vote on what is the governance I'll sort of afford you as a member so so kind of the first and most important thing is that you can vote for the board members so in that sense it's kind of a representational democracy but at any point the membership can call a special meeting and get proposals in front of the board so they they craft and shape how the coop operates I'll give you an example where recently we had we had a deal the coop is is is exceptionally well funded right now and so we need to attract applications to build on top of the platform and so we
set up a venture fund to do that and the membership completely they crafted the basic shape of the the structure of that deal you know we had we had a shape we put it for review to the membership the membership came back with a bunch of feedback and the board listened to all of that and said oh wow we need a different structure and came back with a structure that was in alignment with membership wanted and then we executed that deal and then the membership came back and said oh wait no he needed more milestones and in terms of how the funds were delivered and so we went back to the venture fund and said the membership
is unhappy with this structure can we start restructure the fund allocation in terms of my stones and they said whatever whatever keeps the membership happy we're absolutely happy to do that and so so we we post facto corrected the deal with respect to the membership so the memberships goals and desires so that's how this works this is in my opinion democracy in action so let's let's explore what our chain really is now I've spent the past day like going through the are chain documentation and I can see that it's it's a very ambitious system that that
seeks to solve scalability and smart contract safety at the same time but and this project has some underpinnings in theoretical mathematics and the kind of components you have ended up building to realize this system are very unique right so we'll seek to cover all of it but perhaps just to start explain to us your big picture vision on how you seek to solve scalability for blockchains sure let me let me give a just just take a step back and and just look at the space
more generally the the analogy I've been using a lot for people is HTTP HTTP 1.0 is a really really stupid protocol and people have heard me say this a million times but I'm just gonna keep saying it until someone hits me over the head with a 2x4 it's it's so stupid that no computer scientists in the right mind would design this protocol it took a physicist to design this protocol but it's stupidity was it saving grace because any network administrator could look at the protocol and say oh well this can't do very much and and as a result they were willing to open a port in the firewall to let HTTP packets through and and thus the world wide web
was born if it had been smarter and contained you know sessions and and other kinds of information it probably wouldn't have gotten off the ground because nobody would let it through so likewise proof-of-work and and sort of the Bitcoin blockchain is a really stupid protocol it won't scale but it's it will scale in the sense of adoption because it's really easy to explain people understand it and there's an existence proof you can stand one of these things up people can grasp what it does and and and then you suddenly see oh wow there are all these consensus algorithms that we hadn't thought of before that
are essentially economically secured consensus algorithms that favor availability over lockstep consistency and once you see that and you can kind of go oh so there are a bunch of other ones that we could provide that are scalable so let's start looking at that whole family of algorithms because it's really interesting if we have this economically secured leaderless consensus and then and then if you just take that as stipulated okay there's a bunch of the bout there we're gonna find a few that suit our needs what do you store what do you come to agreement on and and again the bit the Bitcoin blockchain has it has a relatively interesting answer
let's store a ledger right mayor has this mini Bitcoin in Nashes this mini bitcoin is best and has this mini Bitcoin right and obviously right if we just look at the market today that's a somewhat interesting application aetherium says how about instead of storing a ledger let's store the state of a merchant and then we could make Ledger's as programs on top of that virtual machine so that's it that's a great idea that's it's a vast improvement on the original proposal but if but but now comes the rub because which kind of computer you choose to store has a huge impact on how you scale and in particular if you choose a computer
which is sequential one thing at a time then you are going to be forced at least for all the financial transactions executed against that computer to give a global serial order which will never scale so you need to be a little bit more circumspect and a little bit more careful about the kind of computer or what I would call the model of computation that you're going to store and then you can kind of go through you can list out all the models of computation um and you can and and that there's a to make it easier to list them out instead of listening them out
willy-nilly and some kind of zoo like taxonomy there are four properties that you can use to analyze your models of computation there's completeness everybody knows that now because we kind of know what you know why why aetherium chose a turing-complete language for it for that's a part of the model of computation there's also compositionality can I make make larger programs out of smaller ones you know I build build programs out of Tinkertoys sets which are which are sort of programs themselves it turns out that not every model of computation is compositional there are two that stand out that or not turing machines are not compositional and neither are Petri nets now interestingly the dividing line
between Turing machines and Petri Nets is concurrency and that's the next next property which which started this whole rant of mine right now which is does your model in natively support concurrency so so let's just go through to get completeness compositionality concurrency and then finally you need something that in the literature is called complexity but really what that's just can you measure in your computations the use of resources like space and time okay so those are four C's if you then analyze all the proposed models of computation against those four C's there's exactly one family that that stands and I discovered this in the late 80s Early 90s I listed out before the
four characteristics I saw that there was a gap there was a hole there was no model at the time that was proposed that had all four properties and I predicted the existence of one the next year Robyn Milner publishes his seminal paper on the PI calculus and I evaluated against my four C's and I discovered hey here's a model finally that has all four properties and then I started looking at that that model of computation and the whole family of models of computation that arises variance on that I found a small little niggling bug in the PI calculus which we fixed with something called the Rho calculus and the Rho calculus is effectively the only model of computation that has all four C's and also does something else which we know
from computing is essential for industrial scale computation and that is reflection the reality is that people don't write programs programs write programs and people write the programs that write those programs so if you look all of the major mainstream languages have ultimately had to have some kind of notion of computational reflection to be able to get to industrial scale whether you're talking about c-sharp or Java or even templates in C++ reflection is an important part of the model of computation so when you add that feature in there's exactly one model of computation that fits all those needs and that's the row calculus and that's part of the story but what's interesting is how those features
interact when you start to notice how the features interact you see that the model of computation is Auto sharded so it's not like it just gives you concurrency it gives you concurrency with this notion of sharding built in we didn't bolt it on the side we didn't add it later it was a part of the notion of computation from the beginning it was built in from the ground up likewise security our notion of security is in volt Adhan the side or develop post facto it comes as a part of the model and lines up with the best proposals for security ie the Oh caps models that are a part of that so when we talk about scaling there are other
things that we need to talk about when we talk about scaling it's not just the total number of transactions per second throughput bandwidth storage these are all important parts of scaling but it's not the only thing in order to get that throughput you have to have concurrency and sharding a bunch of other stuff but you also have to have correctness so here's a little thought experiment what if aetherium back in 2016 ran at the the transaction rates that we expect out of the visa network so two or three orders of magnitude faster than
they were then they were running at the time and then they deployed the DAO bug instead of 50 million dollars being drained all of it would have been drained in a heartbeat so the point is that scaling also includes correctness if you have garbage if you make garbage run faster that's not scaling so hopefully that gives you that gives you a picture of what we mean by scaling and how we approach scaling I'm sure Nash has a much better way of describing this than I did and probably much more succinctly let's hear from that that was actually
really clear I mean for for the non engineer that I am I really like that explanation I had to have one question though is concurrency necessary for computation for compositionality just maybe to come back on this idea of composite compositionality it's companies compositionality this idea that I can build a program out of smaller little pieces right so i Function x' right and i build like a class out of these functions that's a good representation of what that is that's that's one way of doing composition okay that's right and so so you're absolutely right that
there's there's a relationship and it's really easy to get that relationship screwed up and and I'm so glad that you brought up object oriented because object-oriented paradigm I think initially people thought of the object-oriented paradigm and the notion of class and instance and inheritance and specialization as a good paradigm for also including the notion of composition that includes two autonomous computations running side by side right like like two cells in your body you know like living side by side and potentially communicating by passing molecules back and forth right so and it turns out however that there's a whole
host of literature that shows that that doesn't work at all which is why there are a whole language proposals now that say no to get rid of the object-oriented notions of composition eschew most of those and move more towards these these compositions that are organized around autonomous execution the the language go is a profound experiment along those lines so yes there are different notions of composition but not every notion of composition in particular let's the most famous one is the lambda calculus the limba calculus sits at the heart of f harp Scala Haskell Oh camel Lisp take your pick all the functional
languages they they arise out of this model of computation called the land the calculus if you go study the lambda calculus you'll see there's a theorem called Barry's theorem which proves to you that the lambda calculus as a model of computation is sequential one thing at a time so if you had a block chain based solution that was organized around the lambda calculus or a functional language it would be sequential and you'd know that without having to do any other kind of investigation then you'd immediately go that's an interesting idea but you're limiting your scope and your scale so composition doesn't necessarily mean concurrency well it an interesting thing
to note is that in the Google style guide for C++ you're not allowed to use inheritance or polymorphism which are the composition primitives that Greg is basically talking about at the object-oriented level rather than do that what Google does inside its architectures it uses remote procedure calls to have two independent services interoperate over the network by sending messages which is effectively the design that's built into row lining at the syntactic level we just decided to rather than make it a a toolkit with a bunch of libraries and a whole bunch of boilerplate code that you had to write we would design it right into the syntax of the language from the get-go and I do have another question regarding so you mentioned sharding and you said that sharding was made possible as an
inherent property of concurrency so if I understand correctly then the idea is that by having concurrency by having processes that may run in in parallel whether or not they have to be synchronous with each other you introduce sharding because you have these computations that can occur in separate spaces yeah that's very close lit there's a little bit of nuance a little bit of subtlety you you could have concurrency that didn't have sharding built in but the way concurrency is manifest in this particular model which is that you have processes that are communicating with each other by passing messages over channels it's the fact that the channels
have the space of channels it can be structured so if you think if if for a moment we imagined that URLs are kind of channels right it's a channel between someone who's seeking a resource and the resource right so so I use this I use this URL as a way of addressing the resource and because that address has structure to it I can talk about you know you know all the addresses that have ABC is a prefix I said that's a space of addresses and that space of addresses is and the sort of built-in structure of that in the row calculus is what gives you the auto sharding so it's again it's how the
features fit together rather than rather than just the fact that it's concurrent if you look at the sort of solutions for sharding datasets that we've actually built that are successful so far they all sort of revolve around the central problem of finding the thing that you're looking for you've got you've taken this one big haystack and you've turned it into a dozen smaller haystacks now which haystack to you search right if you have to search them all you've made no improvement and so the the structure of names is what allows the the blockchain to find the data that it wants to find quickly without having to search through
all the haystacks okay there's one notion I think that maybe it would help to clear up here and that's the notion of concurrency in programming and and and how that relates to to parallelism and the way that I understand it and you can tell me if I'm right here so like concurrency is say for instance you wake up in the morning and you're gonna like brush your teeth and then you're gonna go make your bed and then like while that's happening you're making coffee and like you're you're doing all these different things and they can happen in order and and sometimes they may overlap but like ultimately you you can't as you know in theory like you can't as one person be doing to two separate things at a time you have to go back and forth now parallelism is like I'm brushing my teeth while I'm putting my shoes on I'm
doing two things at once is that could we look at it these are great questions you know everyday examples are really really good I often I often do everyday examples from traffic right so if you imagine an eight Lane freeway imagine an eight Lane freeway in which there was no Lane crossing allowed okay so you can get you can get eight streams of cars you can get eight times as much throughput on that on that section of freeway right that's parallelism and parallelism means they're not allowed to cross lanes
concurrency means that they can cross lanes which means they have to synchronize right one car just like can't smash into another without causing all kinds of havoc and really reducing the throughput on that section of highway right when they cross lanes you know there there's there's some message passing like you turn on your blinkers there's a signal I'm moving to the right right and then and then there's a response in the in the the lane over which will which you know either there was a natural space or a space was opened up as a response to that signal which allows the car to change that's concurrency right and and then we make a further distinction typically between concurrency and distributed which has to do with failure modes right so in concurrency typically you're thinking
about even though they're running at the same time and synchronizing they kind of all failed together whereas in distributed they don't necessarily have to all fail together so those are those are three sort of terms of art and those are some rough rough guidelines for how did how to distinguish them I want to take issue though the person can't do the same two things at the same time a piano player is a really good example and you can get six-year-olds who can play the left hand of some sheet music in the right hand and then put them together right so we have that sort of a basic example I'm loading in piano now and I'm figuring out that no you can't do two things at once sir well I'm learning that you can in fact do three things
so to put it back in terms of your original analogy parallelism as well is where you make coffee while you're brushing your teeth and concurrency is where don't care whether you wake up before you brush so is there like some kind of analogy you have for this model of computation yeah I mean basically you you could think of it you can think of it like molecular computation right so so processes are molecules and then the molecules synchronize with each other by by sharing things or for example they could share they could share electrons that would that would enable them to
synchronize and those and when they share electrons that that creates a larger structure another you can you can go up a level and scale so so process these are not molecules but they're their cells and then they synchronising communicate by sending molecules they share molecules with each other and it turns out that you can take this model up arbitrarily in scale so processes are human agents and they they synchronize with each other by sending messages to each other over a variety of channels so they might use for example cell phones and telephone numbers as a way to send messages so then or you-tube exactly so
the nice thing about it is that it's it's fairly abstract and in fact if you look if you look at the theory the theory is is is parameterised in the notion of what you say a a channel is so essentially the there are two basic forms of processes one is you have a process that's blocked waiting on input at a channel and then after it gets that input it's gonna go and do some other stuff which processes do and then the other form is the process is asynchronously sending some output on a channel those are the two basic forms and then the others have to do with composition right so we can put two processes together to run in parallel
and and and there in order to get the whole thing off the ground you have to have some kind of you know core building block processes so you could start and them in the most primitive the core building block is just a stopped process it does nothing it's completely inert right so you know you could you could talk about building off of that you could say well I'm waiting for a phone call on my home number and then I stopped or a more complicated process is I'm waiting for a phone call on my home number and when I received that phone call it's gonna give me another phone number and then I'm gonna take that phone number and I'm gonna
send it out on Nash's number so there that's a that that's an example of a process that we just built using our primitives so in some senses like in this model of computer computation there are these processes each process is essentially Turing complete like it can it can take data it can do all of the operations that a turing-complete machine can do and then it produces an output but in this model of computation this like not a single process but there are like multiple processes and they communicate with each other and using this model of computation essentially allows the programmer the programmer has
one big task to do program the task in a way that it's distributed to these different processes they will run some part of it themselves when needed they will interact with each other and and distribute it like they will complete the whole the complete task yeah that's not it's not a bad mental picture I'm just gonna throw in some brain candy for you and for your audience so you kind of bootstrapped that description by by assuming another model of computation which was the you know the Turing model you sort of what you're imagining is a bunch of Turing machines that are all coordinating with each other by passing messages it turns
out that message passing is all you need you don't need to assume any turing-complete stuff you can actually code up arithmetic just as message passing and that that that ends up being a big it's a it's a twist in people's brains usually when they encounter this if that was candy then I don't want to know what oh maybe [Laughter] but but yeah I sort of that the the the the main the main thing that's really interesting is that all computational phenomena are Rises interaction and this was this was Robin Milner's a key
insight when he found the PI calculus so that all computational phenomena arises is interaction super interesting so basically it's the exchanging of messages that is the computation that's it the the the process itself is not computing anything but the pattern of how that process exchanges messages with the other processes is how it computes and this is exactly how your computer actually works right a consider just you know adding two numbers inside of the Intel CPU what's the last thing that the the adder has to do it stores the results in a register which requires that results to be moved from one part
of the CPU to another part of the CPU right when you when you're done with the register do you want to store the results more permanently you have to move it out to main Ram or to disk or or on to the internet right and so the thing about von Neumann machines or Turing machines is that they sort of just ignored all of that because they viewed it as physical complexity that they weren't interested in reasoning about but it turns out that if you start there you get a more powerful model than touring on von Neumann could you know knew knew how to work with and that model allows you to work with great networks of interconnected machines its idiom is essentially like the EVM is trying to be a Turing machine right so there's like sets of it's technically
it's a von Neumann machine right the EVM is a one Neyman machine it is representing like what the machine needs to do as these opcodes right and and then you give it an input and it's going to use these op codes to process and get the output but central to how the EVM operates is that these op codes will be executed one by one sequentially so so it gets the input it might use the add opcode then it might use the jump opcode then it might use some other opcode it does one of these operations one by one then the output is is produced and then this output can be
given a way to the next thing so like if I created a transaction in which I ping a smart contract the evm execute that and then it might create a transaction and paying another smart contract so there is there's this sequential nature that is inbuilt to the EVM and what you are essentially saying is if you change the model of computation itself in a way in which there are different processes and all of them can execute in parallel or concurrently right concurrently and in a model where the exchanging of messages is somehow implementing the computation
itself then obviously you will have and each of these processes becomes a smart contract then you will have a natural substrate so you have one smart contract that you distributed into like hundred processes each of these processes can happen in parallel they can exchange messages and and then they can compute and so because because these happen in parallel they can happen on different block chains essentially well they don't necessarily have to happen on different block chains but they can like let's say that that some of those communications don't really engine others of the others
of those communications then then you don't have to have the state of the one visible in scope to carry out the computation for the other and that's what's really important right so I mean this is this is this is all this is all more or less common sense when I buy my coffee for the Wildwood market down the hill right that transaction is almost certainly isolated from someone buying grilled tofu from a street vendor in Shanghai right that's how our financial assistance scales right now right so we got a we all we have to do is just model
that and we're gonna be much much faster if I have to sequential eyes or serialize the order of the the street vendor transaction in Shanghai with my coffee here in Seattle that isn't going to fly right so we have to we have to and and the important way to understand when two sequential eyes or when you have to serialize is when they touch on the same state or they touch on overlapping state and so if your model of computation allows you to determine when they're touching on the same state then you can you can figure that out and you can say oh these transactions have to be ordered now to bring it home if you if you look at the the the opcodes of the EVM at the core of the row
calculus there's exactly one opcode this output and this input matched together so reduce them and ship the data from the output into the awaiting continuation of the thing that's blocked on the input there's one opcode now it turns out it turns out that in order to after you figured out that you can model arithmetic this way and you can model string manipulation this way do you want to do that well maybe not it depends up what your goals are but if you want to build a fast scalable blockchain maybe you can go ahead and already use primitives for arithmetic and primitives for string manipulation and so on and so
forth and then you decompose the problem of correctness right so you're the if you have an arithmetic library that you've already proven correct because I don't know some very very smart people at Intel have spent over a decade doing that then you don't have to do that again right and you just focus on the the correctness of how you're assembling the arithmetic computations right so so again the importance of what were calling compositionality earlier and how it related to concurrency is not just that it allows you to scale in terms of throughput but it also allows you to scale in terms of how you approach proving or securing your
computation I so this compositionality corresponds to modularity and the modularity is what we have to have in order to make the correctness problem be tractable at all so so so so again what I'm trying to say is that these pieces fit together and not just this way but also this way there's there's many layers to this that that are all stacked in a very particular way so that many problems which in the past had been intractable suddenly become tractable so consider this example there's one of these football tournaments that are ongoing
right and these football tournaments has this sort of structure that there are 16 teams right Manchester United and Arsenal whatever and there's games of two so Manchester United vs. arsenal and there's another game of to another game of two eight will be selected to go to the next round and they'll be games there then four then 2 and finally one one will emerge the winner this there's a tournament like this right and essentially I want to bet with Sebastian like before of us want to bet on the outcome of matches with each other and we want to represent these bets as smart contracts and we are going to ultimately make these smart
contracts interact with each other and then we are going to figure out how our chain would handle these interactions right so let's let's think of the simplest thing the simplest thing is me betting with Sebastian right so me betting with Sebastian on the first game which is Manchester United vs. Arsenal right so he wants to bet on menu I want to bet on us Arsenal and let's say you're betting on the RR token the Archean token betting against me on football is not only simple it's a sure well one of the things I was wondering is like in your setup you're forcing everyone to to bet like like could it be that both Nash and you bet on Arsenal
yes it could be okay I would never bet on Arsenal like let's first understand what a simple smart contract is like so so the human interaction I want with Sebastian is he has five are tokens I have five are tokens I put these five are tokens in some process / smart contract he puts the same some data comes Oh five days later met man you won and like the ten go to either Sebastian or to me depending on who bit correctly a simpler example of this like the the sports books are actually fairly the
intuition is a little bit less crisp maybe then if you're playing poker in a casino right because when you start out the first thing that you do when you go to a casino to play poker is that you you get on a list and then you have to wait for a seat to free up so then the casino comes to you and tells you there's a free seat they sit you down and then what you do is you exchange money with the dealer that's at that table you don't exchange money with the you know with the with the pit-boss you do it with the dealer who's right there at the local table he takes your money he turns it into chips and then all of your transactions are with the guy that's right in front of you that the pit-boss occasionally will come by to check what's going on but only just
to verify that everything is all right in general he's not interested in what bet you're making on which hand right and so if I'm implementing a poker application as a smart contract all of what I want to do is I want to model the communications between you and the dealer the deck of cards and the other players at the table I don't need to model the casino as a process that interacts it to you other than when you walk in and you're ready to leave right and so we write the programs so that that they actually fit the physical model that you're looking at yeah totally absolutely you're a sports book it's a little bit more complicated because you can you know you have the sports the bookie is basically running a
clearinghouse and clearinghouses are slightly more complicated than poker games because you can take partial bets and somebody can lay down a bet and then the house will actually clear it instead of another counterparty coming along and that sort of thing all of that can also be modeled very easily with the road calculus but it just takes probably more work than it's worth it in a podcast yeah yeah I think what I was gonna do is just to go at just this idea of of sending an asset or a resource to a contract which is held and then and then testing for a particular condition and and once a particular condition is met then releasing the combination of those resources out to one of the one of the
parties right so so in that particular case you you you're going to have a channel that represents the Reese the resources that you've received or the assets you've received from one of the parties a channel that you receive the other you're going it looks like at least for the purposes of this discussion we can assume that there's a way to combine those assets right so you can add them together like right now you can't add an ether to a Bitcoin you could can you could convert one to the other and add those or you convert them to some other thing and add that but you can't currently add an ether to a Bitcoin straight up so so we have some assumption in you know in your
description that you we can add these assets somehow and so so so then you will also have a channel where you can probe the condition of your test okay so so you so the smart contract is is waiting for both of the assets and you can do that in parallel so we have this notion of a join so it's waiting on the channel where we're gonna receive asset from from player one and on a channel where we receive assets from player two once we've received those then we can in a variety of ways we can either wait for a signal from the test condition or the yucky we could pull on the channel for
the test condition and either of those are implementable in the Roewe calculus but let's say just you know for for the sake of simplicity and cleanliness we wait now for a signal from the from the test condition channel and once we have the test condition channel we match that against the outcome either it was outcome player 1 1 or outcome player 2 1 and in either case what we do is we send to a return channel what let's say again for simplicity that the return channel is is exactly the same as the channel of the of the winning player so we send out to that channel the sum
of the two assets very straightforward contract it's it's straight line in the sense of its structure but it's already got parallelism in it why because there's there's weighting the the weighting part is happening we don't care the order in which receive the two assets does that make sense it makes sense so basically like this is a process with two channels one one between my account and this process and one between Sebastian's account in this process and it's a matter of sending these assets over the channel process weights gets the results and sends the sends the assets back on one of the channels let's know now what happens if I want to do this now I want a contract
in which we have this channel so this represents our our bet right and then I want to say that only if I win this bet then automatically make a bet with Greg on the outcome of the next match that this winning team is going to play so I'm going to say I'm betting on Manchester United and I sent the money only if I win this money then automatically make a bet with Greg that in the next game versus Barcelona menu is also going to win yeah it's a modification of the the one we just did is straightforward right so you'll have to have one more channel which is the channel for the next bet
you want to subdivide this into your your contract and the betting contract right yeah okay so so in that case you're going to modify your con the contract that represents you so the contract that represents you initially was very simple send these assets to that to that channel right but now you're going to run that send these assets to that channel in parallel that with something that's waiting on the outcome right so in the and when you wait on the outcome then you you you wait on on your the channel that you sent on now you wait right now in this case to avoid confusion it's now much better to separate those two so that the
channel that you send out on it's not the one you've waited on because you could potentially get this point of confusion where you receive the thing that you said so it's a lot easier to to to separate those out there's a send channel to the betting contract and a receive channel from the betting contract so on the channel that comes back from the betting contract you test test the result is it zero I lost the bet I didn't get any assets or is it greater than zero I won the bet I got some assets right and then the next thing I do is I make a bet with with with the the next player right which means I now send two to an instance of that other contract that
that has the two players bound to you and Greg so if these two essentially Bears are running on different blob chains again they don't have to be right I want to make this clear and in fact this is a point I wouldn't touch on earlier they don't have to run on different block chains the different block chains is is orthogonal to to what we're talking about so so like what the question I was really expecting that that is related to who ties this up with consensus is so let's say we have different instances of these parallel processes running on different nodes right and and you know and and the first time you get
a race condition right where you've got two outputs in one input the two outputs racing towards a blocked process waiting on a channel right but you're running that very same computation on nodes scattered all over the Internet how does that thing ever come to agreement right like if if the winner of this race is different than the than the winner of the same race on a different node then you can get double spend right that's that's the interesting question and and and it turns out that we have an interesting answer the the consensus algorithm is guaranteeing that all the
nodes agree on the winners of the races and that's all it ever worries about it doesn't worry about anything else so our notion of transaction is very very crisp so what what you're essentially saying is they can be lots of people that are that are betting and in order to resolve all of this thing you need just this sliver of information which is like who won which match and this sliver of information is what we have to arrive at consensus and once once this consensus on this information everything else can resolve yes the short answer to
that is yes and what our chain allows is is is for us some intelligent way to figure out what that minimal sliver of information is and just get to consensus on that sliver of information and leave everything else behind to be processed offline by the nodes yes that's that's again there's this nuances there but essentially yes essentially that's correct and now notice that if you have a betting pool over here on I don't know the World Cup and you have a betting pool over here on American football
right the American football bets don't have to page in all the blockchain state that's associated with the World Cup unless there's someone who has conditional bets that you know like I'm betting on the winner of this American football game depending upon the result of this World Cup game but if I don't have any bets that cross these two betting pools then the state can be isolated because the state is isolated this group of contracts doesn't have to download the blockchain state for this and vice-versa so we're still in one chain but these computations can be run
without any of the overhead of knowing about this state over here or that state over there does that make sense I mean that that makes sense for scaling I did that example you gave earlier about the two transactions happening in two different places not having to know each other is prop it's probably like the best visual representation of scaling that I've ever heard so thank you for clearing that up I'd like to come back to like a more practical question as a one of the great things about about aetherium is is how easy that community has made it to write small contracts and there's a there's a
there's a there's a massive community and people building applications on on aetherium and we were we were Def Con a few months ago and we saw one of the things I saw which was interesting was so the the stack starting to come together and development tools and things like that right be kept making making it easier to do for just about anyone with like a limited amount of programming knowledge to write a smart contract application and that has sort of been one of the strengths of etherium is you know and one of the selling points in the beginning is like write a smart contract as easily as you would some kind of JavaScript code I I presume that there's a very different standpoint
like with our approach with with our chain and rolling because these languages are perhaps not as easy to to learn and to manipulate can you from a practical perspective as like a developer or someone who's building applications on this how different is it to write a DAP say something like the Dow on our chain than it would be on aetherium a theory makes it easy to write incorrect programs right but it makes it very hard to write correct ones and and that's actually what we saw we've seen it now several times sorry
the Dow with the parity wallet there you know undoubtedly dozens or hundreds of contractors that are deployed to aetherium that have significant bugs that just haven't been exploited yet but but it's deceptive right the simplicity of solidity is is deceptive in much the same way that the simplicity of javascript is deceptive you yeah you can stand something up and it will sort of work but it's gonna have a lot of bugs because you don't really understand what you're doing the model of computation is too confusing and the thing about rolling is that the entire language fits on an index card right so you could show somebody the entirety of rolling in about 15 minutes and it's you know syntactically it's far simpler than
solidity or JavaScript or really any practical modern language but it has all the power of those languages you know at its fingertips and so it's really easy and because it's compositional it's really easy to begin with something that you can understand completely and thoroughly and then build on top of that by making the building components that interact in ways that you have solid intuitions about right this is very difficult if not impossible in you know in modern programming languages that don't have the benefit of the Rho calculus and so we think that we're gonna be able to teach people you know the basics of programming in the Rho calculus you know in about an hour and get them to the point where they can you
know if they're experienced programmers there will definitely be some some new stuff and some habits to overcome but you know our past experience has been that even high school students can learn this stuff in an afternoon and can become if you get to the point where they can write programs that are you know on the complexity of sort of your standard ERC token contract that's something that you could learn to do in a day and we feel really strongly that the inherent simplicity of rolling is going to make it really really straightforward for people to to learn even though the model of computation is very different that's very encouraging for me what you just said there I mean I used to write you know PHP or JavaScript
or whatever but I don't have any like formal training but that's that's one of the things I thought that was I always thought which was interesting with etherium is that anybody can you know go on some kind of like Coursera or online training course and you know spend some time and learn how to code a smart contract if you have some ambition and maybe a little bit of programming experience just sort of wanted to address their what what the gap is between a theory amande and something like rolling but from what I from what I understand is it's it's it's the the the language is much simpler but there are assumptions about how you write the code
that are much different than on a language like solidity if you've written code in PHP or JavaScript you've debugged problems that occurred because the model of computations actually implemented and what you think it is implemented if ur n't right that's the feeling that you get when you're staring at a chunk of code and it looks like it does what you want and somehow when you run it the program doesn't do it all what you wanted and you can't understand why it's doing what it did right that's that's what you're feeling right then is is the gap between the syntax and the semantics of the language I know I feeling yeah so the thing about rolling is so amazing is that the
semantics came first and Greg did a great job of boiling the semantics down to the smallest possible you know set of rules and then the syntax is built directly on top of those there's a one for one correspondence so that your intuition about what the program syntax says and what it actually does is very very clear it's very hard to get confused about what your program is actually doing and actually I will first of all that was really really well articulated - thank you - it was amazing and just just to amplify Nash's point even if we're talking you know like a strongly typed language that has been dashed on by industry and lots and
lots of commercial Co deployed on it like Java the reality is that Java is a part of a family of languages where when you're staring at the code not everything is in the code not everything that results in the execution of that program is in the code it's not in front of you you also have to keep in your in your mind you know the stack and the threads that are active and a whole bunch of other stuff that's not on the page which means the programmers mind is is burdened there's this cognitive load that's not supported anywhere on the page and there are there are families of languages the lend the are models of computation the
lambda calculus was the first one of such and then the the PI calculus in and languages like that where or the second such where the the the structure function relationship between what you see and how it executes everything is on the page and so so that's another thing that actually makes it easier for programmers when you're looking at row line code you don't have to keep something else modeled in your head you can offload that down to the page just look at the page and reason about what's in front of you so it's actually easier rather than harder I think maybe we could have spent another hour you know
press we can have you I think we probably have you again on at some point but before we before we wrap up here we just talked at the beginning of the show about how this project was a cooperative what kind of what kind of help are you looking for are you looking yo you like hiring people are you looking for contributors like how can people contribute this project there are a huge number of ways in which people can can contribute everything from helping with development to standing up nodes to helping us with the business development to writing applications on top of the platform
to helping us with governance to helping us with analysis of various economic models it's just the the the surface area of the work to be done is enormous and and and I want to say that that you know it's smooth for me what ties this all together is that we're in this all-hands-on-deck phase anyway um the reason I'm doing this is because the exists blockchain represents this fundamental shift in coordination technology for people right today people have had you know sort of - and now
maybe an emerging third class and coordination technologies there's financial instruments financial instruments allow human beings to order organize themselves in coordinate amongst each other government or governance allows people to coordinate amongst themselves right to take care of each other in the planet social media has emerged as a new class of a coordination technology and the blockchain is is one of the the newest forms but we need this new coordination technology because we are in an all-hands-on-deck situation when you have someone like Neil deGrasse Tyson
standing up on CNN saying we don't have the technology to move all our coastal cities inland by 20 miles in the next 20 years we need to recognize that the situation is dire we have we have some of the biggest names scientists on the planet like like moving from their well established careers in to working on climate change because the problem is so dire but we need a coordination technology that's going to help us move faster so the truth the context in which rolling is and an arching is happening is that we're in an all-hands-on-deck situation so I really want people to
come figure out what their strengths are and plug in and whatever way because we have to on that note and that's a that's a really good really good point a really good note to end on I think but on that note you there there is a governance forum that is happening soon can you tell us more about that yes yes so the arching the first arching governance forum is happening in Seattle February 15th through the 18th and it's open to any member of the cooperative and it takes you all of five minutes and 20 bucks to become a member of the coop just like REI so please consider coming and adding your voice into how the
co-operative is organized and run and also be exposed to some other technologies for coordination that aren't just blockchain great and I I did want want to mention we didn't talk about this during the show but if people want to if people want to really get a good solid understanding more I guess more on the technical side but your talk at Def Con I was watching it i watch it twice earlier today and i thought it was really really great i didn't see it at def con but and the reason why is because you you you take this concept but if i could correct by construction computation and you you sort of map it out in a visual way that makes it very I
mean a lot easier to understand at least for me as I tend to understand things more visually so I would encourage anyone to look at that have a look at that talk I will put the link in the show description thank you thank you so thank you guys for for coming on the show it was very interesting to learn more about about our chain and great to have you back on Greg so we release episodes of epicenter every Tuesday you can find us on iTunes SoundCloud or your favorite podcast app on iOS or Android you can also watch video versions of the show on YouTube follow us on Twitter and we're doing something new right now we
are experimenting with a platform called get er which some of you may know and use so we're gonna have a git er channel there's not a whole lot of people in there right now it's just he's just like me and and it may her and Brian but we do want to so try to build a community there you know get people talking and there's a channel there for feedback so if you have a feedback about the show you can you can let us know there and you can reach out to us there and so the you can search for epicenter on git er or the simple way to get there is epicenter TV slash together that's G i GC er if you want to support the show there's lots of ways you can do that one of those ways is by leaving us I Tunes
review we really appreciate those and helps people fly in the show or you can leave us a tip and the tipping addresses will be in the show description thanks so much and we look forward [Music] [Music]