skip to content
Video cover art for Dash Platform Walkthroughs Part 2b with Nick Taylor
Video

Dash Platform Walkthroughs Part 2b with Nick Taylor

Anthony Campolo, Nick Taylor, and Rion Gull continue a Dash Platform tutorial with names, data contracts, and the platform's two-blockchain architecture.

Open .md

Episode Description

Anthony Campolo and Nick Taylor continue their Dash Platform tutorial walkthrough with Rion Gull, registering names, creating data contracts, and exploring the platform's two-blockchain architecture.

Episode Summary

This second installment of the Dash Platform tutorial walkthrough picks up where network issues forced the previous session to cut short, with Anthony Campolo guiding Nick Taylor through the remaining setup steps after successfully creating an identity. The discussion centers on understanding the conceptual differences between wallets and identities, with Rion Gull providing detailed explanations of how Dash operates two separate blockchains—a proof-of-work chain for funds and a proof-of-stake platform chain for data—connected through a credit-locking mechanism. The participants work through retrieving identities, topping up credits, registering a name (jakeperalta.dash), and creating a data contract with a defined JSON schema. Along the way they encounter naming regex constraints, network slowness, and TLS errors that require retrying operations. Rion clarifies that Dash uses data contracts rather than smart contracts, providing decentralized database functionality without executable methods. The session also touches on an active proposal to accelerate platform mainnet release, which would resolve many of the testnet stability issues the team encountered during the walkthrough.

Speakers

  • Anthony Campolo
  • Nick Taylor
  • Rion Gull

Chapters

00:00:00 - Reconnecting and Reviewing the Identity Creation

Anthony welcomes viewers back for the second part of the Dash Platform tutorial, noting that network issues had previously prevented progress past identity creation. Nick reflects on the experience of digging into new technology despite blockchain's mixed reputation, expressing genuine curiosity about exploring the platform. Rion jokes about cracking whips to stabilize the network, and the group confirms they successfully completed a speedrun of the early tutorial steps before going live.

The team revisits the identity creation code, walking through how the simple register function on the platform client returns an identity that gets logged with a link to the Platform Explorer. Nick pulls up his identity in the Explorer interface, noting it's built on Next.js, while Anthony explains that the identity create transaction was logged on the blockchain seven minutes prior, demonstrating the transparency inherent to blockchain systems.

00:04:23 - Block Explorers and Multi-Chain Tools

Anthony introduces the concept of block explorers as essential tools for blockchain interaction, explaining how they exist for Ethereum (Etherscan), Bitcoin, and other networks since blockchain data is publicly accessible to anyone willing to build a frontend with search functionality. He outlines the various sections of the Platform Explorer including blocks, transactions, data contracts, and identities that the tutorial will reference as they progress.

Nick asks whether the explorer is Dash-specific, prompting Rion to introduce Blockchair as a multi-chain alternative that capitalized on typing mistakes for early SEO advantage. Rion provides extensive context about Dash's dual blockchain architecture, distinguishing between the original proof-of-work chain and the upcoming proof-of-stake platform chain, where validators are specifically EvoNodes—a subset of masternodes—rather than traditional miners.

00:09:57 - Masternode Architecture and Platform Explorer Origins

The discussion moves into how masternode redundancy provides security and reliability, with Rion explaining that hundreds of nodes could fail without compromising the network because thousands run the chain simultaneously. He notes that the Platform Explorer they're using was built by Mikhail Shenmik from the Dash Incubator, who runs a node listening to public network traffic and indexes blockchain data into a local database surfaced through the Next.js interface.

Nick recognizes the white 404 error page as characteristic of Next.js applications, drawing on his prior experience working on the frameworks team at Netlify. The team transitions back to the tutorial to retrieve identities, with Nick creating a new script that calls the platform API. He's surprised to discover his account has two identities rather than one, which Anthony attributes to possibly being a remnant from the previous failed tutorial attempt.

00:15:33 - Wrestling with Wallet vs Identity Concepts

Nick navigates to the Dash documentation to understand identity definitions, expressing genuine confusion about how identities relate to wallets. He reads through the platform docs explaining identities as low-level constructs based on public keys, but finds the explanation insufficient for distinguishing them from wallets. Rion suggests checking the concepts section for better conceptual overviews while acknowledging he's testing the documentation alongside the code in these livestreams.

The conversation reveals fundamental documentation gaps, with Anthony noting that while the docs are comprehensive, they lack easy navigation and clear hierarchical explanations of terminology. Rion explains that wallet terminology varies by user—some think of it as the 12-word seed phrase, others as a public-private key pair, and others as the user interface itself. The team agrees a clear hierarchy diagram showing how seed phrases derive both fund-related keys and platform identities would significantly improve onboarding.

00:24:36 - Understanding Credits and the Two-Chain Bridge

Rion provides a detailed conceptual explanation of how Dash funds move between the two blockchains, describing how the testnet faucet provided proof-of-work Layer 1 funds that can be locked through a special transaction. This locking mechanism makes those funds unusable on the proof-of-work chain while simultaneously unlocking corresponding credits on the proof-of-stake platform chain, with the same process working in reverse to convert credits back to spendable Dash.

He uses the analogy of exchanging dollars for one-cent pieces at a bank to illustrate that credits are simply a different denomination of Dash existing on a different chain. Nick confirms his understanding that freezing funds on one chain unlocks them on the other as the exchange mechanism. The team then moves to the top-up identity script, which iterates over the user's identities and adds credits, with Nick humorously noting he gets to top up with what he initially thought was a billion units.

00:30:01 - Duffs, Credits, and Name Registration

Anthony directs Nick back to the blog post for the explanation of credit denominations, where Nick reads that one Dash equals 100 million Duffs (Dash's equivalent of Satoshis), and 100 million Duffs equals 100 billion credits. They share a laugh about whether Duffs reference Duffman from The Simpsons, with both confirming that was their immediate thought. The conversation explains that interacting with platform applications decreases credit balance, requiring periodic top-ups.

The team transitions to name registration, which requires adding a chosen name to the environment variables. Nick decides to register Jake Peralta as a Brooklyn Nine-Nine reference, but encounters a regex error because the tutorial used underscores in the example label. Anthony acknowledges this as a tutorial bug worth fixing, noting names accept only characters, numbers, and dashes, with dashes prohibited at the beginning or end of names.

00:36:55 - Mainnet Release Proposal and Reconnection Issues

While Nick experiences a USB headphone failure that briefly interrupts the stream, Rion takes the opportunity to show Anthony a proposal on dashcentral.org from Quantum Explorer at Dash Core Group. The Evo Accelerated Release Schedule proposal asks the network to launch platform on mainnet rather than continuing on testnet, accepting that some originally planned features would be missing and accepting slightly higher risk of platform halts, though without jeopardizing Layer 1 stability or platform funds.

Rion explains that approving this proposal would resolve many of the testnet issues affecting the tutorial, with a target timeline of mid-to-late July. Once Nick reconnects with a different microphone, the team returns to running scripts, successfully registering jakeperalta.dash and viewing the result on the Platform Explorer, where the connection between identifiers and human-readable labels becomes clearer.

00:43:25 - Name Resolution and Data Contract Concepts

After successfully registering the name, Nick runs the retrieve name script which resolves jakeperalta.dash to the underlying identity. He initially confuses the owner ID with his wallet address, prompting Rion to acknowledge that using inconsistent terminology like "identity ID" versus "owner ID" for the same string causes unnecessary confusion in the documentation. The team agrees uniform naming would significantly improve clarity.

The discussion moves to data contracts, which Nick initially compares to smart contracts. Rion provides a crucial distinction: while smart contracts have both methods and properties allowing execution, data contracts contain only data fields without any execution capability. He frames this as Dash Platform being the Web3 equivalent of a decentralized database rather than decentralized cloud functions, eliminating the possibility of bugs that could siphon funds since no executable code exists in the contracts themselves.

00:53:46 - JSON Schema Validation and CRUD Operations

Nick examines the contract registration code, which defines a note object with a message property of type string at position zero. The team puzzles over what "position" means since Anthony asked about it before the stream and was told it had been added only days earlier. They focus instead on understanding the contract as JSON schema validation, where the user defines that the contract holds notes with specific structured properties.

Rion clarifies that the platform itself performs CRUD operations rather than user-defined methods, with optional configurations for whether documents can be updated or deleted. Nick connects this to how a note-taking dApp would work: requesting the contract retrieves the schema template, and the chain validates new notes against that schema, rejecting invalid submissions like notes missing required messages. The contract registration succeeds but the script hangs without completing properly.

01:00:09 - Network Errors and Contract Creation Retry

Nick attempts to retrieve the just-created contract but encounters a TLS error indicating the operation was not permitted. After multiple retries failing with the same error, the team checks the Platform Explorer and discovers the contract wasn't actually registered despite the script outputting a contract ID. Anthony realizes the issue: the contract ID is client-side derived before the chain confirms registration, and Nick's earlier interruption of the hanging script prevented the actual publish step from completing.

They run the create contract script again, this time waiting through the lengthy network delay. The team discusses whether two different identities creating identical schema would generate the same contract ID, with Rion guessing the IDs would differ to prevent collision conflicts. Mikhail joins the chat as the team waits, providing context about SDK execution hanging due to syncing transactions from the seed phrase to the latest block.

01:08:00 - Successful Contract Creation and Wrap-Up

The contract creation finally completes after roughly five minutes, allowing Nick to retrieve it successfully and view it on the Platform Explorer. They examine the contract details including the identifier, owner identity, system field showing false (indicating user-created rather than network-blessed contracts like DashPay), creation date, document count of zero, and revision count showing one due to the duplicate creation attempt. Nick then successfully runs the update contract script, adding an author field to the schema.

The team agrees to continue with a Part C session to complete the remaining tutorial steps including writing to the contract and building the Express backend with React frontend. Rion announces that another developer will attempt the tutorial the following day, joking about who can finish in just Part A versus needing to extend to Part C. Nick maintains his open-minded approach to exploring blockchain technology despite current sentiment, and the stream ends at 01:16:43 with plans to preserve the project state for the next continuation.

Transcript

00:00:02 - Anthony Campolo

Alright, we are live. Welcome back to Part B of Part 2 of Dash Platforms.

00:00:13 - Nick Taylor

Appendix A.

00:00:15 - Anthony Campolo

And this time the network works. So, Nick, welcome back. For those who did not see our first part, we are running through our Dash Platform tutorial, which gets you started with doing everything on Dash Platform. We went through the first part of the tutorial with Nick last time. We made it up to creating an identity, which has been a kind of sticking point as a difficult thing for the network to handle for whatever reason. This is something that I was kind of dealing with as I built this tutorial. So we tested it out right before we went live and it seems to be working. So, Nick, you want to give any kind of thoughts or just things you felt after the first time and things you're looking forward to for this time?

00:01:00 - Nick Taylor

Yeah, it's always fun digging into interesting technology. I know blockchain's got a bit of a rap at the moment, but regardless of that, I'm always just curious to try out stuff. And obviously we didn't accomplish what we wanted to do last time. There were some network issues, like you mentioned, Anthony, and stuff. But, you know, we gave it a good go. And I think Ryan went back with some feedback, and I think some things got stabilized in the network.

00:01:29 - Rion Gull

I'm guessing if I were only so powerful.

00:01:33 - Nick Taylor

Yeah, well, there's some good karma today.

00:01:38 - Rion Gull

I cracked some whips and things are in line now.

00:01:41 - Nick Taylor

Yeah, so, um, yeah, so I guess, do you want to let them know, Anthony, how, like, where we are, I guess, right now? Like, we, because we did part of the tutorial in a speedrun just before the live stream.

00:01:53 - Anthony Campolo

Um, yeah, yeah. So basically, we created a wallet, we put testnet funds into that wallet with the testnet faucets, and then we created an identity. So just real quick, let's just look at the code for the create identity one specifically and kind of go over what's happening there. Yeah, cool. Scroll up to the top.

00:02:17 - Nick Taylor

Oh yeah, sorry. Yeah, great.

00:02:20 - Anthony Campolo

We're importing our client, which is what has our wallet mnemonic. That's how you authenticate yourself. Then we're just running— this is really simple. It's literally just run a single function which is .register on identities.platform.client. Then you have your identity. Then it console logs out the identity ID. Something we haven't done yet actually, which we should do— it also gave you that link to the Platform Explorer. Let's take your identity ID, put it in that URL and we can go look at it on the platform. This is the new Explorer, which is different from the one we were using when we got the testnet funds on. This is going to be more specific to the identities, the documents, and the things like that.

00:03:10 - Nick Taylor

That 404 is— it's because I don't have my ID in there yet.

00:03:14 - Rion Gull

Yeah, it's in your terminal.

00:03:16 - Nick Taylor

Oh, okay. Sorry, sorry.

00:03:17 - Anthony Campolo

Or your .env, either place.

00:03:20 - Nick Taylor

Oh, I think it got— I cleared my terminal. All right, identity.

00:03:24 - Anthony Campolo

There we go.

00:03:25 - Nick Taylor

Uh, well, right away I can tell they're using a Next.js site. Um, okay, so all right, let's load this up. Okay, so here, I'll make this a bit bigger so we can see.

00:03:39 - Anthony Campolo

Yeah.

00:03:40 - Nick Taylor

Oh, that's a little too—

00:03:40 - Anthony Campolo

yes, we see here. Yeah, that's perfect. Yeah, so we got your identifier, you can see your balance, and then the identity create. You can see that that just happened, what, 7 minutes ago. So if you click on identity create, you can see more information about that specific transaction on the right.

00:03:58 - Nick Taylor

Okay. Yeah, okay.

00:04:01 - Anthony Campolo

So what these are— basically every time you do an action, it's all logged on the blockchain. So this is like the cool thing about blockchains is that they're very transparent, they're very inspectable, and you can kind of just go in and see what everyone is doing. And then obviously there's ways to have privacy with things like CoinJoin and stuff like that.

00:04:23 - Nick Taylor

But, um, have you ever used a block explorer before, Nick? Uh, I don't think so, unless we did in the tutorial last time.

00:04:34 - Anthony Campolo

But yeah, just that was just the— this is the one time when we checked your funds. Yeah, these are really important tools for blockchains in general. Like, if you're using like Ethereum, there's Etherscan, and Bitcoin has their own, and there are things that anyone can make because the blockchain is just this thing out there with all the data and someone just has to basically make a front end that has some sort of search functionality to it. We'll be referencing this as we go through all the next steps because we'll be creating data contracts. If you see at the top, there's home, blocks, transactions, data contracts, and identities. And if you go to the API, you can kind of see all the different things that are viewable here. So you can even check the status and things like that.

00:05:33 - Nick Taylor

Okay. And this is— we're on the Platform Explorer. Is this specific to only the Dash network? Because from what I remember, I think from blockchains, like, you typically wouldn't have, like, an Ethereum and a Dash on the same network, I don't think. Or is that possible?

00:05:57 - Anthony Campolo

Yeah, so you're totally right. Yeah, so each blockchain is kind of an island of itself in one sense. So it's this network, a bunch of computers talking to each other, they're syncing with each other, they're validating each other's blocks, but they're all just doing it in the confines of whatever blockchain, whatever cryptocurrency they're using. So there's other kind of like multi-chain things out there that can combine different chains, or there's some chains that are made so that you can have kind of different cryptocurrencies on the same chain. But this Dash is like, it's like old school. It's like Bitcoin. It's just its own chain. And if you want to work with other things like Ethereum or Bitcoin, you can use kind of like services that will translate between the two, or DEXs, decentralized exchanges, stuff like that.

00:06:48 - Rion Gull

I will, um, I'll jump in and give a little bit more context there as well.

00:06:52 - Anthony Campolo

Okay, thanks.

00:06:52 - Rion Gull

If you could, if you could open a new tab on your web browser and go to blockchair.com. Um, Blockchair— these guys obviously were capitalizing on muscle memory mistakes when people—

00:07:10 - Anthony Campolo

I've never heard of Blockchair. Blockchair.

00:07:13 - Rion Gull

So blockchain obviously is the closer word that you're familiar with, but sometimes when you're typing, instead of like your muscles just take over, instead of writing chain, you write chair. So these guys got some SEO boost early days from that alone. But in addition to that, they also have one of the best blockchain explorers out there because they are multi-chain. Yeah, so they've got Dash. And just as a refresher from some of the things we discussed last time, Dash has actually two blockchains in the Dash ecosystem. There is our first blockchain, which was the proof-of-work chain, and that's what you would see here on Blockchair, the proof-of-work typical Dash blockchain. But then coming up very soon, we also have this second blockchain that will soon be on mainnet that is now on testnet, and that's our platform blockchain, and it's a proof-of-stake blockchain where the validators, which is a term for the node operators in proof-of-stake chains— it's similar to miners in proof-of-work chains. But the validators on Dash's proof-of-stake chain, which we call the platform chain, which is for data, which we'll get into a little bit more in this video today— the validators are masternodes, and not only not all masternodes, but a specific subset of masternodes called EvoNodes. So I'm going through a lot of terms here. You don't have to remember them all. There will not be a quiz, but just for anybody that's interested, and you too especially— how it works. So you will not see the platform on— you will not see a platform Block Explorer on Blockchair because it's just not even on mainnet for one. And when it is on mainnet, it would be something that we would have to partner with them to get their engineers to inspect our proof-of-stake blockchain and index it and surface it to their user interface and things like that. But they could, and that's what— to Anthony's point, all of it's public data that anybody can tap into. So, but they do have our proof-of-work chain, obviously.

00:09:57 - Nick Taylor

Cool. And just a quick question— the validators you're speaking of, they're on masternodes because it's super critical work, so you need it on something that's guaranteed to be up? Like, I imagine there's like a failure mechanism for the masternode if one goes down, like some kind of round robin or some kind of networking thing going on there. But yep.

00:10:18 - Rion Gull

Yeah. So all the masternodes, all the validators, they host the same blockchain. And so if one goes down, it's no problem. You know, hundreds, hundreds could even go down in our proof-of-work chain and that'd be no problem because we have thousands, literally thousands running the chain.

00:10:35 - Nick Taylor

Okay.

00:10:36 - Rion Gull

So that's part of the security and reliability that's built into blockchains. So let's go back now. I just wanted to show you that, you know, there are like total third-party block explorers that can just tap into any blockchain and surface lots of different blockchains.

00:10:54 - Nick Taylor

Okay.

00:10:55 - Rion Gull

One user interface. So, but this particular block platform explorer website, this was built by Mikhail Shenmik. He's part of the Dash Incubator and he's one of our other strategists. So he made this site and he did that by running— he does that by, uh, he has a node that's running and he's seeing blocks of data come through on the public network. So he's listening to the right traffic on the right ports and things like that. And then he— you can just index whatever data you're interested in, throw that in a local database, and then surface it to this user interface, which you correctly identified as being a Next.js app.

00:11:41 - Nick Taylor

Yes. I used to work on the frameworks team at Netlify, but also that white error page, the 404 is pretty common. It's kind of like when somebody goes, oh yeah, that's a WordPress site.

00:11:54 - Anthony Campolo

Yep.

00:11:54 - Rion Gull

So enough of the boring stuff out of the way. Let's maybe get back into some action with the tutorial and see if we can— we've now got past the step that we couldn't get past last time. We registered an identity, we've got an identity ID, and now we can start doing things with that identity.

00:12:12 - Nick Taylor

Yeah, cool. All right, so you just take it, just follow along from here.

00:12:17 - Anthony Campolo

I'll just kind of observe, and if things go wrong, then I'll hop in.

00:12:22 - Rion Gull

And I'm gonna go grab some water.

00:12:24 - Nick Taylor

Okay, cool. Early, we saw a few transactions. Cool. Yeah. Okay. We already saw my ID in the list. So that's all good. Okay. Yeah. This is just what we were kind of showing before. Okay. So let's go ahead and create a new file here.

00:12:44 - Anthony Campolo

What do you think it will do?

00:12:46 - Nick Taylor

Yeah, yeah. Is the browser still pretty readable? Or I'll make it a bit bigger, actually. There. Yeah.

00:12:55 - Anthony Campolo

That's probably fine.

00:12:57 - Nick Taylor

Just, uh, it's my paranoia from live streaming, always making sure people can actually see what I'm doing. Um, okay, cool.

00:13:05 - Anthony Campolo

All right, and it sounds like also my internet is going in and out. I'm at a hotel right now with some hotel Wi-Fi, so if I totally crap out, then you can continue on. I'll come back in whenever.

00:13:19 - Nick Taylor

Yeah, yeah, no worries. Uh, cool. All right, so I'm just following instructions here to create a script to retrieve the identities. And I imagine, yeah, we'll have an npm run get identities. So let's make this— I'll just make this bigger so we can see. All right. So this is going to retrieve my identities, I believe. I'm assuming that means my wallets. Is that— identity is wallet, obviously, right?

00:13:50 - Anthony Campolo

Or you should explain the difference between a wallet and an identity, Ryan. You'll probably be able to do it better than me.

00:13:55 - Rion Gull

Let's see what the docs have to say about it.

00:13:58 - Nick Taylor

Okay, cool. All right, cool. So yeah, so this is retrieving them just like when we were creating the identity. I think it just takes a bit of time. Also, I imagine running on a testnet or a devnet would run slower than production as well. So because it's— but yeah, okay, cool. So we'll just let that finish running.

00:14:24 - Rion Gull

Yeah, I don't know actually where the speed issue is coming from. It's something I would like to look at.

00:14:31 - Anthony Campolo

You go back to your client real quick. Let's see where you're syncing to.

00:14:37 - Nick Taylor

Yeah.

00:14:38 - Anthony Campolo

Yeah, that should be— that's like very, very recent.

00:14:41 - Nick Taylor

Yeah, it's the— yeah.

00:14:42 - Anthony Campolo

Okay.

00:14:43 - Nick Taylor

Yeah. And my internet's pretty fast. I have like gigabit up and down, so it's definitely not on my end. Uh, yeah, can do, can do a speed test, but I'm pretty sure we're good. Okay, so we'll just let that go.

00:14:56 - Anthony Campolo

We can go to the docs to look up the identity definition while this is happening.

00:15:03 - Rion Gull

All right, docs.dash.org. I'll give you the shortcut there. Okay, and then, um, once again, we are— you see now that what we discussed, we've got user docs, core docs, and platform docs. We're going to go to platform docs. This is what we're dealing with now.

00:15:22 - Nick Taylor

All right, so introduction. Oh wait, uh, okay, it looks like we got our identities. So it returned an array of two identities. Um, we can go look at that in a second. So I guess some background information. I'm inclined to look up identity, but, uh, let's see.

00:15:41 - Anthony Campolo

Sure. Yeah.

00:15:42 - Rion Gull

And just for the—

00:15:43 - Anthony Campolo

it's interesting that you have two instead of just one. I'm not sure how that happened.

00:15:48 - Nick Taylor

Yeah. Okay. So, okay. So identities are low-level constructs that provide foundation.

00:15:58 - Rion Gull

Zoom in a bit.

00:16:02 - Nick Taylor

Okay. Okay. So yeah, it's a public key. That makes sense.

00:16:06 - Rion Gull

Uh, sorry, Nick, could you zoom in just a little bit?

00:16:10 - Nick Taylor

Oh yeah, yeah, sorry, man.

00:16:11 - Rion Gull

Yeah, no worries.

00:16:13 - Nick Taylor

Let's make this bigger.

00:16:16 - Anthony Campolo

Boom, boom, boom.

00:16:18 - Nick Taylor

That okay, or a bit more?

00:16:20 - Anthony Campolo

One more.

00:16:20 - Rion Gull

Yeah, that's good.

00:16:21 - Nick Taylor

Well, okay, yeah, one more. Sure.

00:16:24 - Anthony Campolo

There you go. Perfect.

00:16:25 - Nick Taylor

Um, cool. Yeah, so it's essentially— I get that it's a unique identifier for you, so that part I get. I guess you can have more than one wallet associated to your identity, I'm guessing.

00:16:40 - Rion Gull

Just reading through.

00:16:41 - Nick Taylor

Okay, so the ID— okay, whatever. That's some hash calculation. Okay. It's regarding each public key associated with the identity. Multiple identities may use the same public key. I guess that's just for encrypting or not showing they're valid, I'm not sure. I'm definitely no cryptographer expert or cryptography expert, but I do know don't expose your private keys. All right, okay, okay, this is more super technical, so that's less what an identity is. It's, yeah, it's really here— it's a unique identifier, but I guess if I look up wallet, it's going to say you can probably have more than one.

00:17:34 - Rion Gull

Yeah, this is probably going to take you down not a relevant path regarding—

00:17:41 - Anthony Campolo

That GPT gave a pretty good answer.

00:17:44 - Rion Gull

But let's go back to the— I think there's a concepts section in the documentation.

00:17:52 - Anthony Campolo

Okay.

00:17:53 - Rion Gull

And that might be a better conceptual overview, which is what you seem to be looking for. And just so that everybody knows, I'm trying to test the documentation as much as the code in these livestreams. So I want to be able to have people find their answers without—

00:18:13 - Anthony Campolo

Yeah. All the information is in the docs. It's just hard to find. Like, the docs are pretty comprehensive, but they're not easy to navigate.

00:18:22 - Nick Taylor

Yeah, well, I think one thing is, as a user of just like searching a site in general, typing something in here should definitely bring me somewhere relevant for what I'm looking for. Like, when I put in wallet, like you said, there's information about wallet, but it's not like— maybe have a like intro to wallet because this is just like how you fund it and stuff. But like, I mean, I think most people understand the concept of a wallet, but just I'm getting back to my question about the identity and the wallet. So, um, but okay, so you're saying glossary, scroll down the left-hand navigation, and see.

00:19:02 - Rion Gull

So we're in the tutorial right now, and then there's explanations, and under explanations there's identity. So maybe that might be a better approach.

00:19:13 - Nick Taylor

Okay, yeah, so again, like, it's identity so we can identify each other. Um, identities are separate from names. That makes sense because I could have like a vanity name or a username like Nikki T Online, but my actual account is linked to my actual identity. Um, just because it's typically not— I don't think people memorize their identities or wallet IDs usually. Maybe they do, I don't know. Okay, cool. Yeah, so it consists of one or more public keys recorded on the platform chain that can be used to control the user's profile and sign their documents. Each identity also has a balance of credits. Okay, so that's where I'm confused already because the identity saying it can have credits makes me think it's a wallet now. But also maybe credits here is a different type of credits. What is this? Oh, that's weird. That didn't bring me to—

00:20:24 - Rion Gull

Yeah, I think it's one of those weird links that it's just going to pop, do a little—

00:20:29 - Nick Taylor

Oh, it's an anchor tag. Yeah, it's in the page down below. Okay. Yeah. Okay. Oh, yeah. Uh, credits are the mechanism for paying fees that cover the cost of platform usage. Once the user locks Dash on the core blockchain from its ownership, create a top-up credit. Okay, so to me, at least from reading this, it makes it sound like the identity really is the wallet, which I find confusing because I know it's not.

00:20:57 - Anthony Campolo

Yeah, so here's part of the problem. Understanding the difference between the wallet and the identity is something that's pretty specific to the difference between Dash itself and then the Dash Platform and what the difference between those two are. So the wallet is what lets you just transact and have money, and that's like Dash itself. That's the main thing.

00:21:17 - Nick Taylor

Oh yeah, yeah, yeah, yeah.

00:21:18 - Anthony Campolo

Okay, yeah. The platform thing is where we have identities which are going to allow us to create documents, which are going to allow us to persist storage, and allow us to create things like dApps and all that kind of stuff. So I don't think that explanation is anywhere in the docs.

00:21:31 - Nick Taylor

Yeah, okay. Yeah. So, like, wallet is like a physical wallet, whereas my identity is— think of it as like one of the credit cards in the wallet. But the wallet, since the wallet doesn't physically exist, it needs an address. And that's why wallets have an address. And your identity— I don't know.

00:21:51 - Rion Gull

Yeah, they're very similar concepts. They're all based on public-private key pairs. And whether something is a wallet or— the term wallet itself can be confusing because everybody uses it somewhat differently. For example, I think of a wallet as the 12-word phrase because that's what derives your—

00:22:20 - Nick Taylor

Okay.

00:22:20 - Rion Gull

That's what you can derive your public-private key pairs from. But some people think of wallet as like a public-private key pair itself, and other people might think of a wallet as like the user interface that takes in a 12-word phrase or a public-private key pair.

00:22:39 - Anthony Campolo

Or it gets more confusing because you have the 12-word phrase and then you have the address, and you can create multiple addresses in your wallet.

00:22:46 - Rion Gull

Yeah, so maybe what I'm getting from this conversation is it might help to have right off the bat— and maybe it is there and maybe we just missed it in the intro section because that's where it would be— but something that shows like the hierarchy of these terms and these concepts where— yeah, 12-word phrase that you use to derive this and that, which is used to derive this and that. And then on the platform side, you have the 12-word phrase, in addition to deriving wallets or driving public-private key pairs that are associated with funds— they also can derive identities, which can then derive other things that are related to wallets as well. So I'll make note of that and we can move on. But go back to—

00:23:45 - Anthony Campolo

Yeah, last thing to say on this also is that I don't think this is just a Dash problem. This is, I think, a blockchain-wide problem, which is like it's really hard to just explain things in a simple way that lets you get it. Like, it's really— and I've worked with a lot of blockchains, and it's really only through actually going through a tutorial, and by the time you get to the end and then do it a second time, that you actually have a framework where you can kind of put everything in. It's really hard to just give a high-level explanation of this tech because it's so specific and works in a very specific way.

00:24:18 - Nick Taylor

Yeah, yeah, yeah.

00:24:20 - Rion Gull

Okay, so I don't know if you finished with the identity paragraph. Yeah, we should finish that paragraph and then we'll move on to continuing with the tutorial because that might make things a little bit more clear.

00:24:36 - Nick Taylor

Yeah, uh, yeah, yeah.

00:24:40 - Rion Gull

Okay, yeah, each identity also has a balance of credits. Yeah, that's a— no, that's blocking layer 1 funds.

00:24:47 - Nick Taylor

That, that makes sense to me. Um, so let me—

00:24:52 - Rion Gull

Yeah, let me explain that one just a little bit further conceptually, just because it is kind of an important concept. And, you know, we've discussed that we have two blockchains. Um, the proof-of-work blockchain, that's where you're getting funds. So the way that we got testnet proof-of-work Layer 1 blockchain funds is from that testnet faucet. That's how we originally got the Layer 1 funds. Now, when we want to convert Layer 1 funds to the platform chain, which is a completely different blockchain but happens to use the same— well, it doesn't even use the same funds per se. What it does is you can do a transaction on the Layer 1 proof-of-work blockchain that locks funds. It locks funds on the Layer 1 blockchain and says these funds are no longer usable.

00:25:58 - Anthony Campolo

Okay. Okay.

00:26:00 - Rion Gull

And by doing that, you also unlock a certain amount of funds on the proof-of-stake chain. And that's what this whole process— when it says credits, it means Dash that is living on the proof-of-stake chain. And has a certain denomination that we'll get into a little bit. But credits are Dash. They're a denomination of Dash. So you can think of like— you could have dollars in your wallet, and then if you give that to some kind of— you give that to a bank and then they give you 100 1-cent pieces back. Like, that's the difference between Dash and credits— it's just the same money, but it's in a different form, on a different chain, with a different denomination. So that'll hopefully make a little bit more sense as we get through the examples as well. But there's—

00:27:01 - Nick Taylor

Okay, so the credits freezing on the proof-of-work and then having funds accessible on the proof-of-stake is kind of the way of exchanging them, I guess?

00:27:13 - Rion Gull

So there's the same transaction that you can do in reverse where if you want to take your platform credits— the Dash living on the proof-of-stake chain— and convert it back into the Dash that's living on the proof-of-work chain, then you can do a transaction to do just that and move those funds back. So I'll have to think about better ways to explain that, but that's basically what's going on.

00:27:40 - Nick Taylor

Cool. All right, let's get back here and I'll just get my editor back up. Okay, so we got the identities. I have two, and Anthony said he wasn't sure why. I wonder if that's somehow from the last tutorial that didn't work.

00:28:00 - Anthony Campolo

Maybe, I don't know. It could have been because we created a fresh wallet at the beginning.

00:28:05 - Rion Gull

Okay, yeah, I'm a little surprised by that too, but that's because I haven't played around with this that much. That's why we're doing this series.

00:28:13 - Nick Taylor

Okay. So, okay, so this one seems pretty self-explanatory to me. We're gonna create a script called top-up identity. So we're gonna put some Dash in there, I guess. So let's go ahead and copy this. Okay, let's paste that in. So just gonna look at this real quick. So another async function importing from the client API. So we're getting the wallet account and then getting the identities associated to it. Then we're looping or iterating over all the identities we have. And this is a testnet, so I guess I'm allowed to give myself— is that a billion? No, sorry, that's 10 million Dash, I guess, I get to top off. That's pretty sweet for a livestream. Not too bad.

00:29:15 - Anthony Campolo

Those are not Dash, they're Duffs. A Duff is like a Satoshi, which you don't know what that is either, so that doesn't help.

00:29:20 - Nick Taylor

I've heard of Satoshi. He's the supposed creator of Bitcoin, but I guess there's a coin named after him too?

00:29:28 - Rion Gull

So Anthony, just real quick, are you sure that the 10 million is a Duff value or is it a credits value?

00:29:39 - Anthony Campolo

I thought credits are Duffs.

00:29:41 - Nick Taylor

Let's see here.

00:29:43 - Anthony Campolo

I explained this specifically in my blog post, so go back over to the blog post and either scroll up or down.

00:29:48 - Nick Taylor

It's—

00:29:49 - Anthony Campolo

there's a specific explanation for this.

00:29:51 - Nick Taylor

Okay, here. So, okay, okay, 100 million.

00:29:55 - Rion Gull

Go ahead and read it out. I'll read it all out so that, you know, we don't have to rush through this.

00:30:01 - Nick Taylor

Yeah, yeah, okay.

00:30:02 - Anthony Campolo

Yeah.

00:30:03 - Nick Taylor

All right. So it says when an identity is created, a special— here, I'll just make this a bit bigger. Might as well. Boom. So when identity is created, a special transaction transforms Dash into credits, which are used to interact with the Dash platform. One Dash is equal to 100 million Duffs. Is that like Duffman from like The Simpsons? Just curious.

00:30:26 - Anthony Campolo

That's what I thought.

00:30:27 - Nick Taylor

That's exactly what I thought. Dash's version of Satoshi, which is I guess a lower value coin. And 100 million Duffs is equal to 100 billion credits. Since interacting with Dash platform applications decreases your credit balance, at a certain point you need to top off the balance by converting some Dash to credits. And that makes sense, like if you're using it—

00:30:52 - Rion Gull

I just described—

00:30:53 - Nick Taylor

yeah, yeah, okay. And if you're working with a dApp, a decentralized application, right? That's what that stands for. Uh, yeah, decentralized. Thank you. Um, yeah, so it makes sense we have to throw some credit to use it. Um, okay, so we're gonna run the top off here. Let's go back down here.

00:31:15 - Rion Gull

Before we do that, let's open the— did we get a blockchain Layer 1 blockchain explorer working for us?

00:31:24 - Nick Taylor

Uh, which one was that?

00:31:25 - Rion Gull

Which shows the balance of the address that we've funded.

00:31:29 - Nick Taylor

Uh, okay. Oh yeah, uh, we were there before. It's here, I believe. Yep.

00:31:36 - Rion Gull

So let's see how much we have in this address so far, or at this point.

00:31:43 - Nick Taylor

So it says, uh, 4.1712 Dash. This is when we created it.

00:31:50 - Rion Gull

Surprising because it has a final balance of zero.

00:31:53 - Anthony Campolo

Just refresh it. This is old, I think. Okay, it should have been confirmed by now.

00:31:58 - Nick Taylor

There we go, 7.62.

00:32:00 - Rion Gull

Okay, still has zero balance for some reason, so that's going to be—

00:32:05 - Anthony Campolo

I think that might be an error with the UI. This happened to me when I was using this the other day.

00:32:10 - Rion Gull

Oh, you're kidding.

00:32:11 - Nick Taylor

You mean it's not, uh— you mean it's— like, it's okay? No, it's got zero in the markup. You mean it's just calculating something wrong client-side or the APIs?

00:32:22 - Anthony Campolo

If it was zero, we wouldn't have been able to create the identity, so it can't be. Okay, as we know for a fact, it's not zero. That's why I say all this stuff is broken, man. Your whole deal is broken.

00:32:33 - Nick Taylor

Well, this is the summary up top, but can we see the individual transactions? Like, there's 10 confirmations.

00:32:39 - Rion Gull

Yeah, scroll down to the bottom. The bottom will be the earliest transactions. Let's just kind of follow this.

00:32:45 - Nick Taylor

Okay, so the 4 is the initial one when I created the account. Um, this I don't know.

00:32:53 - Rion Gull

So what's this here? 6,240 confirmations is way long ago. So the address that we're looking at, let's make sure that this is the address that you own and it's not like some—

00:33:06 - Nick Taylor

Oh yeah, yeah, other—

00:33:08 - Anthony Campolo

I feel it.

00:33:10 - Rion Gull

Yeah, I wonder if YZPZ— okay, there, YZPZ at the end. Okay, so that is your address.

00:33:21 - Anthony Campolo

Uh, that's the identity, Nick. Sorry, that's the identity.

00:33:26 - Nick Taylor

Oh yeah, yeah, sorry, sorry, sorry.

00:33:29 - Rion Gull

Um, so your wallet address is that, but how on earth could we have a wallet address that we just created have some activity 6,000 confirmations ago.

00:33:43 - Anthony Campolo

Nick, you dropped the wallet in the chat just so I can— yeah, try. I want to try searching this on the regular old Explorer, not this other one.

00:33:54 - Nick Taylor

Yeah, okay. And well, uh, the confirmations are what exactly? That's like the chain just saying this transaction is valid, and then there's a bunch of nodes that confirm?

00:34:07 - Rion Gull

Confirmations is how many blocks have occurred since a certain date.

00:34:14 - Nick Taylor

So, oh, okay, certain action.

00:34:16 - Rion Gull

So this is saying this tran— this is a list of transactions that we're looking at, and the very earliest activity on this is, you know, 6,240 confirmations or blocks ago. And as you can see, that's June 3rd. We haven't done anything. We should not have had any activity on this until today. So why we're seeing something from June 3rd, I don't know. Uh, so scroll— any ideas, Anthony? Scroll up to— let's see what the first thing was that happens today instead of June 3rd. So just scroll up a bit on this. Are you— oh, you're muted, Nick. Uh, go ahead and scroll up on that page.

00:35:11 - Anthony Campolo

Nick, you're muted. Yeah, I cannot unmute him, I think. Oh, cannot unmute your guest, their mic isn't connected.

00:35:19 - Rion Gull

Oh, he's having some technical issues, so. So any ideas on this, Anthony? I mean, I'm just like, I think it's a bug in the code somewhere.

00:35:32 - Anthony Campolo

I mean, this isn't the actual Explorer, this is this weird extra Explorer on this different link, which probably means there might just be a bug in the code somewhere. The way it's reading in the blockchain, it's getting messed up somehow. I mean, like, I remember there's like a— used to show me there was like a status page, and the status page said it was like November or something, so it could be a similar thing, you know. Nick, we still can't hear you.

00:36:13 - Rion Gull

He's talking for some reason. I wonder if he can hear us. That's the question. Okay, I think he probably bailed on purpose to reconnect. Let's see what the private chat says. Okay, that's just you.

00:36:28 - Anthony Campolo

Yeah, I think we should just keep going through the tutorial and not worry about this.

00:36:31 - Rion Gull

Okay, I mean, yeah, I was looking at this so that we could see the actual when you did that transaction to see how much was taken out. But anyway, on the top of transaction. But yeah, we'll— when he comes back, we'll just keep going through the tutorial. We'll forget the conceptual stuff.

00:36:55 - Anthony Campolo

'Cause part of the issue is that there's this weird separation between, you know, the Dash and the Dash Platform. So if we just stay in Dash Platform world, create an identity, create documents, like that's the point of this tutorial. So I think we're going out of scope by trying to worry about all this other stuff.

00:37:10 - Nick Taylor

So I think we're going out of scope, I think, by trying to worry about all this other stuff.

00:37:11 - Rion Gull

So Nick says he'll be back in a second, not sure what happened. While he's gone, just so you know, if you haven't seen yet, Anthony, there is a proposal up. And if you could bring, share your screen for a minute, this might be interesting for viewers, and you if nobody else. Um, bring up your website. Share your screen and then go to dashcentral.org. This is somewhat relevant to this conversation, that's why I'm bringing it up. Now go to budget. Uh, yeah, so these are all the active proposals. Not all of them are budget proposals, most of them are proposals requesting funding, which is how the Dash Incubator is funded. But this one at the very top here, Evo Accelerated Release Schedule, click in there. This is a proposal by Quantum Explorer, Sam Westrich from Dash Core Group, basically asking the network— telling the network, we're basically at a point where we could actually launch platform on mainnet instead of testnet. But there would be, you know, if we do it now, then there would be some features that would be missing that we wanted to put in the version 1 that goes to mainnet. But there would also be a little bit higher degree of risk that there might be a platform halt, like a chain halt. But nothing that should jeopardize the stability of the Layer 1 blockchain or steal funds from platform. And part of it is that you won't be able to withdraw your funds from platform, but at least we could get it on mainnet. So the reason that that's relevant to today's discussion is all of these issues that we're seeing with like block explorers not working and not reliable. And those would all kind of go away once we get to mainnet because—

00:39:30 - Anthony Campolo

Exactly, that's what I'm saying. I feel like it's kind of out of scope for us to really worry about too much right now. Yeah, because it'll just work itself out. So this is cool. So what— when it says accelerated release schedule, what does that mean? How accelerated? What would the actual schedule be?

00:39:47 - Rion Gull

Yeah, so it's in here somewhere in the text, we'll find it. It's not a long proposal, so we should be able to find it pretty quickly. I think it says, let's see, middle July. So the paragraph right above the underlined bolded text.

00:40:10 - Anthony Campolo

That would be tight.

00:40:12 - Rion Gull

Yep. So basically like a month from now, it would be— I would say that that's going to be end of July. But that would be nice because then we wouldn't have to deal with these testnet issues that are unrelated to what we're doing.

00:40:31 - Anthony Campolo

Yeah.

00:40:31 - Nick Taylor

Hey, what's up?

00:40:32 - Rion Gull

Hey, Nick, welcome back. Perfect timing.

00:40:34 - Nick Taylor

That was really weird. My internet didn't go down, but my USB headphones and mic just— they just died.

00:40:43 - Rion Gull

they just died.

00:40:44 - Anthony Campolo

Well, not died, but it just— do you go to your settings real quick and make sure you're going through the right mic right now? You sound kind of echoey.

00:40:51 - Rion Gull

I think that's probably the issue. He's on a different mic now because that one wasn't working. I would guess this should be okay now.

00:41:00 - Anthony Campolo

There we go. Yeah, stuff.

00:41:02 - Rion Gull

All right, let's get back in business.

00:41:04 - Nick Taylor

All right, back into the decentralized matrix.

00:41:08 - Anthony Campolo

All right, so let's, um, did you run the top-up identities yet?

00:41:15 - Nick Taylor

Yeah, I ran that. So, all right, cool. Uh, just gonna take Discord off the screen because we don't need that there. Okay, yeah, I ran the top-up, but we— and then we were just looking at the, uh, I'm gonna have—

00:41:27 - Anthony Campolo

Yes, let's just go back to the tutorial and go forward with the function, whatever function is after top-up identity. Okay, so I did top up. I don't know. Run the retrieve identities one again and then we can see what you're at. Okay. And then while that's going, you can kind of scroll to the next section after top-up identities in the blog. Okay. This is a good place to get to because this is where I think the identities makes more sense once you understand how it connects to the name.

00:42:06 - Nick Taylor

Okay, so, okay, this output— that's from the top-up identities that already happened. Okay, so we'll create this file. Let me just open up another tab. Okay, and let's exit that. Okay, cool. And then I'm just gonna pop this here and register. Cool. Why did it—

00:42:35 - Anthony Campolo

Sorry, so that's a little bit—

00:42:37 - Nick Taylor

Oh yeah, .env.

00:42:38 - Anthony Campolo

This is for your .env. So this is whatever name you're going to want to give yourself.

00:42:43 - Nick Taylor

So, um, all right, uh, let's go, uh, Jake Peralta or Pontiac Bandit. Anybody, uh, watch Brooklyn Nine-Nine?

00:42:57 - Rion Gull

The reference?

00:43:00 - Nick Taylor

Sorry, yeah, it's a TV show I really liked. Uh, okay, so let's just check on the script here. Okay, that's still running.

00:43:09 - Anthony Campolo

I'm not sure if you could have underscores in your name. I know you can do dashes.

00:43:15 - Nick Taylor

Okay, if that's the case, I would suggest that the tutorial not have them in it.

00:43:20 - Rion Gull

Well, we could see what happens when it doesn't work.

00:43:23 - Anthony Campolo

Yeah, let's find out if it works then. Yeah.

00:43:25 - Nick Taylor

All right, fire it up. Hashtag YOLO. Let's do this.

00:43:28 - Anthony Campolo

Yeah.

00:43:29 - Nick Taylor

Okay. This is still running in terms of retrieving identities.

00:43:32 - Rion Gull

So the retrieving identities is forever slow. Got to make a note of that.

00:43:37 - Nick Taylor

Cool. Okay. So we're going to register a name here. I'll just read through the code here. So we've got the my identity ID, which is coming from my environment variables. We get the unique identity on the Dash network, and then I decide on a name, and this creates— it registers my name.dash. That's not for a file name, is it? Or is that just a syntax for a name registration? And then here, okay, we're just going to say view on the block explorer. Okay.

00:44:15 - Anthony Campolo

And then I can see my name, and that will be my ID, which comes from .dash is because— do you remember a couple of years ago when everyone had like ajcwebdev.eth in their Twitter handle?

00:44:30 - Nick Taylor

Okay. Yeah. Got you. I was getting confused. I thought this was a template string issue, but this is actually the property on the object, $id.

00:44:43 - Rion Gull

I do believe so, yes.

00:44:45 - Nick Taylor

Okay, cool. Let's just go check on— this is still running the retrieve identities. It ran faster last time. I'm not sure why it's slower now, but okay. Well, just okay. Anyways, this is going to— am I able to register my name even though the retrieving identities is happening? We'll just let that do its thing.

00:45:10 - Anthony Campolo

Cool.

00:45:11 - Nick Taylor

Let's come here and let's go register name. Alright, boom. Okay, we'll let that go and— oh, okay, there we go. Let that go. It should output my label. Is that what it's going to do?

00:45:58 - Rion Gull

Let's go ahead and open that Platform Explorer again. Go to the main page. Let's see if there's activity on— yeah, okay.

00:46:16 - Nick Taylor

So just go to the homepage, uh, yeah, okay.

00:46:23 - Rion Gull

And let's, let's see, go to the transactions and just let's see if—

00:46:32 - Nick Taylor

Okay, I thought those were links there, uh, trending data. Okay, here. Yeah, okay.

00:46:38 - Rion Gull

Identity create. Um, I wonder if that was us that did that. 6:13. So there's documents batch. I wonder if that's all of our transactions.

00:46:53 - Nick Taylor

I'm just gonna go see in the terminal. Yeah, okay, okay. So it looks like the retrieve identities finished.

00:47:01 - Anthony Campolo

Yeah, so I need to fix this in the post. It's just because my environment variable brain just writes everything with underscores, but it only accepts characters, numbers, and dashes. Dashes cannot be at the beginning or end of the name. There's a regex constraint that runs on what's showing right here.

00:47:22 - Rion Gull

That was a good error. That was an error where we expected an error and it happened.

00:47:27 - Anthony Campolo

Yeah, exactly. Yeah, I'm gonna push that fix right now.

00:47:31 - Nick Taylor

So the regex can bring you to your knees. All right, noted. Okay, um, all right, so yeah, so we got the— do I need to do anything with the retrieved identities? Do I need to just copy that array, or was it just more informational?

00:47:45 - Anthony Campolo

No, this is just— I wanted to see the balances and see how they changed, but we don't really know what they were beforehand because you keep clearing your terminal.

00:47:55 - Nick Taylor

All right. Little trash talk, but I'll take it. Okay. So we looked at the explorer. Okay. So I should I go to my— like this says document here. So, like, what is this document specifically? Because, like, I know, is that a specific block on the chain?

00:48:16 - Anthony Campolo

We should actually get— we should rerun the register name function, get it actually working. And then that will output the link for you. Then we can explain it. So just go fix your label.

00:48:26 - Nick Taylor

Yeah, it's running right now.

00:48:28 - Anthony Campolo

Oh, it's already running? Okay, cool.

00:48:30 - Nick Taylor

Yeah, and I'll just get out of this one here. Okay, cool. Yeah, so okay, we'll let that finish. Um, just gonna go back to the tutorial for a sec. But so, okay, so when I go to it—

00:48:43 - Rion Gull

Well, because that's running and there's nothing we can do to make that any faster. Yeah, it is.

00:48:51 - Anthony Campolo

Yeah, so just click that link. All right, there you go. Here we go.

00:48:54 - Nick Taylor

Cool.

00:48:55 - Rion Gull

Okay, so you are on the network. Good.

00:49:00 - Nick Taylor

Jake Peralta. All right, cool, we did it. All right, so yeah, I guess so— identifier, this is like my kind of network name, and this is just like a label to make it easier, kind of like a URL redirect like you were saying, like JakePeralta.dash would go to my block explorer or address or—

00:49:25 - Rion Gull

Um, well, this is okay. So I— we should probably keep going with the tutorial before I talk too much longer about everything. Uh, let's just see how far we can get and then we'll circle back and answer questions.

00:49:40 - Nick Taylor

Yeah, sounds good. Cool. All right, so we got some data back. We did the retrieve. Let's do retrieve name. Let's copy that. I will not clear the terminal for Anthony. Cool.

00:49:59 - Rion Gull

Also, hopefully the tutorial— I think the tutorial does answer the question that you may have been asking there. Anthony's tutorial usually tells you what you're doing or what you just did.

00:50:12 - Anthony Campolo

Kind of, it depends.

00:50:14 - Nick Taylor

All right, cool. Uh, let's see here, let's come back here. Okay, we've got that. Let's do npm run retrieve name. Just gonna hide that. Okay, cool. All right, let's let that run. And so looking at this, it's going to take our label, which is Jake Peralta. It's going to say go and resolve that, I guess, network address, which is jakeperalta.dash— like you were saying, kind of like the .eth. And then it found me. And this is my— no, that's not my identity. That's not sure what that is.

00:50:59 - Anthony Campolo

I don't think that's your identity ID.

00:51:03 - Nick Taylor

Oh, is it? Yeah, okay.

00:51:04 - Anthony Campolo

I think so, yeah.

00:51:05 - Nick Taylor

I'm confusing it with in the .env with— I'm confusing it with the wallet address. That's why.

00:51:13 - Anthony Campolo

Uh, yes, that's why I say as you go on, hopefully it should become more clear what the difference between the identity ID and wallet ID, wallet addresses.

00:51:21 - Nick Taylor

Okay, cool.

00:51:22 - Rion Gull

Owner— yeah, I see there is a little bit of an issue there because one's called identity ID and one's called owner ID. Same string.

00:51:30 - Nick Taylor

Yeah.

00:51:30 - Rion Gull

String.

00:51:32 - Nick Taylor

Yeah, I'd say in terms of like when you're talking about the docs and stuff, Ryan, just keeping the uniform naming would definitely help. But, uh, okay, but that makes sense. Owner identity. Okay, and let's continue. So we got all that information and we can go view it on the block explorer. We saw that before actually. So we don't need to do that. Okay, so data contract on the platform serves as a blueprint for the structure of data that an application tends to store on the network. Okay, yeah. Contract validates stuff. It's the same thing as a smart contract, right? Saying contract is equivalent to saying smart contract, or is smart contract a specific chain term?

00:52:28 - Rion Gull

It's kind of a more specific— most contracts are smart contracts in blockchain world and Web3 world, but Dash is doing different things. We have data contracts, but you can— so instead of like a smart contract has both methods and properties on an object, you can think of it as that, where you have execution and you can perform functions with a smart contract. With a data contract, it's just data. So if you're thinking of it in terms of an object, you just have data fields, no methods. There's no concept of execution in data contracts.

00:53:11 - Anthony Campolo

You just can't have a bug where you accidentally can siphon off all your funds to someone else.

00:53:16 - Nick Taylor

It's awesome.

00:53:17 - Rion Gull

Okay, it's— yeah, so the difference is instead of a cloud Lambda function— that would be like the Web3 version of a cloud function would be a smart contract. The Web3 version of a decentralized database would be Dash Platform. So we are just doing a decentralized database, we're not doing decentralized cloud functions.

00:53:46 - Nick Taylor

Cool. All right, I'm registering the contract. I got the contract ID back, which is good. Um, and then it'll show us the contract registered. And imagine this is the definition of the contract. So the contract documents— I'm assuming this is a standard structure for a contract, or is this the part of a contract where— well, I guess the properties are the thing that can be whatever you want.

00:54:15 - Anthony Campolo

See if this makes sense to you just reading the code.

00:54:18 - Nick Taylor

Yeah. So there's the— this doc has a note of type object and the object has the properties message and it's strongly typed. It's a string and it's the first position. And I guess the in the block in the chain, which is the contract, I'm guessing. Kind of like a memory.

00:54:40 - Anthony Campolo

I'm not entirely sure what the position means, actually.

00:54:47 - Nick Taylor

I feel like it would be kind of like old school—

00:54:52 - Rion Gull

Position is something that was literally just added like a few days ago to these documents.

00:54:59 - Anthony Campolo

So I actually asked somebody about this before we got on the stream because this code was written over 2 months ago, though. It was in the docs somewhere.

00:55:12 - Rion Gull

Yeah, we'll skip the position part because neither of us really know what it is.

00:55:16 - Anthony Campolo

Basically it's just an object that has a message. The message is type string. This is a hello world example.

00:55:24 - Rion Gull

Yeah, yeah. And even further up the chain there, note is something that you define. So, you defined that this is going to be a contract that holds notes.

00:55:37 - Nick Taylor

And— okay, okay.

00:55:38 - Rion Gull

Note is of type object and has these properties where you have a message that's of type string and so forth.

00:55:47 - Nick Taylor

Okay.

00:55:47 - Rion Gull

So, this is JSON schema validation, basically.

00:55:51 - Nick Taylor

Okay. So, here is whatever you want it to be. And you're saying there's no methods on here. It's just properties. Because you can't, I guess, because it's immutable. But when you— if you create the contract— so here we're saying it's a note and it's an object and it has— so note.message is a string. How do you— if this doesn't have methods, how do you— maybe this is further down in the tutorial, but how do I set the message then?

00:56:19 - Rion Gull

So the platform itself, the thing that's the chain side of this whole process basically has CRUD operations. You can create these things. You can edit these things. You can update them. You can delete them, depending on how you set up your properties initially. So initially, you can actually make it like— this can't be deleted, or this can't be updated. But you can optionally make it that it can be updated and deleted.

00:56:50 - Nick Taylor

So, you can—

00:56:52 - Rion Gull

the blockchain itself is performing the CRUD operations. The user can't define methods at this—

00:56:59 - Nick Taylor

Yeah, okay, okay. So if I were to put new data on, like, let's just say I have a note-taking dApp and I want to create a new note, uh, I'm going to say go get me this contract and it has this shape of an object and I can basically say use that as the template to actually do the CRUD operation? Like, the contract will validate to say, like, I want to go add a note, and it's going to go check the contract and go like, oh, that's an invalid note, you didn't put a message. Like, that's basically what it's doing?

00:57:33 - Rion Gull

Yeah, yeah, that's the chain side or the server side validation will allow or not allow that.

00:57:41 - Nick Taylor

But all right. The register contract worked, but I don't know why the script isn't finishing. I'm just going to stop it for now, but just mentioning that in case that's an issue. Okay. So we're going to go and create a retrieve contract script.

00:58:04 - Anthony Campolo

Did you put the contract ID in your .env?

00:58:09 - Nick Taylor

Nope, not yet. All right, um, so we created the retrieve contract. Cool, let's copy this. Again, it's gonna just get the contract that we just created, so the note object in that particular contract. Let's go ahead and run this.

00:58:44 - Rion Gull

Anthony, just a quick note for you and the tutorial itself, maybe we should edit note to like my note or something so that it's obvious that it's like a user-defined field kind of thing.

00:58:58 - Anthony Campolo

But I think I'll just include an explanation. That will make that clear.

00:59:07 - Nick Taylor

Okay. That ran. Okay. We got an error. Or what's this say? Okay. So, yeah, we're getting a TLS error.

00:59:20 - Anthony Campolo

I think there was a point where we were supposed to edit our client. Okay. Did we not get to that yet?

00:59:30 - Nick Taylor

Um, I don't think— well, it wasn't in the steps because I've been literally going through here. So like we hit data contracts. Yeah, no, there was nothing about altering the client before retrieving the contract. Okay, the register contract worked. It's just this is just at the retrieve contract point now. Um, I can scroll down a bit to see if it mentions something about—

00:59:56 - Anthony Campolo

No, no, that's— that's the different— we're gonna update the client with our document ID, I think, is—

01:00:04 - Nick Taylor

Okay, so I'm just gonna paste this error in the private chat if you—

01:00:09 - Anthony Campolo

Well, yeah, what it's just saying is that it's the— there is no output. Yeah, for the— we're running retrieve contract right now.

01:00:20 - Nick Taylor

Um, yeah, it's saying not permitted. I don't know why I'm not permitted. But, um, and then this is just a JavaScript error because obviously it returned— it can't read the JSON because there's nothing to read. So that's just a side effect error.

01:00:40 - Anthony Campolo

Yeah, I've had issues with this specific function in the past.

01:00:44 - Rion Gull

So, um, retrieveContract—

01:00:47 - Anthony Campolo

This one's—

01:00:47 - Rion Gull

let's do what all great programmers do and just try it again.

01:00:51 - Nick Taylor

Yeah, that's what I'm doing. I'm burning a candle beside me, you know, pouring one out. Uh, cool. All right, so same thing, same error.

01:01:03 - Anthony Campolo

Um, so, okay, okay, let's just get past this one because this doesn't really do anything. This is just to read back the contract that you created, so it's not really important. And I've had issues with this in the past, so let's just go to update.

01:01:23 - Nick Taylor

Contract. Okay, and before we do this, um, okay, so we're going to get the contract schema, which is note. That's the freeform JSON that we had in there in the contract to decide how we wanted the shape to be. And once we get that note, it looks like we're going to add an author property to enhance the contract. And then the existing data contract, we're going to set the document schema to note again. And okay, that's the document schema there. And then it's just going to update it. So yeah, okay, so literally just adding an author field. So let's just copy that. And this is— I mean, this is blockchain stuff, but I'm just reading JavaScript. This is like just CRUD stuff happening. That's— yep, even if you weren't doing blockchain, that's pretty straightforward, I think.

01:02:21 - Rion Gull

Yeah, that's the whole point, is that we want to make contract and blockchain decentralized app development as easy as developing a traditional app.

01:02:35 - Nick Taylor

Okay, so we've got the same TLS error now.

01:02:41 - Rion Gull

Okay, interesting.

01:02:45 - Anthony Campolo

So what I'm thinking right now is, um, when you created the contract, we got the ID back, but then it was kind of hanging and you cut it off at the end. So I don't know if that may have messed anything up, but—

01:02:59 - Nick Taylor

Oh, okay, for like a bunch of minutes.

01:03:02 - Anthony Campolo

Yeah, could we find the contract on the Platform Explorer?

01:03:06 - Nick Taylor

Uh, didn't look. So let's, um, so the Explorer, is it the same Explorer? Uh, this one?

01:03:16 - Anthony Campolo

Yeah, so just go to scroll up to or open up the hamburger and go to data contracts and then just append it to the end. Or actually, it should be right there at the top.

01:03:31 - Nick Taylor

Not found. Okay. So it didn't create it.

01:03:34 - Anthony Campolo

Sorry. No. I mean, just put it in the URL.

01:03:36 - Nick Taylor

Oh, okay. Gotcha. I thought it was gonna search for it. Okay. So it gives a 404. Okay. So that makes sense. So it—

01:03:51 - Anthony Campolo

Check your URL.

01:03:52 - Nick Taylor

Double check. Here's data contracts slash—

01:03:59 - Anthony Campolo

Yeah, could you copy paste what you're doing, right? I can't read any of your things. Your URL is so freaking tiny.

01:04:05 - Nick Taylor

Yeah, that I can't zoom in here. Let me— here, I'll do it here.

01:04:08 - Anthony Campolo

Could you just copy paste what is in your URL right now?

01:04:12 - Nick Taylor

Yeah, here, I'll paste it in the chat. You can see it. Um, it's definitely 404-ing.

01:04:20 - Anthony Campolo

Um, okay, so that means the contract wasn't actually created.

01:04:26 - Nick Taylor

Okay, so we can run that again. So the problem was, because it was hanging for like a good 5 minutes, so even though it spit that out, it didn't necessarily— maybe it hadn't finished.

01:04:38 - Rion Gull

Maybe we need to try to create a contract again.

01:04:41 - Nick Taylor

Yeah, let's do that. Okay, uh, all right, and I'll just comment this out. Uh, npm run create contract. Oh, whoops.

01:04:57 - Anthony Campolo

Yeah, not— yeah, I see exactly what the issue is, because if you look at the code, it creates the contract, it console logs contract ID, and then it awaits contracts.publish, then it console logs contract registered. So we didn't wait for that part, we cut it off too soon. Yeah, okay.

01:05:14 - Rion Gull

The contract ID, in other words, is not something that the chain gives you back, it's something that can be client-side derived, and so it can give you the contract back without actually having registered it.

01:05:28 - Nick Taylor

Okay, so to be clear, that was my bad, but it was hanging for like a good 5 minutes, so there's something on the network. Yeah, so it did it again, and it looks like—

01:05:40 - Anthony Campolo

Yeah, just— oh, wait it out.

01:05:42 - Nick Taylor

Yeah, and it gives it— go ahead, go ahead. I was just going to say, is it normal it gives the same contract ID?

01:05:51 - Rion Gull

Um, that's a good question.

01:05:52 - Anthony Campolo

I don't know if it's, um, I don't know if these contract IDs are deterministically— if it's just hashing the content hash, it shouldn't change if it's just doing that. I'm not sure if it is. I'm not sure where that comes from, but that's what I would guess. It'd be like IPFS, you always get the same hash back. Your content doesn't change.

01:06:14 - Rion Gull

Yeah, it would probably give you a different one if you were registering the exact same document data schema, but from a different identity. I would guess it would be a different contract. If it wasn't, that would be a problem because then two people that wanted to create the exact same contract from different IDs would have the same contract and that would be a problem.

01:06:41 - Nick Taylor

Yeah, yeah. Um, so we'll let this run. I don't know how long it's going to take.

01:06:47 - Anthony Campolo

Um, well, so we're getting close to the end of our time.

01:06:52 - Nick Taylor

Yeah, so, so basically, uh, we'll wait for the contract to get created. There's the retrieve contract just to show that it's there, and then we're going to update it with the new author field. Um, that all seems pretty straightforward. I think it's just, yeah, just waiting on the network.

01:07:12 - Anthony Campolo

Uh, so it says here if you're updating an existing contract, the identifier will stay the same but the version of the contract is incremented.

01:07:19 - Rion Gull

Okay, that doesn't really answer the question that we had. So, Mikhail, if you're still listening, uh, I was wondering if two completely separate people with completely separate platform IDs try to create the exact same data contract, meaning it has a note and each note has a message, blah blah blah, and all that schema data is the exact same, would it have the same contract ID? Um, that's what I would guess would be different, but we'll see if Mikhail has anything to say about that. By the way, that comment that just came up, that's the guy that made the Platform Explorer. So if we have any—

01:08:01 - Nick Taylor

Okay, yeah, yeah. I know. Well, I think there's just the things that you were mentioning, Anthony, like the calculation for the total and the summary. Initially there it was zero, even though there was— well, there was something going on with the totals from like when the identity there got topped up. That's the only thing I can think of, but cool.

01:08:30 - Rion Gull

Yeah, so if you're listening still, which you are, um, is it supposed to— like, does it usually take this long for you when you're creating— what are we doing here?

01:08:41 - Nick Taylor

We're, uh, creating a contract, the sample with the note.

01:08:46 - Rion Gull

We're coming on 5 minutes now, right?

01:08:47 - Anthony Campolo

Things like the retrieve identity were also going really slow, so I think it might just be the network itself just moving at this speed today.

01:08:54 - Nick Taylor

Yeah, but we made a lot more progress than last time, obviously. At this point, I'm going to assume once this finishes, I'll be able to retrieve the contract and then I'll be able to update it. I know we don't have a lot of time left, but we can just show that again. So if we go to register contract, like you were saying, Ryan. So this is where you define what your contract is going to have in terms of data. And so in our case, in the tutorial, we're just saying we just want a note, and it's an object, and then it's got these properties. And this is the type— we weren't sure what position was— and additional properties false. Does that— what does that mean exactly? Because we updated the contract. Well, we didn't do it yet, but we're adding author to it. So I'm curious what additional properties false means, because I would have thought reading that, that means that you can't change this contract. That's what it kind of reads like to me.

01:09:59 - Rion Gull

Um, yeah, that's definitely not what it means.

01:10:03 - Anthony Campolo

Uh, go back to your client real quick, or this is— sounds like this is an issue with—

01:10:08 - Nick Taylor

Oh, finished.

01:10:09 - Anthony Campolo

Oh, it came out. But real quick, I want to make sure we're on the same page here with Mikhail. Go to your client and show the synchronization part. So this is—

01:10:21 - Nick Taylor

We have—

01:10:21 - Anthony Campolo

So is this, um, skip synchronization before height? Yes. So we've got that set. He's giving us a slightly different number, but it's still pretty close.

01:10:29 - Nick Taylor

Okay.

01:10:31 - Rion Gull

Yeah, so that shouldn't be the reason that it's slow because we have done that. Coming back to this comment here, the execution of the SDK hangs because it syncs the transaction of the seed phrase from the first to the latest. That I would guess, you know, you can skip any amount of blocks to make it faster. I don't know exactly how to do that in this context, but all right, so you said that it did finish.

01:11:02 - Nick Taylor

Yeah, and I'm just retrieving the contract.

01:11:05 - Anthony Campolo

We should look at it on the Platform Explorer.

01:11:08 - Nick Taylor

Yeah.

01:11:10 - Anthony Campolo

And then I might want to just call it here. Is this it?

01:11:16 - Nick Taylor

Here it is. Okay. Still gives a 404.

01:11:23 - Anthony Campolo

You should be able to just click the link in your terminal that it spit out.

01:11:27 - Nick Taylor

Okay.

01:11:27 - Anthony Campolo

Yeah, just click, just go straight to that. There you go. Okay.

01:11:31 - Nick Taylor

I don't know if it matters, but it's data contract here, but I think before it was data contracts in the Explorer. But anyways, okay. So identifier— so if we look, that's the contract there. The owner, this is my identity. System— I'm assuming that false means that it's from user land, it's not the network that created this contract, because I'm assuming there's probably network-specific ones. Uh, creation date makes sense.

01:12:07 - Rion Gull

I'm not sure about that, but I think that is true. So like, for example, the name that we registered, where you registered that funny name— that itself is a contract. So that's one of those core blessed contracts, I believe. It's called DashPay. And registering a name to DashPay is probably would be a system contract.

01:12:38 - Nick Taylor

So— Okay. And we got documents count is zero because we've created the contract but nobody's actually created data with the contract yet?

01:12:47 - Rion Gull

That's probably the next step in the tutorial, just to create a document against that schema, against that.

01:12:52 - Nick Taylor

And yep, and in terms of revision, this is what like Mikhail was saying, uh, I ran it again, so it looks like it tried to create it a second time, so that's why there's one revision maybe. Okay, cool. Um, yeah, okay, so let me just run the update contract real quick. Uh, I imagine it'll go pretty quickly because the retrieve went quickly, or maybe not. But, um, but yeah, I know we're wrapping up here, so I don't know if you wanted to take us out, Ryan or Anthony.

01:13:23 - Rion Gull

Um, how far do we have left in the tutorial?

01:13:27 - Anthony Campolo

Um, I mean, if we don't dally too much in the next one, we should be able to get through it in one more episode. We need to still write to the contract and then create the whole backend and frontend with Express and React. Oh, okay.

01:13:42 - Rion Gull

So there's plenty of stuff to do then. Let's cut it off here. We'll make a Part C from this series if Nick's willing to come back again.

01:13:50 - Nick Taylor

Yeah, yeah, no, I'm good to hang. Like I said, it's just interesting exploring other technologies. So try to keep an open mind. I know there's a lot of people that are not fans of blockchain right now. Not that I'm like an avid lover of it, but I think it's still worth it to explore these things. I think it's—

01:14:13 - Anthony Campolo

And you've actually owned crypto before, which helps.

01:14:16 - Nick Taylor

Yeah, no, I do own crypto right now. Yeah.

01:14:21 - Anthony Campolo

Cool.

01:14:22 - Nick Taylor

All right, so it did update the contract. So that's at 3:59. So we can just show that that happened.

01:14:29 - Anthony Campolo

And then hold on to this project so that when we do our next one, we can go right where we were with the same .env and everything.

01:14:37 - Nick Taylor

Well, yeah, uh, okay, let's do that. Let's do, uh, git— uh, did you create a .gitignore? Yeah, I did, I believe. Uh, hold on a sec. All right, cool. Well, I guess we can take it out here. Uh, I think I've got your .gitignore you put there. Okay, cool.

01:14:57 - Anthony Campolo

Great.

01:14:57 - Nick Taylor

Uh, git init, git add. Okay, all right, cool. Yeah, I think we're good.

01:15:07 - Anthony Campolo

Great.

01:15:08 - Rion Gull

All right, well, yeah, thanks, Nick, and we will pick this up in a Part C and hopefully get through. It's going to be a race from here on out because we've got some other people that are other developers that are going to come on. We'll see who has to go till C to finish the tutorial and who gets through it with just an A.

01:15:30 - Anthony Campolo

Yeah, on Friday— who gets that? Yeah, on Friday my buddy Noah is coming in to do this, who's actually the person who got me working at a blockchain company in the first place. So he knows a lot about blockchain, so it'll be fun to have him on because he'll just blast through this, hopefully.

01:15:45 - Rion Gull

Yeah, and in case that wasn't clear, definitely not Nick's fault that he's on B and then soon to be C on this series.

01:15:52 - Nick Taylor

Definitely, I'm just a C, folks. Couldn't be an A, sorry.

01:15:57 - Rion Gull

Yeah, those are the letter grades that you get after the end.

01:16:02 - Nick Taylor

Yeah, yeah.

01:16:03 - Rion Gull

All right, uh, thanks everybody for watching. Um, Anthony, you alluded to it, but we'll be on tomorrow to have another developer try this out, for tomorrow, right? Uh, what time is that going to be, Anthony?

01:16:17 - Anthony Campolo

Oh, I'm in time zone land right now, so let's see. Um, I've got your—

01:16:25 - Rion Gull

It's gonna be 11— 10 o'clock your time, so that's um, that's noon Eastern time, I believe. Um, okay, something like that. Anyway, um, yep, tomorrow.

01:16:40 - Nick Taylor

Cool. Later, everybody.

01:16:42 - Anthony Campolo

All right, bye.

On this pageJump to section