status.im | Jarrad Hope I Taipei Ethereum Meetup #9 - DevCon2 Hightlight and Status
Taipei Ethereum Meetup·Mon, Oct 9, 2017, 12:00 AM
Speaker
Taipei Ethereum Meetup #9 - DevCon2 Hightlight and Status 活動連結: http://www.meetup.com/Taipei-Ethereum-Meetup/events/234112437/
Transcript
warm welcome and thank you for coming out by the way. It's uh it's great to see such a huge turnout and uh I'm really enjoying Taipei is such a fantastic city. Um my name is Jared of course. Um I'm here to talk about how I believe we can integrate Athereum into our daily lives. Um and I believe we can do that using my project status anthereum light client targeting Android and iOS.
Um, but before I do, I want to talk about my personal motivations and uh why I'm so interested in Athereum. Uh, you see, you don't have to look too far back in recent history to find cases of economic collapse, institutional failures, and large populations of people who have no access to dependable legal technologies. And of course, those are really complex problems, but I believe they stem from our inability to adapt socially fast enough. But what if we could create digital spaces uh where we can experiment with new ideas uh new policies, new economic models and new ways of socially organizing uh social systems as operational closures and when we have unprecedented access to the entire economic history down to the very transaction level, the blockchain. Then what if we could analyze that data and discover something new and we can deploy that new thing globally in 30 seconds or less for anyone to use voluntarily whether it's a new policy like a new law or yeah anything like that.
Um to me that's the kind of world that I really want to live in and uh it's really exciting to me. Uh, but for any of that to actually happen, we need to get Athereum into the hands of people. Uh, put up your hand if you have a smartphone with you right now. Yeah. And keep it up if you don't have a laptop with you right now.
Oh, you're so lazy. All right. So, smartphones are the new PC, right? Uh, in 2014, smartphones have overtaken desktops. And uh now as of last year more time is actually spent on smartphones.
Uh armed with this knowledge and with the help of the Athereum foundation and the dev grant program we decided to bring Athereum to Android and iOS. Um and we had our goal at the time was to recreate Mist on mobile devices. Um but as we were developing I realized that uh I wasn't really browsing the web that often on my phone. In fact, I found it kind of tedious. Uh, and really I was only doing it at home when I was on the couch or if I was at a restaurant and I was just talking about something.
Um, and that got me wondering how are we using our phones today? It turns out that uh I mean that's WeChat at the top. It turns out we are social creatures. Um they like so instant messengers and social networks have three times the amount of monthly active users than the top browsers. And not only that, a third of all time that we spend on a smartphone is actually inside an instant messenger.
So of course that got me thinking and I was wondering what would Ethereum actually look like as an instant messenger? Uh now I'm sure you're all familiar with WeChat. Um it's not so popular in the west. This is 91. Exactly.
Right. Right. Um so so I mean that was like a lot of the inspiration for uh to see what mobile internet is actually going to look like in the future. Um and it it gives a really good idea of how you can express Ethereum visually and keep its sort of generality and its flexibility. And it also kind of hints at what a DAP ecosystem would look like in the context of chat.
Uh but before I show status um I'll just go under the hood very briefly. Uh we actually run a full implementation of go ethereum on the device. That means you have access to swarm that's the decentralized file storage ethereum the blockchain we all know and love and whisper which is another subprotocol of Ethereum which is for communications. Um now on top of that we build out our messenger of course um and we do HD key management and uh we also do our own transaction management. Um, for DAPs, basically we have HTML and JavaScript apps that would work in MetaMask or Mist, if you're familiar with those, would work just as well in Status.
And we've also extended that with a chat API uh for more tighter integration with chat. So when you first run Status, uh you meet Console. This is the first autonomous entity that uh that you yeah that you'll meet. Um, console's role is to educate you and teach you how to use the basics of uh, status uh, as well as get you set up with your first Athereum account. Here you can see there's a request message asking us to type in a password.
Uh, so we'll tap on that and here is a request. I'll talk about this in more detail in a moment. Um, but we'll type out our password, hit send, and it's asking us to confirm. So, we'll do that. A message is sent to console.
Now status has taken this password and a bit of entropy to generate a 12 uh word passphrase um for a master key. Uh this master key is then used to generate two child keys uh which is a main account and the sub account root. Now with this main account, we actually do something really interesting. Uh instead of just using it for your address on Ethereum to send transactions to, we actually inject it into Whisper. Uh which is not exactly designed for.
What that means is not only can you transact with an address, but you can also chat with it as well. And this becomes your handle within status. So these are all encrypted, I assume. Yes. Yes.
All messages in whisper are encrypted. Um and this is stored encrypted of course uh just as it is in G. Um any other subsequent accounts created uh uh from the sub account root. Um uh yes of course the the 12word passphrase we also support numerous languages including Mandarin. Um okay so in status DAPs are first class citizens.
That means they look and feel just like your friends and family. Uh at the top we have wallet which is going to be our default DAP. Uh so we'll tap on that and take a look. Uh wallet is really just like an HTML and JavaScript app that you're making for Mist or Metamas today. Uh it's rendered in WebKit.
Um has access to web3.js. Um, it is actually rendered in a special built-in command for status and it uses the suggestions area to render WebKit. Uh, when this is running, the uh the chat input field where you'd normally type your messages turns into something like an address bar. Um, yep.
Oh, and also the chat history that's underneath this turns into more of a per DAP transaction record. uh it can also be used as a support channel if the DAP developer wants to do that. Now chat apps can do everything that a normal HTML and JavaScript app can do but they also have access to a chat API and this allows them to create new commands and also new message types. So here we have example DAP that we're going to work with and again they example DAP has sent us a request message uh just like console did. Um so we'll tap on that.
Oh no sorry I messed that up. All right before before I talk about that uh down the bottom left uh next to type there is a command list icon. Uh and you'll notice it's got a little blue dot on it. Uh this indicates that there's a request message somewhere in the chat history that hasn't been answered yet. Uh so now we'll tap on that that icon and you've seen the surprise.
There we go. Okay. So the requests at the top that are unanswered and then underneath that are all the commands that are available within that chat session. Uh so you can see we have where is and send transaction in this example. Um for DAPs they can instantiate a command by using status.
com. There's a couple of parameters there like name, color, description. Um, but the more noteworthy ones are params and uh three function handlers, preview, handler, and validator. Um, in the parameters we have, you can see in this example, there's actually three, two, from, and amount. Um, and uh, they have some default values, which we we'll talk about in a moment.
Now, with a command, you can either type it out directly in chat by doing exclamation mark and then the command name, or you can tap on the icon like we just did and start typing it out. Um, and it will filter down the search. Or you can just tap within the suggestions area on one of those items in the So, we'll start typing out send. And now we're on the two parameter. And you can see that the default value is context participant zero which is the only other person in the chat which is example that uh so we'll tap on that.
Um the second one is ourselves. So we'll just uh for from so we'll do that. Now every time this is h every time a parameter is being typed out uh the validator function is being called. Now the validator function will tell uh inform status on whether there's been some kind of error uh or return a subset of React Native for custom user interface. And this allows us to do more things than just lists.
It allows you to create things like sliders or you can do webkit or anything that your imagination can um conjure. Um, in this case we've got a little slider and uh, also you'll notice the keyboard changed because the type of this parameter is a number. Um, okay. So now we filled out all our parameters. We'll hit send.
How do you know that how much we're going to ether with USD? Do you do you do you do the exchange right away or uh, okay, so that's all that's all completely programmable up to the third party developer. This is just an example that doesn't have that. Um, our goal is to actually partner with somebody who's going to do a stable coin. Uh, so there is like I mean we won't be if you're going to use US dollars then you use a stable coin of US dollars.
And if you want to switch that to another currency, I mean you can do exchanges. Uh, there's absolutely nothing stopping anybody from doing that conversion by calling another third party API or whatever they like. Um, so now a message goes into a staging area that allows the user to preview what the message looks like and just like what the function handler is called is preview. Um, that is actually called at this point and it will return a subset of React Native which will give you the user interf uh the GUI of what that message was going to look like. Here we've just got 1.
2 and a little f thing next to it. Um, so we're happy with that. Now we're going to press send. But before we do, let's have a look at the handler function. The handler function is send transaction.
And inside of it, you can see there is web3.f. send transaction. That's going to cause a state change on the blockchain. And that's going to require the user's permission.
So when we press uh press send now, the handler will be called. Status intercepts all state changes to the blockchain. Uh so that means this gives uh the user the ability to review any transaction that a DAP is going to do uh and either confirm or deny it. Uh and if they are getting bothered but they do accept that they can actually remember those transactions in the future so they're not bothered. Um basically any transaction gets put into a transaction queue uh and then like uh any that are confirmed move onto the blockchain.
Now that is a kind of preview of what you're going to send to who for what. Yes, exactly. Um, so yeah, now we send a message. We made a state change. Uh, both example DAP has received that and so have we.
Um, now on top of commands, there is also requests and responses. Uh, they are actually very similar to commands uh in many ways. They're basically the same u data structure except for they're registered with stat uh status response. Um so let's tap on that that previous one. See now what's actually happened is uh we're on the first parameter and the validator has been called and it has returned a subset of react native which has been uh a VU or Google maps um widget.
Uh so we'll type out our address, hit send, goes into uh the preview handler has been called and uh we'll just send that off and example that response. Uh request and responses are really interesting because what they'll allow us to daisy chain different commands and responses together allows us to create more complex interaction and richer conversations between us. Now, how commands are used within a group chat is they're added like as a user as you add a user to a group chat, you add dats to a group chat. Uh but of course, not everybody is going to agree on what commands can and cannot be used within a chat. Uh so we need to have permissions on these.
Uh they're really simple to to use. Basically, you go to the DAP uh DAT profile and you just tap on the commands and enable them. Another feature we have in discover is well, Athereum is very uh it's a very global community, but it's also very small. Um so, we need a way that we can find each other, advertise our goods and services, or just chat with other people who are nearby or based on any other interest. Uh so we've created another feature called discover and I'll change my name here and I'll start creating a status.
Anytime I create a status that has a hashtag in it, I publicly broadcast this out. All my friends will then start picking up this information and uh that'll go into the discover screen. I gave this Shanghai the first presentation and changed it. So uh so in the discover screen uh there is a bunch of uh information that you've received from your friends as packages um which is an aggregate of all of their friends data public statuses as well as any of the popular statuses they've received from other people and they're weighted by things like have they actually opened a conversation with that per uh that DAP or that person? Uh has that person been online recently?
Is that status fresh? Uh so it's a very social sort of mechanism for reducing any kind of spam. Um the most popular tags are put into a card system at the top and underneath it there is a recent feed of the most uh newest incoming statuses and you can tap on those and you can um chat with them. Uh we also have a series of chat API extensions. So we'll be doing QR scanning and and generation.
Uh you can use that and it basically looks like this. Uh there's menus in add to contacts uh which I won't show but it's there. Uh and we plan to add like things like NFC later on as well. Uh status is also multi- account ready. Uh so for shared devices among families or villages or just DAP developers who have lots of other DAPs that they're going on or whatever other reason you have multiple accounts.
Um the current state of status is it is feature complete. Um it's very rough around the edges. Uh we have now open sourced it and we're moving into a testing phase. Uh we are we're polishing up the UI right now and we're planning to have an alpha release before the end of the year. Um but of course it is open source so you can build it yourself.
Um yeah, please contribute by the way. Um that's our technology stack. It's all written in closure script. Uh we have rack native underneath and there's a bit of object objective C and Java glue. Um then there's our status go library uh which interface with go athereum.
Um there's a developer guide there which basically walks you walks you through the entire process if you if you'd like to build it at home. Um it is catered towards Macs cuz that's what we all using. And um oh so there's another project that we started working on. Um, it's actually a naive implementation at the moment, but uh, because Status is now open source, we're moving to a communitydriven development model. And what this means is that we're going to allow commit f this GitHub bot to uh, create bounties for GitHub issues.
So the idea is that anyone can create GitHub issues for their project and other people can then fund that development work. the the money is then released from the multisync wallet when the pull request that fixes that issue is merged. Um, but that's probably going to be out towards the end of the year, maybe Q1 of 2017. There's no rush on this one yet. Um, yeah, thank you so much.
Great to be here. Any questions? I have a question. Yeah. You're saying that uh all the message on the blockchain is being encrypted.
Uh so it's not actually on the blockchain. All the messaging is done over whisper which is uh so Ethereum actually has three subprotocols underneath it. Uh and whisper is uh it's kind of an outofband away from the blockchain thing just for sort of uh very quick and shortlived communications. Uh, whisper is something like UDP if you're familiar with it mixed with DHT somehow. Um, and so like in the headers like to from and the topic aren't even required.
So what happens is when you send a message out on whisper it's um if you have a from you encrypt the uh the payload with that public key. Uh but then that message is broadcast out to every pier you're connected to and it just basically hops around. It just goes anywhere. Um and that's one of the uh privacy benefits is dark routing. Um and the only person who can read that uh payload is the one who was intended for.
Um then there's some like uh extra features on top of that such as bloom filters which helps the the routing be a little more probabilistic. Um and that's where topics come into play. Um but yeah, it's too expensive to just inject messages onto the Ethereum blockchain. Uh so you you uh you're using the two two addresses of the key to the encrypt the message correct? Yeah.
Uh so in a good good message uh you so this is this is status's magic source. We basically built a messaging protocol on top of whisper and that handles things like inboxing. Uh it handles things like group chat. Um in group chat we share a key out briefly to uh to the people who are added to that at the beginning. Um and then everything is uh is actually broadcast uh publicly but it's encrypted uh with that particular public uh key pair at the time.
Um yeah so is this cost a lot? I mean is this expensive like in a good session then I need to send more transition than P2P? Uh no no there's no transactions involved. Uh uh if I talk to a group like a five person group then I send five message to everyone. Yeah but they're not they're not sent on uh the messages aren't on the blockchain so they are sent to everybody.
So there's a little um no sorry in whisper you have topics. So a topic is generated for that group. Uh, and then using when when you send a message out to that topic, uh, it's going to be probabilistically hit out to each individual that's in that. Um, but it's not like you're sending out a one message individually to each person. We don't have uniccast, for example, or there's no uniccast or multiccast in Whisper at the moment.
Yeah, it's um, you should check it out cuz it's a really weird protocol. It's um, very interesting. ever. No, no, I know. Um I guess we've been too busy trying to code.
So yeah. Yeah, unfortunately not. So the project need central server. No, no, no, no, no, no, no. It's uh that's the whole point.
We want to have this completely decentralized from the beginning and keep it that way. Discover discover is uh building. Yeah. Yeah. So um yeah, it's it was really hard to do.
Um but it's it's it's really cool like uh basically uh instead of relying on a central server you're you're basically asking your friends for information. Um even call the car API. Um sorry cool. You can call the car in the state. Right.
Right. So um the that really depends on the third party developer. So that will we actually have a plan you know many moons away uh maybe 2018 2019 to work on a decentralized sort of Uber like ride sharing uh car cooling service. Um, and of course we want it to be decentralized. Yeah.
So if the guy is now online and I want to message him. Yep. Will we eventually get my message? Hopefully. Yeah.
Yeah. Uh if he's uh if he's offline, um there's there's a few things that can happen. We do message redely. So there can be a position where you're both off like you you're online, you send a message, but they're offline. then you go offline and they come online.
Um, in that situation, in the current version, uh, it probably will get lost if the time to live is too short. Um, if the time to live is too is long enough and it's still bouncing around the network, he will get it. But when he uh when you come back online, you'll uh you will also notice that he hasn't received that message. So, you'll send another you keep sending it out. Um, now there's another step to that where if we alter the whisper protocol, we can have your friends store those messages.
So you can send a message out and as long as one of the friends knows that you're wanting to send this message to that person, they can they can hold on to it. So there's no guarantees, but you're increasing the probability that that message will be delivered in a timely fashion. Right. Um, now I'm probably building this kind of software is like building a castle on sand. And and why I say that is because all the protocols are always changing.
Um, and and and a really good example of this and it kind of answers your question is uh Victor from the Swarm team who's working on decentralized file storage and Tao who's working on the Raiden network. It's the lightning network state channels. It's got three names. um they need a fast way to communicate off the blockchain. Um and so they're working on a messaging transport which is going to uh so Athereum Ethereum is stacked like you have dev peerto-peer which is the the base peer-to-peer protocol.
On top of that you have Swarm, Whisper and uh and the Ethereum blockchain and that makes up all of Ethereum. Um now between whisper and swarm underneath whis whisper and swarm but above dev p2p they want to make a new messaging transport. Um and this will allow you to have uniccast and multiccast and it will have features such as inboxing uh and all the things we basically implemented on top of uh on top of whisper. Um but there's no guarantees that's ever going to happen. Um it's really just in the sort of uh conceptual talking about it stage.
Maybe you'll maybe it'll never come to fruition. Um but there's a lot of interest around that. So yeah. Yeah. Is the um whispering message whisper pro something like the big message or um like big message?
Oh sorry I mean that big message is a P2P communication right? I I'm actually not familiar with bit message. Um so I couldn't answer it, I'm afraid. Okay. So any anybody else?
All right. So everyone's going to be using Status by Defcon 3 hopefully. Yeah. All right. Cool.
I'm happy. All right. Thanks,
Automatic transcript — names and jargon may be misspelled.