Who executes a Smart Contract?
There is much confusion over the nature of Smart contracts, their computational overhead, and just 'who' bears this overhead and cost. This question was asked ...
What's up party people? Chris DeRose here, Community Director of the Counterparty Foundation. And today's question was asked to me, I guess it was asked by Jerry. Jerry, you know which one you are. How you doing, Jerry? And it was further asked to me by Shawn of the Counterparty Project, he suggested I clarify this one. It is a good question so let's talk about it. The question is this, who executes a smart contract or conversely where are smart contracts executed? So I think this question probably came to be a little more relevant right now, mostly in light of the ripple smart contract platform getting canned.
I guess it's something I've kind of understood on some level, but I think a lot in the community are still trying to wrap there heads about what a smart contract is. So let's talk about this a bit. Smart contracts are typically very small pieces of code. In terms of the overhead of executing a smart contract, it's teeny, teeny, tiny. Your eight bit NES could probably execute most of these smart contracts in ten seconds or less, would be my guess. The nature of the computation isn't actually very complex.
Certainly not for any of the ones we're seeing thus far and certainly not in the serpent language. So the smart contract itself should be thought of,not as like a algorithmically challenging problem so much as an immutability challenging problem. They're because, A, typically to finance platforms that are needing to be escrowed by way of a counter party agent are very concise and very small. You wanna do that over again? Just fucking jerky fake concise. You can actually pronounce it both ways ass hat. No, you can't.
Mike: Yes, you can. No, you can't. Concise? Chris, really? Concise? Okay. Concise. Concise. Yeah.
Concise. Yeah, That's it, that's the only one. Concise. Concise. Let's hear it again. Concise.
Enough? Concise. Yeah. Concise. The logic is very concise and it's not typically a very hard thing for these platforms to rectify once expressed. But they need to be evaluated certainly in a realm whereby all actors are not trusting each other and, none the less, have to come to the same conclusion. So it's a very hard thing to actually get to run on a network, although the computation itself isn't very complicated.
So when you ask who's executing the contract, I think the first thing you have to put aside is whether or not the actual contract itself is a big burden to execute, which typically it's not. Some of the [inaudible 00:02:50] stuff is a bit of an exception. But from there, the next question is, who executes it? Well the easy answer is either, take your pick, no one or the entire network. So the answer of nobody is easily satisfied when you think that, well the contract is executed in the way it is evaluated, but not in the way it is entered on the network. You enter your contract into the network, you persist it on the chain, as long as it makes sense in terms of it's inputs and some other varying metrics on how it's compiled, then that will now be on the blog chain, at which point it is executed by anybody who is running a federated server in the Counterparty system who wishes to work with that data there after. It isn't necessarily executed in verbatim by the minors.
It isn't necessarily executed by participants who have wallets, but it is executed by anybody who wants to seek the nature of truth on the blog chain. They want to know what are the balances at this time and so if they're compiling a list of all balances on the network then they will see that contract. They will execute it. They will all determine the same truth and they will debit and credit account balances appropriately and set, perhaps, execution timers and things like that for when things need to be revisited. So the network itself at some level, depending on what defined it all executes the contract, if they're watching it or if there were no federation servers, nobody would be executing it until the time at which they needed to evaluate it at which point there would only be one way that contract could run and evaluate and then they would know what the balances are if they wanted to participate in the network. They would then have to acknowledge those balances and work with the outputs and such from there.
So I think that's a good overview of how smart contracts work. That's pretty much every where. In the Bitcoin network, the contracts are significantly more rudimentary still. They're not touring complete, for example. And in that case, the contracts are also similarly persisted though there's some additional checks. Typically the money network will find various ways to invalidate a transaction if there's like inputs missing and things like that.
But in the Counterparty case, you could persisted regardless, though it needs to be evaluated at the time of indexing by a federation server. So I think that answers the question. I don't know. Are there more smart contract questions? I'm thinking about maybe writing up a little more about smart contracts and tackling it more. There's a lot of people that really have some big questions about smart contracts that I think need to be clarified and better tackled, so I don't know. We'll see if I address this question more, but in the mean time, if you have questions, why don't you ask me? You can tweet me on Twitter @derosetech or you can leave your comments below.
And if you like this video, subscribe to the channel. I'd love to have you around. Peace out, party people. Concise. We have to look that up, I'm so sure that it's wrong. Oh, that's very funny.
Yeah. I've heard it both ways. Where? Just saying, I've heard it both ways. I've lived at least twice as long as you. Hey. You thought it was seemy, you thought it was seamy.
So you know what, maybe things are different in Massachusetts, down in South Florida, we say seedy and concise. South Florida's a weird place. Yes, it is. That's what I wish to convey on this channel.