RChain Blog

RCAST 119 [Climate and Coordination] Dolphin Disease, Climate Disaster cost, RChain’s Concurrency

Subscribe to the RCast podcast: iTunes | Stitcher | Spotify

0:00:00 Intro

0:01:12 – Mysterious Dolphin Deaths Linked To Climate Change In New Study – https://www.forbes.com/sites/saratabi…

0:06:54 – The climate crisis led to record insurance payouts in 2020 https://fortune.com/2021/01/02/2020-c…

0:09:31 – 2020 Smashed the record for billion dollar weather and climate disasters – https://www.msn.com/en-us/weather/top…

0:14:09 – The Green New Deal shouldn’t be looked at as something that costs money, it actually quite the opposite – it is part of the market forces that are forging towards the next economy – The 10 Ways Renewable Energy’s Boom Year Will Shape 2021 https://www.bloomberg.com/news/articl…

0:20:18 – RChain’s concurrency – thoughts and questions from Raphael, founder of Dappy https://dappy.tech/

0:21:54 – Question about Ethereum 1.0 – What are the causes for the transaction throughput of only 20 transactions per second?

0:23:13 – Is the transition from proof of work to proof of stake gong to resolve this issue? Greg’s answer: With the transition from Proof of Work to Proof of Stake, 3 things become possible: 1 – you can now potentially get a compaction in state because you have an opportunity for finality, in that the state doesn’t have to grow forever. RChain has released Last Finalized State and is currently demonstrating that possibility live.

0:26:04 – the weakest link will dictate that you will have server farms. Scale up depends on concurrency. Scale out – it is not the case that increasing shards means you have to get slower.

0:27:19 – concurrency allows you to scale up, Proof of Stake and concurrency together allow you to scale out.

0:27:44 – Question – scaling up needs concurrency, With Ethereum is the execution single threaded – is it true to say that? Answer: Each smart contract in a given shard must run to completion. The lifetime of that contract blocks all other contracts.

0:28:22 – Question. Is it possible with Ethereum to build a Solidity code parser that can determine whether or not two transactions are safe to execute in parallel, because this would resolve the issue of having a cue for transactions.? Answer: Yes – this is exactly what the behavioural types offer. An analysis that you can apply to all levels of computing that will tell you whether you have a conflict on resources. It’s not a code parser, it’s literally the behavioural typing system.

0:29:13 – Question: Is this possible to implement with Solidity or is it Rholang or Pi calculus specific? Answer: It’s not Solidity it’s the EVM. The EVM would have to change. https://www.bitrates.com/guides/ether… The EVM is going to only have to admit a certain block of code at a time, so it would have to become multi-threaded.

0:29:38 – Greg: It’s not about objects. It’s really about whether or not you can have multiple execution threads – I am talking about a thread as a smart contract. But the reason why rho calculus or pi calculus becomes super important is that, as it turns out, trying to do a multithreaded virtual machine by the seat of your pants is very difficult. Getting that correct takes decades. It’s not like “Oh yeah, we’ll just add multithreaded stuff to the EVM and that’s only gonna take a little while.” No. It turns out to be a very difficult technical problem and it usually takes at least a decade to hammer it out and get it right.

0:31:00 – With the pi calculus or the rho calculus, you don’t have to do that thought – it’s done for you. The calculus tells you exactly the concurrent semantics…. and it’s mathematically correct.

0:31:23 – Once you have a virtual machine, there are other resources that may be shared. The heap, the stack, any I/O channels, all of those are resources that are across the entire virtual machine, and so it’s not ok to just analyze whether or not the transactions are going to step on each other, you have to check whether the threads, the behaviours are going to step on each other’s toes. That’s where things start to get tricky. That’s outside of the smart contract’s basic behaviour, it has to do with how the smart contracts are realized onto the virtual machine.

0:33:18 – Whatever environmental resources are associated with the virtual machine also have to be accounted for when you do your threading semantics, and the Rholang design handles all of that and says: every resource is behind a channel. If it’s a file, it’s behind a channel, if it’s an object, it’s behind a channel, if it’s a mailbox, it’s behind a channel. Everything is behind a channel. And so you can check for all conflicts just by checking for conflicts on channels.

0:34:02

I think that’s it for the questions I prepared for today. So thanks very much.

Greg Meredith  34:10

No, thank you this. These are great questions. I really appreciate it. Darryl, did that make sense to you? Or Nora? I’m kind of curious as to whether whether or not these kinds of things make sense.

Darryl Neudorf  34:19

Okay. Yeah, yeah, I’m trying to kind of understand the context of what a channel is. But

Nora Germain  34:25

I was actually just gonna ask the same thing. Yeah. Okay.

Darryl Neudorf  34:27

Yeah. Because like, I understand the idea of the overall idea of that one thing that’s unique about RChain is that we have namespaces. We have kind of like addresses that apply to all the interactions, and that’s something that other blockchain projects don’t have. They have a public key and a private key, but there’s no kind of address similar to how the web does things. Is that right? That’s right. Okay. And so, so it’s that kind of what you’re talking about here. Without any more technical way with how everything has to be behind a channel?

Greg Meredith  35:06

Yes. So So one way to think about it is when the World Wide Web started up, what they said is all those resources out on the internet, we’re going to give you uniform access to all those resources. If it’s a printer, if it’s a cell phone, if it’s a document, if it’s a database, all of them are going to you’re going to get a universal access. And that access is we’re going to give them each an address, which is a URL.

Darryl Neudorf  35:41

Right? resource locator.

Greg Meredith  35:44

Yeah, yeah. Right. So So basically, it’s, it’s just a path from, from roughly where you are to where the resources, it’s a little more abstract than that. But if you think about it that way, that’s okay. Right? So it’s, it’s a path. And, and the, the reason, the reason it’s different is because, you know, like, lots of people can be in different places, but the path is remains the same. So you have to ask yourself, how could that be? And that’s essentially the magic of the World Wide Web is, is, you know, you have a uniform path to this resource. Now, now, the other thing that you do is you have two different operations. Can I read this resource? Or can I write this right to this resource? All right. So in the case of a document, you know, you, let’s assume that it’s like a PDF or some fixed document, which is not not writable, then you can only read. But there are many things like databases, where you can write as well as read. But that’s, that’s basically a uniform access to the resource. And to operations, read from the resource or write to the resource. Now, that’s essentially what the PI calculus and the row calculus give. The PI calculus says, I have no idea what the structure the resource names is, but because because I’ve I’ve given up any understanding of the nature of the structure of the the resources, you have to promise me that you can, I can always ask for a fresh one. So that’s what that’s what the PI calculus does. And the role calculus says, instead of being always able to ask for one that is globally distinct, I’m just going to I’m just going to demand that that the all the resource names are structured in a particular way. And then it turns out that you can always map from that structure to existing structures, like your eyes, or cell phone numbers, or bla bla bla. But that’s so so in other words, the row calculus maps, and the row calculus and the PI calculus map directly onto the structure that was envisaged by the World Wide Web. It’s a one to one correspondence. every resource has a name. And there are two verbs write and read. Okay, does that make sense?

Darryl Neudorf  38:12

Yeah. So So does that mean that that our chains platform? is going to work better with the web? Or are we needing to kind of create a whole new web box?

Greg Meredith  38:29

So what it does, what it does is it allows us to work nicely with the existing web. But it also allows us to give things give operational semantics to things that you can’t do with the web. So the web never contemplated consistency constraints on reads and writes. So you know, if you’ve got two parties writing to a resource, there’s no transactional semantics on the web. So you can’t use the web to implement a blockchain, for example. Right. Right. Right, well, but with the row calculus, there is a transactional semantics. It’s well understood.

Darryl Neudorf  39:07

So is there a way to then by using RChain create transaction transactional semantics for the web?

Greg Meredith  39:17

Yes. And that’s what we that’s exactly what we’re doing. Right. So we take a variant of the blockchain ideas, so we had kind of adjust and adapt the blockchain ideas to be. So instead of chains, we build DAGs. And instead of proof of work, we have a form of proof of stake. And that makes that thing that’s interesting about the blockchain scalable, scalable enough to where you can provide a new kind of web. So now we you know, it becomes a global computer, right? You could think of the World Wide Web really was a global index. So there’s all this data, and the World Wide Web allowed you to index And read it. So I can I can hand you a URL and you can go look at a resource. Right. But in terms of the update, that was kind of left that and especially transactional update, that was kind of left as a, we’ll do this later. Yeah.

Darryl Neudorf  40:15

I remember Tim berners Lee, like even talking about that kind of stuff a long time ago, like the original term hypertext came from Ted Nelson back in 1969. And Tim berners Lee kind of CO opted the term, but didn’t actually apply the intention of what Ted Nelson had in mind.

Greg Meredith  40:33

Yeah, because because because, you know, Tim was really solving a smaller problem that the researchers at CERN wanted to be able to share papers more easily. Right. So that means that the papers already written, yeah. They’re not, they’re not writing the paper together. Now, people have been able to do things like Google Docs, where people are writing papers together. But that means stepping outside of the web semantics. Yeah, right. Right. And it also in the way Google Docs works, it means that all of the interesting transactional bit is behind Google’s firewall. Mm hmm. Right, Google is controlling all the transactional portions. Yeah, I hate that. Okay, so So what with our chain, we give you the transactional bits behind no firewall?

Darryl Neudorf  41:19

Yeah, I get that. I understand that. That’s okay.

Greg Meredith  41:23

So it becomes literally a global computer. Right, not a global index.

Darryl Neudorf  41:28

So what I’m kind of trying to wrap my head around is that I guess, I guess part of what part of what RChain is can do now or is working on doing is is being able to kind of bring a cheap? How do I say this, like a kind of a simplified version of rholang, that could be kind of parsed over via JavaScript or something. So that so that some of what rholang can do can somehow be kind of used on the web?

Greg Meredith  42:03

Oh, I mean, it can already be used on the web. It’s just whether you use it directly in the browser, or you use it on the back end. I mean, if you think about it, right, there are tons and tons and tons of programs that are organized with some Java on the front JavaScript on the front end and Java on the back end. Okay, and JavaScript on the front end and some Haskell on the back end, or, you know, whatever. Okay. Okay. Right. So so that that problem is well understood, right? But but but the issue is that JavaScript itself is incredibly costly, for a number of different reasons. And this is why Google, Facebook and Microsoft have all done their own versions of JavaScript. Right. So if it weren’t incredibly costly, they would have just been using JavaScript. Instead, they sunk, you know, combined total of hundreds of millions of dollars into building an infrastructure that wasn’t so costly. Right, so So now, it turns out that it’s actually terrifically surprising that there hasn’t been better language engineering for the browser. It is astonishing. That there hasn’t been, and again, it’s sort of like there was this big, you know, in the same way that with hardware, there was this big consolidation to the Intel architecture, even though everybody knew that that was a losing battle?

Darryl Neudorf  43:22

Yeah, right. The old VHS beta thing, it’s just like, Why? Why is that sort of? adopted?

Greg Meredith  43:31

Yeah, but there wasn’t enough volatility in the video, entertainment market. To me, what we’re seeing is that there, it is still worth it to stay in the game, even for 30 or 40 years before you see, you know, a market shift. Because the the gains are so enormous if you stay in the game long enough. So so the same is true with the browser, right? There wasn’t this kind of consolidation phase towards JavaScript or JavaScript like things, but there’s going to be an expansion phase where people go, you know, what, I don’t want to be beholden to JavaScript, it sucks. And it sucks for these reasons. Right. And one of the things that is a very natural thing to do would be to put rolling in the browser. And the reason it’s natural is because there’s tons of concurrency in UI. Right, you can be popping up ads, while people are filling in forms, you know, and if you have a group edits, right, other people can be making edits, and you want to display display the edits that they’re making, while while someone is making other edits. This is just tons and tons of concurrency in a UI. Right? Very much in the same way that there’s concurrency when you’re driving a car, right? There’s all kinds of events that impact you know, your operation of a car if you’re driving a stick shift, you know, your your, you know, your eyes are on the road, obviously, but you’re also listening to the engine glancing at the tachometer, potentially, also listening to the radio and talking to a friend right. So all of those things are all going On while you’re driving the car, right? And you don’t you don’t process those sequentially? Well, first, I’m going to take 15 seconds to look at the road, and then I’m going to take 15 seconds. That’s not how it works. Right? So the same, the same is true with with UI design in a massively distributed and concurrent setting. There are all kinds of events that that need to be managed and, and interface with the users attention. So rolling is a very, very natural thing to put in the browser.

Darryl Neudorf  45:30

So so what I’m trying to figure out is like, what’s halfway for RChains integration with the web, do we is is, you know, if and when our chain starts to get more mass adoption, and we start to kind of get the kinds of transaction, you know, numbers that that you that you envision is the pathway to, to have to go to greater web adoption through browsers that have rholang in the code like slick submit or something like brave or someone like, like Firefox could start to implement rolling as their as part of their browser. And, and

Greg Meredith  46:10

but that’s, that’s not that. I mean, you have to, first of all, there isn’t a pathway. There are many pathways. So one example is the work that Raphael is doing with Dappy.

Darryl Neudorf  46:18

Yeah, I wanted to because this is kind of what I wanted to ask is that I know that you know, Dappy is working on a browser. Raphael is working on a browser Dappy and I still don’t fully understand exactly, Raphael what it is, as far as its is a web browser or, or is it a, RChain browser? I don’t actually understand it.

46:41

So yes, it’s very simple. Just think of it, are they a fork of chromium? So it’s kind of like Google Chrome. So it’s a web browser. And it works with exactly the same technologies as regular, which means HTML, CSS, and JavaScript. Okay. Um, there is just this network layer that is changed, meaning that it does not dealing with the Domain Name System. Everyone is familiar with, for example, google.com amazon.com, and all that stuff. But it deals with a blockchain platform. And in our case, auction platform for the name and IP addresses relations.

Darryl Neudorf  47:26

Okay, so it’s directly using the whole namespace aspect of our chain, like literally utilizing it right now.

47:32

Yes, exactly. And there is a, it’s very close to origin, because when you deploy something to origin, you get a register ULI, and you can’t, you can directly input it in the browser. And it will display the file that is attached to this register UI, which is kind of a rolling address. So it’s very tied to the blockchain.

Darryl Neudorf  48:00

Okay, pardon my ignorance, but I know a URL is a unified registered locator, what’s a URL? Um,

Greg Meredith  48:07

it’s an abstract URL, just for all intents and purposes, think of it as a URL. Okay? Yes. Your URL requires that you actually have the resource live, where the or II does not.

Nora Germain  48:21

People also use URI’s to look up songs in like Spotify and other places like links to the song within the app.

Darryl Neudorf  48:32

What is the I stand for?

Greg Meredith  48:35

indicator, I can’t remember indicating. Yeah.

48:40

You know, just the resource indicator. Okay. So this is the main thing about the P, but the so this is the concept. But the main improvement we have is the depth the concept of, of trust network, and a trust network that is not a blockchain network. And there is a video on YouTube, about the depth network and how it relates and how it is something that is needed, even if we give it another name. But as a browser. Today, when you reach any domain name, you have to query for example, VeriSign Corporation. So depending on the first level, domain name, if it’s dot com, or dot tech, you will query a different organization. But the main point is that you’ll have to query this organization. And so even if you if you trust VeriSign, they have hundreds of employees and all of those are human targets and can be configured to do some tasks can be hacked, and it happens every year. So this is the main issue with DNS and it costs hundreds of millions of dollars to companies and people Because it’s weak. And I’m not even talking about the DNS lookup requests that are mainly not not encrypted when they go across the internet network, but just this trust that you put in VeriSign is very dangerous because it’s, it’s built. It’s made of humans simply and humans fail, and it’s normal for humans to fail. So, the approach we have with that is not ever trusting a single endpoint, a single organization, a single company, right, always trusting many at the same time, which means that for example, instead of querying just VeriSign, you will query 10 companies and see the answers you receive from having asked the same question to those 10 companies. And you are instantly able to flag something that is irregular, because you you you have root principles, that is to assume that majority of the network is harnessed. So, if you have one a and nine B’s, you will immediately drop the a response and only consider the B responses. And if you want your teammates accuracy levels, you will display an error message and not tolerate even this 10%. Good it. So in depends on the service you are accessing. If you want to send $10,000 to someone, you want to have 100% accuracy, and you will require the 10 responses. The 10 Yes, the 10 responses you received from the deputy network to be the same as those that network members are just nodes of the of the blockchain. But since you’re outside the blockchain, so you are a web browser. This is why there is this new concept of the network instead of just a blockchain platform.

Darryl Neudorf  52:09

Wow. It’s like 10 factor authentication.

52:13

Yep. For example, if if, if a given network number, if a given blockchain node has one chance out of 100 to fail or to be hacked, then by asking a 10 of them and under requiring the 10 answers to be the same, the probability that you will, as a browser as a client, you will be hacked is is infinitely small in comparison to a web request when you trust a single cooperation.

Darryl Neudorf  52:52

Wow, amazing. Unfortunately, we’re three minutes over time into our staff meeting call. Thanks so much for joining us, Raphael.

Greg Meredith  53:01

Yeah, thank

Nora Germain  53:01

you so much. And I think this was a great discussion. So hopefully, we can pick this up and continue next week. Thank you, everybody, for listening. Make sure you subscribe to our chain on YouTube and follow us on social media, you can become a member of Archie Archie Co Op. And if you have an idea for a guest for a call, you can email us at climate change Co Op. Thank you, everyone. Thanks, everybody. Thanks