 All right, well good morning, good afternoon, good evening everyone. Thank you for attending today's firefly developer workshop. So this is a very developer centric session today I have zero slides and lots of code to go through so hopefully you're ready to get hands on. If you have not had a chance to look at the gist that I sent out ahead of time with the prerequisites. I'll post that link. I'm not post that link in the chat. Please look at that right now and make sure that you have the prerequisites installed on your machine, like Golang Docker, and some sort of ID. You'll need that stuff set up in order to actually go through the workshop so we'll go ahead and get started here and I'll share my screen. And we'll just talk through what today's session is going to be okay so so this is kind of the setup that we were working with for the most part terminal on the left and the guide on the right. So, this is going to be very hands on very interactive. If you have questions as we go or if you get stuck. Please interrupt me unmute, ask your questions. We'll try to try to make this as classroom like as possible. So I'll walk you through the guide but this is really this this workshop is for you all to help you guys get your machines set up and so that you are prepared to either a build applications on. Yeah, so look at the workshop goals here. So at the end of the workshop, we want to have a dev environment that's capable of building apps on top of Firefly that they use Firefly. And also a dev environment that's set up for if you want to make changes to Firefly itself, you know, where to go do that how to do it and you have all the tools set up on your machine so that you can do that. We'll set up some sample apps from our repos run those and then we'll just take a look at all of the pieces and parts that make up a working Firefly stack on your machine. So those are the goals for today. Any questions before we jump in here. All right, so I'm going to skip over the prerequisite section. Hopefully you had time to do that ahead of time in preparation for the session. If you if you're kind of skimming through it real quick and checking that the two things to really check forward to make sure that you have everything on here are the make sure you have go installed. So I can run go version. I've got go 116 so I'm good there. You also will want to make sure your go path is on your path. So, I can let's see all echo go path. And then if I check my my actual path. I'll see that this go bin directory is on the path as well. If it's not. The quick thing to do is edit either. You can add a few lines to it at the bottom of it to put that on there. So this will this is important because we're going to install some binaries and you want those on your path so that you can actually run them. So hopefully everybody has that set up and you have at least a working go environment. The other important thing is Docker and Docker compose as well. Those are usually fairly straightforward to set up. So we will skip ahead here to actually setting up firefly so firefly CLI is a if you've attended any of our other sessions you've probably seen it in action. Maybe you've had a chance to play with it yourself. It is if you haven't it's a dev tool designed to set up firefly and all of its dependencies in a working environment on your machine. And it's designed to take all the hard dev ops orchestration work out of the equation for setting all that stuff up so firefly is a it's a distributed system. It's a microservices architecture so there are a lot of small pieces to it in lots of different software components and it's very modular so you can swap components in and out. So the firefly CLI is designed to help you manage all of that stuff. So it's pretty easy to install if you have go set up on your machine you should just be able to copy this line will run that and it should go install that the even if you have it installed. If you've installed it previously. I would run this again because we just released a new version recently actually I was working on it last night iron out a bug so that we wouldn't run into it in this workshop. Okay, so we'll see it's installed. If we look in my go path now. We should be able to see it in the bin directory and there's the ff executable. So if I run ff now we'll see the output from firefly. So that's installed. And I'll just I'll pause here if people are having trouble installing the CLI or you can't run it. Let me know. Because you're going to have a hard time following along if you can't run the CLI is anybody anybody having trouble or need some quick pointers. Nick if you don't mind. Would you be able to provide a brief introduction about firefly and the use case when should I use it. Sure. I had not planned that as part of the agenda, but that's a it's a good point I probably should have should have started off with that in case folks aren't familiar with firefly. My intention was the target audience here was somebody already interested in firefly but needs to know how to set it up. But yeah to just to just back up for a quick second. So firefly is a multi party system designed for enterprise data flows powered by blockchain is sort of how we describe it. So what does all that mean. It is it's it's a it's a piece of software it's many pieces of software that help multiple say multiple businesses want to do business transactions, and they want to use blockchain as a ledger for those transactions, and they want to do it in a secure way and they want to do it in, you know, maybe some pieces of data need to be shared with all members of the network. They're doing it in a private blockchain. So it's not on, you know, Ethereum mainnet or on some public chain. It's a private chain, but maybe not all those members of that network need to be privy to all transactions maybe you need to share some transactions only with one member of the network, or some pieces of data need to be broadcast to all members of the network. It's a way that it's a system that orchestrates all of those communications in a secure private manner, and let's developers focus on what's the business logic of the particular business problem that I'm trying to solve. And I'll leave all of the, you know, I need to get this piece of data from my organization to another organization securely leave that to firefly. Well I need to put this piece of data on the blockchain but I need to leave this piece of data off the blockchain. Leave that to firefly it handles all of those complexity of those things for you so it takes, it's really about accelerating the growth and the adoption of enterprise blockchain and giving a platform that is just an API that's really easy to build on and taking away a lot of the complex or, or even not complex but just tedious to implement you know all of the messaging between various organizations and all the integration points it handles all of that for you. So that's kind of the goal of firefly in 30 seconds there. Okay, so hopefully you've been able to install the CLI. We will keep going here. So the CLI we talk about a stack. And I kind of borrowed this name, you know if you're familiar with cloud formation on AWS you have a cloud formation stack it's just a set of resources that's designed defined by some document so in firefly. A stack is it's an entire firefly network. So we'll create one of those so we can see when we ran fire when we ran ff the firefly CLI printed out a list of things that you can do with it. And the very first thing we're going to do is do an init. So let's ff init. There are actually before I do that. There are lots of options on the init command if you want to customize the stack, and not all of these are fully implemented yet. Yesterday on the community call we demoed in a in a in another branch of the CLI so not in the version you have installed. You can start to use fabric. We're also working on basu and another branch as well. You can you can specify a different database implementation. SQL light three is the default but there's also support for Postgres so if you choose Postgres here it will spin up another container for your database. So there's lots of different customization options when you are editing a new stack. So just wanted to point that out but if you just go at the defaults and we ff init it will ask you a couple of questions. If you want to script this there are ways to set all of these things ahead of time to so it doesn't go into interactive mode. So we'll call this stack name. We'll just call it oops. I already have one called workshop. So I'm just going to. I was testing that last night to make sure that this would go smoothly and forgot to clean that up. So I'm going to ff init. We'll call it workshop. You can feel free to name yours whatever you would like. I'm going to make a network of two members. And there it creates it. So as you may have guessed reading through the guide. Firefly CLI uses Docker and Docker compose to orchestrate all of the infrastructure here so it will actually tell you hey your Docker compose that I just generated for you is right here so if we want to take a quick peek at that. We can do that. And there's a lot in here. And like I said there's there's quite a few moving parts to this whole system so that's that's that's why we have the CLI is to automate the generation of all this stuff so you don't have to do it by hand because it's there's quite a bit so we have our data exchange nodes here. And we have our blockchain connectors, which in this case is going to be a connect. And as you'll see for each of these there's one for each member in the network. So we're going to try to simulate things as as close to production as we can here within reason. And we'll see to Firefly core nodes. You can see there are. There are a lot of ports that are exposed by all these things as well. So that's something to watch out for is just making sure that those ports are available usually. We don't run into problems there but and the CLI will help you check for those things when we started up. Here's our blockchain node and IPFS nodes here for file storage and then our token connectors as well and these are new. We're not going to get into tokens today tokens is still under development right now it's it's new. It's there in the stack but it's it's not quite done yet and then there's some named volumes that are exposed at the end so that's kind of that's just a quick peek under some of all the things that Docker compose is going to do for us. So now we've got so basically when we run ff init that just writes a bunch of configuration files to the disk. It doesn't actually start anything it doesn't run anything. And when we run ff start say workshop. I think in the guide I called my stack name simple you can name it whatever you want so I'm going to start my workshop stack here. And this is going to do a whole bunch of things so a it's going to. So right now we're seeing it initialize in the blockchain node so for Ethereum it's writing the Genesis JSON and putting all of the identities on chain. It will also pull the latest versions of all of the firefly components to make sure everything is staying up to date for you. It only does that the first time that the stack launches. So when once you launch a stack it will stick with that version unless you run the upgrade command. It will so so after it starts everything up. It will deploy a smart contract for you and it will register the identities of all the members on the network. So it's it's doing a whole bunch of things. In addition to just starting up processes, you know if you could just go run Docker compose up on that stack. You have a whole bunch of other manual steps that you need to do after that to actually get it to a usable state so the CLI is designed to automate a lot of these steps usually doesn't take this long to pull the latest versions. So I'm going to actually there's a way to skip pulling the latest. So I'm going to do that. So first I'm going to I'm going to reset this. So if you pass the dash and or dash dash no poll, it will skip pulling the latest. And I'm not sure maybe Docker is just Docker hub or something maybe having issues right now. All right, so it's copying some configs it's starting everything up now. Because there is a question that somebody got. Sure. Yep. Sorry, I don't have the chat up. There was an exception. I got okay. I'm happy to while this is starting up happy to help. What, what exception did you get. I don't think your audio is working correctly. I'm hearing a very high pitched sound. I don't know if anybody else is hearing that as well. Yes, that's better. Okay, so I was running ff start simple. It waited for some time and then I got the Docker run error. And it's asking me error resetting stack Docker compose down volume. Okay, not to find the file actually. So the first thing to check is, you know, in the guide here, so make sure Docker is running. Not everybody has Docker set to automatically start up on their machine so is Docker running on your machine. I'm not sure. It asked me to log in and log out. Yeah, so yeah. Okay, yep. So I will reset it and then I think the problem will be solved. Yeah. Okay, great. Thank you. And if you if for some reason you can't run ff reset on it. You could also rm dash rf. And it's going to be in your home directory in a directory called dot firefly stacks and then the name of your stack. So you could just, if you need to manually delete that directory for some reason that's where it's at. Yeah. Okay. Thanks. Sure. Yeah. Good, good call out there. Yeah, I forgot to mention that sorry so Docker definitely needs to be running. The CLI does not automatically start Docker on your machine. So you'll need to make sure that's running before you start running ff start or any of the other commands. And it just writes config to the disk so it does not need Docker running. But I think all of just about all the other ones do something with Docker so. All right, so we've got a working stack on my machine. Hopefully you have a working stack on your machine to or you're very close. I'll try to try to keep going slow here so people can keep up. So you should be able to click on these links and see the dashboard now. And indeed we can. So we haven't run any transactions here, but we have a working stack. You'll see the default URL that so that we clicked here and this is slash UI so you can you can go here and you can see it kind of we'll see it there's two sorry this is kind of cutting everything off here but so there's two network members. There have been no messages. And once we start sending some stuff we can go to the messages the data or the transactions tabs and inspect those but there's nothing in here yet. If we want to see the API documentation, the swagger definition for everything, we can just change this from UI we can go to slash API, and that will load this page. So here we can poke around and see all the different endpoints that we can hit the kind of, these are some of the important ones that we'll be focusing on today, you know broadcasting a message, and also sending private messages. And so these are the endpoints here you can see examples and all the different fields that are on there. Hopefully you should be able to pull this up on your machine as well. If, if you're just curious to explore the API, and you don't want to go through all the hassle of starting up a stack. This is this swagger document is published as well. You can find it at labs dot hyper ledger dot org slash firefly, and you can go to API spec. And this, this is the same exact thing. Whatever is published on this page is what is in the main branch of firefly. And I've also linked a few scroll all the way down to the bottom of the guide. I have linked to this swagger dock down here as well. There's also while we're down here, there's also a postman collection that you can download. If you use postman, I'm going to use it in a little bit to actually run some transactions. You can download this collection and it will kind of pre populate postman with a bunch of different requests that you can use to try out your firefly stack that you just installed. And I think there's a note of that in the guide here. Yep. So I can go here, grab that that Jason file and set that up postman. And we can, we can manually run some stuff. So actually let's let's do that now. I'm going to, oops, I will unmaximize these things so that I can bring up postman to I thought I had it running. So we'll just we'll run a couple of sample messages on it just to prove that it's all working and then then what we're going to do is go get a sample app and then run that against the stack as well. The sample apps are in which well postman is coming up here. You take a look at, well, we'll look at the sample apps in just a minute. All right. Okay, so this is if you open up postman and you import that collection. We'll see, I called mine firefly demo I think you can name it when you import it. Let's run a broadcast simple message. So we've got two firefly nodes running on our machine right now. One of them is listening on port 5000 and the other is on 5001. So we're going to we're going to send a request so we can access either one of them here normally like in production this would be like one organization would only have access to one and another organization will only have access to the other. Yep, let me post that link again for folks here. There you go. Okay, so this is going to be sent to the first member and this will be brought because this is a message broadcast. This will be sent to every member of the network so if there was more than one other member everybody would get this. So we'll hit send. And then we should be able to go look at. Let's go back to the UI. And here we can see that there was a message that was sent. Let's open up the second members network or Explorer as well. And they have the message as well so now that there's a message in here we can go to the data tab and click on this row. And then we can see there, there's the contents of the thing that we sent foo bar, and then we can see it postman that's the value of what we sent here. So, when you're sending a message in Firefly. There's a, it's it's wrapped at a, so that you're, you're sending, you're not just sending a piece of data. You're sending a Firefly message that contains one or more pieces of data and some information on how to send it. You can send it to and that sort of thing. So there's, there are in the docs, there's lots of different, lots of different ways to send messages. We're not going to get into all of them today. The focus for today's session is really to, to get the dev environment set up. And then the docs are there to kind of explore all all the different ways and features that you can use Firefly. So, I will show one more though we'll send a now so that was a broadcast to everybody in the network will send a private message now. And so this one's going to be a little different. So here, first of all, it's going to a different endpoint. So this is the messages private endpoint. And we still have a data array with one element here. In this case I'm just sending the string secret message. Last time I was sending, I was actually sending a JSON object so this value can be any arbitrary JSON object. For now I'm just making it a string. And then we also have a group with a list of members to send it to in this case I'm sending it from the first node in the network which is org zero on port 5000 and I'm going to send it to org one. So this will only be if there were more members of the network this would only be visible to org zero and org one. So hit send there, and we'll just go hop over here make sure that we see that as well. Okay, so when, when we sent that private message, the very first time we sent a message between those two it initializes a group so we see a group and it message here. And so that's why we see three messages even though that I only clicked send twice. So let's see, we'll go over to the data tab now and just make sure yep and there is our secret message. Okay, so we have a working stack. And at this point we're going to go run some sample apps against it now. I think there was another question in chat. Can we implement smart contracts with firefly. So, yes, their, their firefly has its own smart contract that it's that it's executing right now. If the question is about can you write your own custom smart contract and use firefly to run that. The answer is coming very soon. That's one of the next major things in the firefly project that we'll be working on. And yesterday's community call we demonstrated to what one of the goals of firefly is to be very modular very pluggable and open so it supports right now we're just we're using Ethereum because that's just the default. But yesterday we demonstrated all the same functionality working on fabric as well. So now that we have support for multiple different types, completely different types of blockchains will be building on top of that, the ability to run custom smart contracts as well. But we wanted to wait until we had support for different types of blockchains so that we designed custom smart contracts in a way that works across blockchains and so that it wasn't just pigeonholed into into one specific one. It's coming soon and very excited for that as well. All right, I'll pause here any other questions on hopefully hopefully you've been able to get a stack up on your machine and you've been able to send a couple messages. Please, you know, raise your hand or unmute if you are stuck or have questions will pause here for just a minute to make sure that everybody is kind of keeping up. I hear somebody talking but it's, it sounds like chipmunks sorry, the audio is not good. Hi, can you hear me. Yes, that's much better. Okay, so I'm running into some trouble because of Docker. I install installed it on Windows and it says WSL to installation is incomplete. And I'm running it on Windows 10. Okay, so. Yep. It is. It's possible to do some of this on Windows. And, and I think if you're running WSL to is it's, I think it's possible to do all of it. Right. Unfortunately, that is like the most complicated setup possible for this. And we don't have time today to walk through getting WSL to set up on Windows. There's there's some great guides elsewhere on the internet on how to set up that type of environment. Is it normal to have this problem on Windows. So I can fix it here. Yeah, so, so if, if you have WSL to set up and you're able to run Docker in the, the Linux. I don't know if it's, I don't know if containers the right word, but I'll just, if you're able to run Docker in the Linux environment on Windows, you should be able to run through all of this. I've done that in the past. So it, it is possible. But it is complicated to get set up. Yeah, so it's, it's really better to prefer like open tool for this development. It's, it's probably, it's probably easier to get set up. Yeah. So really that's just the complexities of how Linux and Windows work together today in the current version of Windows. It has less to do with Firefly itself. Okay, thank you. Yep. There was a question about the recording for fabric. Yes. Later today it will be up on the hyper ledger wiki in the Firefly lab page. We have a page for every community call and the recording will be up there. I haven't had a chance to post yesterday's recording yet but I'll do that later today. Great questions. Any other. Thank you, Bobby. Appreciate the link there. Before we go on. Yeah. So I have a question. While you set up in the Firefly, you mentioned the member is to correct whether that member is pointing to the organizations or what is that. Yeah, so if we go look at the dashboard, we'll see there are there are two members. And if we go, let's see, where's another good place to show this. We can actually query Firefly and see. We look at the API. We can do a get on network organizations. And where's the try it out but there it is at the top. Execute. And you can do this for postman to I don't have it in the collection though. So here's. So this basically, I just asked my local Firefly node hey get me the list of everybody that's in the network all the organizations. And there's there's separate endpoints for all of the, the node or the member. Sorry, all the nodes that are in those organizations. But we can see there's there's two orgs here. So this is me, I'm, I'm org, from the, oh actually sorry, I did this request from 5001. So, so this would be me or one here. And this is org zero, who's the other member of the network. So in the real world, this would be probably one company, and this would be some other company that have entered into some sort of consortium and that want to do business transactions with each other. They want to use blockchain want to keep some, some pieces of data private or some public and but but they want to do transactions with each other. Does that make sense. Yeah, got it. So my next question is, if, if in a terium be making their own product in it means for each transaction we need to spend some meter correct. So for coming to the firefly. So how did we work. So it was the question about gas and the cost of the transaction. Yeah, so, so the short answer is it's free. This is a, this is a privileged network. It's a price. So we're not running on a theory and main net here. So this is, I actually if we go look at let's, let's take a minute to look at what's running on my machine, because this is something that I wanted to show everybody as well. So I'll just open up my Docker dashboard here. And we can see in the workshop stack. There I have a go Ethereum or geth node running on my machine. And this this machine is this, this Ethereum node is set up in a private chain. So, when the firefly CLI started up it created its own blockchain that created its own Genesis block and then gave it to this node and said hey start a completely new chain. And in that chain gas is free. And so anytime you're running transactions in the private network, it's free there's no cost to run a transaction. It's, it just works fundamentally differently because the, the economy if you will is different in a private privilege network than it is on a public blockchain. Okay, so then for each member will get a separate public and private address correct if I am. Yes, so, so each member if we look here, this you can see that this is their their Ethereum address that's on chain. And they also each one of those has a private key as well. You can't see that from this interface but yes there there is a private key for each one. Okay. Yeah, I'm done with my question. Okay, cool. Hopefully, hopefully that helps a little bit. There's another question in chat. Can you please go through the left side menu again if possible, a one line explanation. Are you talking about on this page over here, this, this menu. Yes. Okay, sure. Yes, so this is so the firefly explorer is, it's just a way to look at the system and see what what's going on inside firefly. It's not a, this is not a, a, you probably won't use this in production. But it's, it's, this is a tool for when you're building your app to see, hey, what did I, I made a post request what happened, who got the data what does it look like on the other side. So the deep this is the default dashboard it's just sort of a summary. I can go to the messages tab, and I can see these are the individual messages that have been sent. And then there's data and transactions and so, so the differences between all these things are. When I make a post, I send a message, a message. If we go back and look at postman. This is an array. So I could have multiple data items in here if I wanted to. So one, one message could have could result in multiple pieces of data sent here. If lots of messages are going through the system. All at once, they could be firefly will batch things for better throughput. And so those could all get rolled up into one transaction that firefly will sort of it it buffers things, and it will hash and write things to the blockchain all at once in a batch. So, so that if you're sending requests fast enough into the system, you'll see, you actually have fewer transactions then you have messages sent through the system. And you may have, depending on if, if each of those messages had more than one data element you could have more pieces of data than you do messages. So hopefully that makes sense and kind of the difference in all three of those. And this is just a way to view each of the three messages data or transactions, and the dashboard shows the overview. All right, do a couple more questions here and then I do want to, let's see. We've got about a little less than 20 minutes left so I want to want to kind of get back on track here in just a minute for fabric. I'm sending private messages between different orgs will firefly create separate channels for each pair of orgs private data collections. Yeah, so it's a great question. So that that topic actually came up on the community call yesterday. The short answer is, there's more work to be done to support multiple channels right now. The fabric support is is not fully released yet but it's we showed it working yesterday. So as of today there's one channel that it uses, but that's that's not the end game there. There's there's more work to be done in firefly to support multiple channels but the short answer is it will be flexible and it will be up to you and whatever. If, if lots of channels works, and that's what you need, you'll be able to do lots of channels. If you need very few channels you'll be able to do that as well. So, but there is more work to be done on firefly itself to support that. Okay. I'm going to pull up the guide again. Where did that go. Oh, it's right here. All right. So let's let's run some sample apps now. I'm going to clone. There's another repo in hyperledger labs, firefly repos called firefly samples so I'm going to clone that. So this is a no JS app. This is meant to be just an approachable like very simple like hey here's how you write some code that sends a transaction to firefly. So it's going to be doing basically the same thing we just did in postman manually, but with some code. So we'll go into that directory. We'll run actually so in here we've got a CLI example and a UI example. So we'll run the CLI one first. So we'll go into the directory and we'll just npm install that. And these commands are right here in your guide to if you're following along. So that's going to go get dependencies and set that up. Okay, now we should just be able to npm start. And like I said, this is super simple. So all this is going to do is going to start up it's going to broadcast to a message with two data elements hello and world, and then it's going to make sure that it receives them on the other end, and it would send it from what it calls Firefly one, it's on port 5000, and it sent it to Firefly two, and this guy got it. So here, this sample actually demonstrates listening on a web socket as well. We'll just go peek at the dashboard again, so we can look at the data. Okay, so here's, yeah, so here's hello. And here's world. So these two data items were sent in this message right here. And you can see, yeah, so they're, this one had two pieces of data in it. Let's go to the other member and see if it got that message as well. Yeah, so here's a broadcast. Take a look at that one and there's, there's the hello world message that it received there. So super simple. We want to open up Visual Studio Code and take a look at what this sample is doing. We can see it's essentially just doing what we did in postman. Look at. So there's, this is basically just the kind of the flow through the thing here we define the data, and then we, we broadcast it, and then in Firefly TS. So this is, this is a TypeScript application. We define some basically just the data types, and we define a, so this is, if you wanted a simple example of a web socket listener, this is a good place to look actually. If you're interested in doing it in TypeScript or JavaScript on Node. So this is going to basically the, it's going to make an API request to send the message, but then it's listening to the other Firefly Node on a web socket for that message to come all the way through the system. So you get kind of both sides of it here. And then here's the simple HTTP request to actually send that message. So very, very simple sample. So this one's a code in this one. The there is a UI version as well. So if we go into that one. What's it called private data transfer UI. I, I'm not going to go through this. I think this one uses React, and it might take a little longer to install. I'm not going to go through and run all of this one right now but I'll just give you a quick, quick tour of what that one looks like. So this one will send this one has a couple of drop down menus. It will send either private messages or broadcasts. The name is actually we should rename it. It's a little bit of a misnomer right now. So it has a it's just a very simple like front end and back end. So here's some some routes that it defines for the web page interface to hit. And then that that back end will take care of making the requests to Firefly. So that's what we've got in here. Here's our app TSX. So this is this is the front end. Yeah, it's going to complain because I don't have all the dependencies installed. And this is, if you're familiar with react development, this should look fairly straightforward. If you're not, this is probably super confusing. But that's this. This is an example of a front end and a back end that you can use if you're curious on how to put one of those together. So at this point, I want to make sure we get through the good stuff in the amount of time we have left here so kind of looking at our goals. What have we accomplished so far. We have a we have a dev environment that is capable of building apps on Firefly we just showed downloading and building and running an app on Firefly we've made some manual postman requests to it. But we haven't. We've we've run sample apps on the machine and hopefully you're getting a working understanding of the components will. This that that may be that may be a stretch because there's a lot going on here but making making changes to Firefly itself is the major thing that I want to get into now so we were super excited that lots of people are interested in Firefly and we would love to have more contributions to it. We would also love if people are really passionate about it and really want to get involved. We'd also love more maintainers on on the projects as well there are a lot of different repos in Firefly I've linked to all of the different repos here at the bottom. There's a variety of languages that are used in them so you don't necessarily need go lying expertise to to be a contributor or even a maintainer on some of these so if you're if you're really interested definitely check them out please reach out to us. We would really like to get more contributors so this is that's the goal of today's session. Okay so so far we've run Firefly but we haven't actually downloaded the source code for any of the Firefly repos itself. Let's do that now. So this is, we're really shifting gears here now. I'm going to go back up to my just sample directory here that I made. We're going to go grab the source for Firefly core. And we're going to download that so Firefly core is. It's an orchestration engine. It is sort of the thing that communicates to all of the other different parts of the stack so it's communicating to public storage nodes is communicating to a blockchain connector to private data exchanges to token connectors and to a database and it's handling all of the message flow for you. So, it's, it's sort of, it's the orchestrator but all of the hard work all of the real the valuable work is done by everything around around it. Well, let's not to say that what Firefly does is invaluable but, for instance, the blockchain work itself is actually done by by the blockchain node it's and Firefly is really orchestrating all of those things together. All right so we've downloaded the code for it. Let's go into and we've gone into that directory now. So, I can compile Firefly by running make. And let's just do that right now this will run through all of the unit tests and it was, it'll make sure that you have a working Firefly binary here at the end of it. So, I'm, I'm going to, I'm going to stop the stack that I have running. So I'm going to run ff stop workshop, and I would recommend if you have a stack running, I recommend you stop yours as well. And here's why so so what we're going to do is, when I'm doing development. I would like to be able to connect a debugger to whatever I'm working on. And if we, if you remember, when we looked at my Docker dashboard earlier, everything was was running in Docker. And that's cool. It's, it's hard to debug when the thing that you're running is built in a Docker image that's published somewhere else and it's, it's just this complicated so to me it's a lot more straightforward if I can just debug a process is running on my host machine. And I can just go with that. So what we're going to do is we're going to create a different stack now. And this stack is going to have all of the components that we had before, except it's going to be missing one Firefly core node and that Firefly core node we're going to run on our local dev machine on the host machine. And it's going to through the magic of port forwarding be able to talk to all the dependencies inside that Docker compose stack. But we're going to be able to pause it, we're going to be able to step through in our debugger and do all of these things. So that's the goal that we're working toward. All right, so while this is building exactly there was one more question how can we disable Firefly when moving to production environment. I'm not entirely sure if Firefly is designed to be a production system. And so maybe is there a certain part of it, I see that you're interested in disabling. I'm not entirely sure I follow that question. Sorry, maybe we can come back to that. All right, so it is built. If I look here I have a Firefly binary that has been built now. And so okay so we've stopped the stack just keep going through the guide here. And now I'm going to we're going to create that new that new stack that I was talking about that's missing one so kind of talk about in the guide here, the this external flag will indicate to the CLI that I want to run one of these nodes outside of the the rest of the stack so I'm going to do that. And all this one will call it dev 2 because I think I already have a dev stack. I'm going to say it has two members, and it's going to generate all the config for me. I'm going to start dev underscore two, and I'm going to run that. And so what will happen here is it'll go through all the same initialization steps, and then it will pause. I'm going to open up a new terminal here. And this is the one that I'm going to run code workshop Firefly. This is the one I'm going to actually run my local Firefly on my host machine in. And so at a certain point as it's running through here. It will, it will tell us when it's time to run Firefly. And it will also, you can see in the guide here this is a sample of what it will look like so to say hey please start your Firefly core with a config file that points to this particular file. Okay, there we go so it says, and it will print out the config file that you should use. So I'm going to just paste that command over in this terminal I'm going to run it, and then macOS will ask me if I really want to allow it to listen on a port. So you'll see Firefly core come up over here. And then basically this the CLI sits there and it waits for something to be listening on that port as soon as it sees that that port is available. It will continue its setup. So this is this is super handy because there's a lot, there's there's some API calls that need to be made. When this thing first comes up to get it to, like we said, deploy that smart contract register the members and get everything set up. And then an error occurred, lovely. I will look at that in a little while here. So if something goes wrong and sometimes it does, especially when you're doing development. The CLI will will roll all of the changes back so it will try to get everything back to a clean slate so that you can run this again. Hopefully it'll work the second time. I'm not actually sure what would wrong here. It looks like it might have been something with with tokens or one of the newer things in here. So I'll look at this offline. I do want to point out though, and I realized we were running out of time. So just, I really want to show you how to connect a debugger to it. So we'll just talk through that real quick. So I'm going to open up Visual Studio Code in the in the Firefly repo. And there is a so you don't have to use Visual Studio Code. You could use your own IDE if you want. I know there's there's other go editors out there that that are also good but Visual Studio Codes is the one I use in the repo. There is a launch JSON file for VS code. And if you've named your stack dev, it already has a thing that's ready to go here so I could. I called mine dev 2, but if you called it dev, I could literally just come in here and hit F5 and run it. And then if the rest of the stack was running, it would connect to it, and then it would be, it would work and then I could go into any of the source code files here, say, in batch pin. And, you know, anytime anytime I'm submitting a pinned batch, I could put a breakpoint in here and I could inspect this code. Unfortunately, the stack didn't come up correctly so I can't actually demo the debugger working and actually stepping through the code which is what I really wanted to show. But, but that that is the process that I used to to actually set up the code base and be able to set up an environment because there's in order to actually run this code that I'm looking at here there's a whole bunch of dependencies you need a database you need a blockchain you need there's a bunch of stuff and so that the CLI is really the tool to lean on to to help you set all of those things up. But the using the external flag and setting up the stack the way we just did. That's, that's the way to basically let the CLI handle all the hard work of doing everything outside of Firefly and let you focus on. Hey, I just, I just want to focus on the Firefly code base itself and build. Maybe it's a new plugin, maybe it's, you know, maybe, maybe it's an enhancement or bug fix or anything like that. That brings us to the end of the guide. I left a lot of different references here at the end of it, including lots of different things places you can go for more documentation there is there's another. So I sort of built this guide from a combination of these pages so if you want to go read up more on this or walk through it on your own. You can either follow this guide or read through the documentation pages there and I've linked to all the rest of the Firefly repos here. And again, CLI setting up all these for you but if you want to go poke around into what all it's setting up, you can go into each one of those there. So I think we are about at time, but that is the end of the material that I had to go through today. Thank you very much for attending and just really, really excited that lots of people are interested in getting involved and I hope today's session was helpful. Thank you. Yeah, thank you. I do have time to I realize we're at time but if people have questions or have things they want to discuss I'm happy to hang around afterward and talk with you all if you are interested. So I think there are some questions you can look into a chat. Cool. How we can disable firefly. Yeah, so, so I see there was a clarification on there. So firefly is is firefly is designed as an enterprise grade production system. The CLI itself is a is a development tool. So, so hopefully that helps clarify it so if you're going to if you want to use firefly in production, you don't want to use the CLI to set it up you'll want to. There's a lot more things that you'll need to consider there in terms of network access security and you'll, you will. There's, yeah, you'll want to have control over all the things that the CLI is doing for you it's the CLI is basically going okay or I'm going to pick reasonable defaults for a local development environment. But firefly itself is designed to be used in production. We use it in production and it. Yeah, it's great. Yeah, thank you. So I will post this according to the Hyperlegion YouTube and then wiki wiki. Okay, that sounds great. Yeah, thank you. Thank you all very much appreciate your time and hope you have a great rest of your day. Thank you.