skip to content
Video cover art for Dash Platform Walkthroughs Part 7b - Niles Salter
Video

Dash Platform Walkthroughs Part 7b - Niles Salter

Niles Salter continues his Dash Platform walkthrough with Anthony Campolo and Rion Gull, creating an identity, registering a contract, and building React UI.

Open .md

Episode Description

Niles Salter continues his Dash Platform tutorial walkthrough with Anthony Campolo and Rion Gull, working through identity creation, contract registration, and building a React frontend.

Episode Summary

In this second walkthrough session, Niles Salter picks up where he left off in the Dash Platform tutorial, moving from conceptual discussions into hands-on command execution. The session covers creating an identity on the Platform, exploring the Platform Explorer, topping up identities with credits, registering data contracts, and performing CRUD operations on documents. Throughout the process, the trio encounters numerous performance issues and hanging commands, troubleshooting along the way by switching DAPI addresses, examining SDK versions, and identifying a capital-letter inconsistency in the package.json scripts. Anthony explains the relationship between Layer 1 wallets and Platform identities, the meaning of credits as denominations of Dash, and the distinction between state transitions and reads. The walkthrough culminates in setting up an Express backend and a Next.js React frontend that fetches identity data through a custom endpoint. The episode closes with a forward-looking discussion about the upcoming July 29th mainnet launch, the tradeoffs between maintaining a separate JavaScript SDK versus wrapping the more feature-complete Rust SDK with WasmBindgen, and Niles's potential involvement in that work.

Speakers

  • Anthony Campolo
  • Niles Salter
  • Rion Gull

Chapters

00:00:00 - Recap and Setting Up the Identity Creation

The session opens with Anthony and Rion welcoming Niles back for the second part of his walkthrough, briefly recapping the previous stream where they covered Dash's dual blockchain architecture conceptually because the testnet was down. Anthony reads from his ChatGPT-generated show notes summarizing the prior session's discussion of consensus mechanisms and platform features.

The team confirms that Niles already has testnet funds and his environment is properly configured with a mnemonic and address. They prepare to run the create-identity command, which Anthony notes is typically the longest-running command in the tutorial. The command takes around 20 seconds to execute, after which Niles copies the resulting identity ID into his .env file before proceeding.

00:04:57 - Exploring the Platform Explorer and Understanding Credits

After successfully creating an identity, Niles follows the link to the Platform Explorer, a separate block explorer specifically for Dash Platform rather than the Layer 1 chain. Anthony explains that the Platform is where concepts like identities, documents, and data contracts exist, distinguishing read operations from state transitions, which write to the blockchain.

The discussion turns to the credits balance displayed for the new identity, with Rion explaining that credits are a subunit of Dash, with one billion credits representing a small fraction of an actual Dash unit. Anthony agrees the displayed numbers are unwieldy and suggests adding an intermediate unit display to the Next.js frontend of the explorer to improve user experience. Niles spots his identity glyph in the top identities list, joking about his newfound fame.

00:09:30 - Troubleshooting Hanging Commands and Package.json Inconsistency

The retrieve identities command hangs indefinitely without returning results, prompting concern about whether the issue lies with Niles's local computer or the network. Anthony notes this behavior is unprecedented across previous walkthroughs, particularly because retrieval commands typically reuse functions from working commands. They decide to skip ahead to the top-up identity command, which Anthony explains throws credits into all available identities to ensure the tutorial works regardless of how many identities a user has accidentally created.

While running the top-up command, they discover an inconsistency in the package.json file where one script uses a capital U while others use lowercase. Anthony recalls that someone, possibly Niles himself in walkthrough 8 or 9, had previously pointed out this inconsistency, leading to a fix in the blog post that was never reflected in Niles's older local copy. The lighthearted blame-trading concludes with Anthony admitting it was indeed his fault.

00:20:14 - Register Name Failures and Local Network Discussion

Niles attempts to register a name on the platform, encountering more hanging commands. Rion mentions hearing from xkcd that the SDK may be resyncing the chain on every command and that adding a storage adapter for local caching would help. Anthony questions why the existing client synchronization setting doesn't already serve this purpose.

The conversation shifts to whether running a local network via Docker would resolve these issues, but Niles isn't certain his Docker installation is currently configured. Rion mentions that documentation for setting up local networks is forthcoming. Anthony speculates that running Linux might be a contributing factor since most Dash developers use Macs, though he acknowledges this is largely uncharted territory for the tutorial.

00:27:31 - Skipping Ahead and SDK Version Investigation

While Anthony spins up his own wallet in parallel to troubleshoot, the group decides to push forward through the tutorial commands that work reliably. Niles successfully registers a data contract, retrieving the contract ID for use in subsequent steps, though the retrieve contract command predictably hangs.

Rion notices Niles is using SDK version 15, which they've never tested before, and suggests downgrading to 12 or upgrading to 16. A brief technical disagreement erupts between Anthony and Rion about whether the SDK version matters relative to what the network nodes are running, with Anthony arguing that semantic versioning only applies within a single piece of software's own history. They settle on version 16, with Niles deleting the package-lock.json and node_modules before reinstalling to ensure a clean state.

00:38:51 - DAPI Address Workaround and Document Submission

Anthony provides Niles with a specific DAPI IP address that he confirmed working on his own machine, having pulled it from a previous Travis video. Niles adds it to his client.js configuration under the network setting, which finally allows commands to complete successfully. Anthony successfully registers his own name in parallel, demonstrating the fix works.

With the network connection stabilized, Niles proceeds to submit a note document containing a hello message, then updates and deletes it through the standard CRUD operations. Anthony reflects that going through the tutorial repeatedly while it breaks in unique ways has given him deep confidence in what his code actually does. The discussion briefly diverts into Niles's frontend framework experience, revealing his work with Roact (a Roblox-specific React-flavored library) and more recently Vue.

00:54:50 - Building the Express Backend and Next.js Frontend

Niles creates an Express server with a name endpoint that returns identity information when queried via curl. After encountering a malformed JSON error trying to retrieve his own unregistered name, Anthony shares the name he successfully registered earlier so Niles can complete the test, returning real platform data through the endpoint.

The tutorial concludes with scaffolding a Next.js application using TypeScript and the default options, then replacing the boilerplate with code that fetches data from the Express backend. After updating the hardcoded name reference, Niles renders the working application showing platform identity data with a fetch button and a loader, which executes too quickly to actually display. The CSS gradient effect earns an ironic compliment about its UX design quality.

01:04:34 - Debugging Approaches and the SDK Future

Rion asks Niles how he would approach debugging the performance issues independently, prompting Niles to outline his methodology: cataloging which commands run quickly versus slowly, adding instrumentation for input/output and timing data, and using a profiler if needed. He confirms familiarity with attaching debuggers in IDEs through F5 in JavaScript environments.

The conversation transitions to the upcoming July 29th mainnet launch, which will move Dash Platform from testnet to production with core version 21 and platform version 1.0. Rion explains the strategic question facing the project: whether to invest in fixing the JavaScript SDK or to wrap the more feature-complete Rust SDK using WasmBindgen for browser environments. Critical missing features in the JavaScript SDK include proofs, which provide cryptographic verification that retrieved data is legitimate without requiring trust in the validator node.

01:13:03 - Wasm Wrapping Discussion and Closing

Rion gauges Niles's interest in potentially working on wrapping the Rust SDK for browser environments using WasmBindgen. Niles admits he hasn't done this specific type of work before but is willing to research and follow instructions, noting his familiarity with reading Wasm even though he hasn't set it up in a browser context himself.

Rion observes that Niles seems comfortable at the lower levels of these systems, suggesting an offline conversation to explore his potential involvement further. The stream ends at 01:14:37 with thanks to the 38 viewers, acknowledging that many are likely Twitter scrollers rather than active watchers, and a promise to return for future walkthroughs.

Transcript

00:00:02 - Anthony Campolo

All right, we're back for part 7B with Niles.

00:00:05 - Anthony Campolo

Welcome back, Niles, our wunderkind, who we got to meet last time.

00:00:13 - Niles Salter

Thank you so much.

00:00:14 - Rion Gull

Yeah, welcome back, Niles.

00:00:18 - Rion Gull

Just as a brief recap of our last stream together, you are fairly unfamiliar with blockchains in general, or at least were before the first stream.

00:00:31 - Rion Gull

So we did a recap of, or we did an overview of what blockchains are, the Dash blockchain, the fact that Dash Platform is a separate blockchain that has a link to the Dash main blockchain.

00:00:48 - Rion Gull

So we have a proof-of-work blockchain and a proof-of-stake blockchain. They're linked together and they can transfer funds from one chain to another.

00:00:57 - Rion Gull

We discussed that conceptually, but the testnet was down for that day, so we did everything just reviewing code and whatnot.

00:01:10 - Rion Gull

But today we're going to jump into actually doing the commands. So let's go ahead and get your screen share up.

00:01:18 - Rion Gull

Last time we did start the tutorial, we got the wallet going.

00:01:27 - Anthony Campolo

The AutoShow said we did. So we covered various aspects of Dash's architecture, including its dual blockchain system, consensus mechanisms, and ongoing development of platform features.

00:01:38 - Rion Gull

Oh nice, that's what your ChatGPT show notes script gave us?

00:01:45 - Anthony Campolo

That's part of it, yeah. I cut off the end actually.

00:01:47 - Anthony Campolo

So it concludes with plans for future exploration of the Dash ecosystem and potential contributions from Niles. Can't forget those.

00:01:54 - Rion Gull

Okay, cool. Yeah, so we'll jump into— we did get the testnet funds, and so that part's taken care of already.

00:02:04 - Rion Gull

So let's add your screen to the— yep. And pull up the blog post, and we'll just continue on, or basically start the actual commands.

00:02:17 - Anthony Campolo

Real quick, can we just look at your code, including your .env and your client file, just to make sure everything is where it should be for where we're at in this point in this tutorial.

00:02:27 - Anthony Campolo

Yeah, so those both look good. So we got your mnemonic in. Okay, and then check your .env.

00:02:34 - Anthony Campolo

Yeah, so everything's good there. Yeah. And then go to your .env file real quick.

00:02:42 - Anthony Campolo

So we got testnet, we got our address and mnemonic. Okay, cool. So you should be good to run the create identity command, and then we'll go from there.

00:02:52 - Rion Gull

Yep.

00:02:53 - Niles Salter

Okay.

00:02:56 - Niles Salter

And okay, let me see, where were we in this?

00:03:01 - Anthony Campolo

So go further down past the pictures and then past the create identity and then right there, run npm— a little too far. So go back up a little bit.

00:03:13 - Anthony Campolo

Yeah, a little bit more. Right there. So npm run create-identity, that's the one you got to do.

00:03:22 - Anthony Campolo

Because after this, this is where we'll be at the— this will give you a link to a different block explorer. It'll be for the Platform Explorer and not the Dash Layer 1 explorer.

00:03:33 - Anthony Campolo

So this is just for the platform. And because the platform is where things like the identity concept entirely exists, and documents and data contracts and all this stuff, that is actually the point of this Dash Platform.

00:03:50 - Anthony Campolo

Which is why it's always really funny it would break at this point, because this is the point where it's like you would do all this throat clearing to get to the point of having an identity so you could actually use the freaking platform.

00:04:05 - Anthony Campolo

But that is the kind of the life of a blockchain person. So it's a whole lot of startup cost.

00:04:17 - Niles Salter

It's taking a little bit. How long do you expect this one to take?

00:04:21 - Anthony Campolo

At least 20 seconds usually. So this is about correct. This is probably the longest command.

00:04:28 - Anthony Campolo

Again, being like the first one to get you started, very inconvenient one. So there you go, you're good.

00:04:35 - Anthony Campolo

So first, before you click that, copy the identity ID and get it in your .env file so we don't forget this step.

00:04:43 - Rion Gull

The whole line.

00:04:44 - Anthony Campolo

The whole line. Yeah. Bam. Okay, now follow that link.

00:04:57 - Rion Gull

And then Niles, if we have time in this show, since we got a little bit of a head start since there was a previous one, I would like to circle back after we get as far as we get and look at this create identity,

00:05:15 - Rion Gull

look at the code that's actually running when we're doing that. And we'll see if we can together discover what is causing the slowness there.

00:05:32 - Niles Salter

Okay. So yeah, I'm sorry, I missed it. What are we looking at on this page? This is my identity.

00:05:40 - Anthony Campolo

So this is the Platform Explorer, and this is basically— so if you go to transactions, click that.

00:05:49 - Rion Gull

And zoom in a couple more if you could.

00:05:51 - Anthony Campolo

Yeah. Yeah, so this is breaking down specifically what is your identity and then what are the different state transitions that happen.

00:06:03 - Anthony Campolo

So creating the identity is what's called a state transition because it's basically like a write on the blockchain versus a read.

00:06:10 - Anthony Campolo

A read would not be a state transition. So if you just retrieve your identity, then you will not be changing anything, but you're creating identity, you are actually writing something.

00:06:21 - Anthony Campolo

So this is what's happening there. Is that the whole thing? Or are you able to scroll down anymore?

00:06:27 - Niles Salter

Oh, this is it.

00:06:28 - Anthony Campolo

Okay. So try clicking the identity— yeah, click that. That'll just take you back to where you were, right? Does that make sense?

00:06:39 - Niles Salter

Okay, yeah. So that's my identity.

00:06:41 - Anthony Campolo

Yep.

00:06:42 - Niles Salter

Or the identity of the transaction.

00:06:44 - Anthony Campolo

So this is your identity on the left, and then the different things the identity is doing, like a transaction or a transfer or creating a document, that's on the right.

00:06:53 - Niles Salter

Gotcha.

00:06:54 - Rion Gull

And you'll notice there in the previous screen that you've got a balance that's denominated in credits. Who wants to look at the number of zeros there? Is it—

00:07:09 - Niles Salter

It's a billion.

00:07:10 - Rion Gull

It's a billion. Okay, so that is a— you can think of that as like a subunit of Dash. So it's a billion credits.

00:07:20 - Rion Gull

1,000 credits is the smallest unit of Dash, and there are 100 million of those units in one actual unit of Dash. So that's how many credits.

00:07:35 - Anthony Campolo

We need to pick up an intermediate unit that we can also display here just for everyone's sanity, because that's such a large number— it's just like forces everyone to all of a sudden have to use scientific notation to do anything.

00:07:49 - Rion Gull

Yeah, and because that identifier is taking up so much space anyway, maybe we can ask Mikhail to write in parentheses that 1 billion credits is X number of Dash.

00:08:02 - Anthony Campolo

Yeah, that's actually a change I could even make. I know it's a Next.js frontend, I could do that.

00:08:09 - Rion Gull

Yeah, yeah, exactly.

00:08:15 - Anthony Campolo

Yeah, totally. I don't know, that would be super useful. That's a good idea. Something like that. All right.

00:08:25 - Rion Gull

Moving on.

00:08:28 - Niles Salter

Okay, going to go back. So yeah, I got the identity ID.

00:08:38 - Niles Salter

Okay. So was that the same one we were just on? That's a different one.

00:08:51 - Niles Salter

Okay, so yeah, do you want to do this?

00:08:55 - Anthony Campolo

You just did that.

00:08:57 - Niles Salter

Right.

00:09:00 - Niles Salter

I can see the top identities. Yeah, I just saw my own.

00:09:05 - Rion Gull

We even have little glyphs now. That's fun.

00:09:08 - Anthony Campolo

Yeah, if you see one of the ones from yesterday, it's Claire.

00:09:11 - Niles Salter

Claire, that's me. Look at that. I'm famous now.

00:09:18 - Niles Salter

All right.

00:09:27 - Niles Salter

All right, should we do this?

00:09:30 - Anthony Campolo

Yeah, I'm 90% certain this is not going to work.

00:09:35 - Niles Salter

Should I kill this?

00:09:36 - Rion Gull

Oh, why did the process not end here?

00:09:39 - Anthony Campolo

Go back to your create identity file real quick.

00:09:45 - Anthony Campolo

Yeah, it should have disconnected once it was done. I'm not sure why it's hanging, but we know it did finish because we got all the info on the Explorer already.

00:09:57 - Rion Gull

Yeah, this ran.

00:09:59 - Anthony Campolo

Yeah. So we can kill that. It's not going to be an issue.

00:10:05 - Anthony Campolo

But what I was saying is I'm 90% certain the command we're about to run is not going to work. I'm not really entirely sure why, but the last couple walkthroughs, this one has been giving us issues, which is strange because it has functions within it that are in other commands that don't give us issues.

00:10:26 - Anthony Campolo

I'm not quite sure what to do about that.

00:10:37 - Niles Salter

Get identity IDs. Where's that?

00:10:47 - Niles Salter

And we can run it.

00:10:53 - Niles Salter

It doesn't focus me on this window when I come down. I'm a little annoyed by that.

00:11:09 - Niles Salter

Punycode is deprecated.

00:11:13 - Anthony Campolo

Yeah. It says that for almost every— no, it says that for every single Node project that I use right now.

00:11:22 - Anthony Campolo

So that's one of those dependencies that's so deep in the sauce that literally there's not a single project I use that does not use it. It's really annoying.

00:11:33 - Rion Gull

It sounds like a perfect package to exploit.

00:11:37 - Anthony Campolo

Yeah, exactly. I know, right? But yeah, there's a --no-warnings flag you could give Node to make it not give you such annoyances, like fundamental broken parts of the ecosystem, you know.

00:12:00 - Anthony Campolo

While this is running, you could probably— so when I was doing this with Rishi, every time he ran commands, he would just start doing the next file while it was running. He's such a—

00:12:12 - Niles Salter

Can we do that? Yeah, let's output.

00:12:21 - Rion Gull

Oh, duffs.

00:12:25 - Anthony Campolo

This is what we're kind of talking about in terms of the credits and the millions and billions of them.

00:13:06 - Niles Salter

Should I run this right now or should I wait?

00:13:08 - Anthony Campolo

No, it should be done now. Geez.

00:13:19 - Niles Salter

Is it slow on the network or is it slow on my computer?

00:13:24 - Anthony Campolo

Yeah, this is a little excessive. And the fact that the last one just kind of hung forever makes you think it might have something to do with your computer.

00:13:32 - Anthony Campolo

But it's hard to say because we don't really get the observability that we would need to say right now.

00:13:39 - Anthony Campolo

We would need to instrument the commands to somehow be separating your own compute time versus the network time, which I'm sure in theory is possible, but I would need to do research to figure out how to do.

00:13:55 - Anthony Campolo

But this command is just reading back the identity we already created. So honestly, we should probably just cut this one off if it doesn't eventually execute and just go to the top-up identity, because the top-up one is important because that actually has ramifications on future commands.

00:14:14 - Niles Salter

Okay. Do you want me to kill it?

00:14:17 - Anthony Campolo

Let's let that run for just a little longer while we look at the top-up command and explain what's happening there, because conceptually it's important to know what this command is actually doing.

00:14:28 - Anthony Campolo

So what it does is it gets your wallet with the get wallet account, and that sets its wallet account, and then it gets your identities with get identities IDs.

00:14:37 - Anthony Campolo

So that's the only thing the other command is doing— is getting identity IDs, just trying to loop over them and display them, which for some reason is making an issue.

00:14:47 - Anthony Campolo

But with this one, we're also then topping up each identity with a certain amount of credits.

00:14:52 - Anthony Campolo

So I wrote this— it just throws credits into all of your identities. You may have multiple ones.

00:14:57 - Anthony Campolo

It's not necessarily a good thing to do if you actually have real money and you want to be using a specific identity for a specific thing.

00:15:04 - Anthony Campolo

But for this tutorial, I did this because there's ways in which, if you're not following along exactly, you may have like created multiple identities and not necessarily realized it.

00:15:13 - Anthony Campolo

So this ensures that you're always going to have identities ready to go with some money in it and kind of just like blast it out from your Dash wallet into each identity.

00:15:22 - Anthony Campolo

And that's what the credits are— it's a way to offload your Dash from your Layer 1 wallet into your identities, which are on the Dash Platform.

00:15:33 - Niles Salter

Okay, so your Layer 1 wallet versus the Dash Platform. So that's what this line is doing— you have two different identities in the two different spaces that you just said.

00:15:47 - Anthony Campolo

That is for logging them in the— yeah, that's just for the console logging.

00:15:56 - Niles Salter

Oh, this is for the information about the identity.

00:15:59 - Anthony Campolo

Yeah, because the command above that, the await client.platform.identities.topup, that's the top-up command itself.

00:16:08 - Anthony Campolo

Yeah, and so that's looping over. So you already have each ID from the for loop happening.

00:16:17 - Niles Salter

Okay, well, let's check on our other command here.

00:16:20 - Anthony Campolo

Yeah, so let's kill that.

00:16:21 - Niles Salter

It's still going.

00:16:25 - Anthony Campolo

And then let's run the top-up and see what happens.

00:16:37 - Anthony Campolo

Yes, when we did this with Claire, we had an issue with the retrieve identities.

00:16:46 - Rion Gull

I think we— did we put the script in the— oh, the U.

00:16:49 - Niles Salter

Oh, the U.

00:16:51 - Anthony Campolo

Oh yeah, we haven't. No, no, we haven't. So go to your package.json.

00:16:59 - Anthony Campolo

We do have all of them. But oh, yeah— so I think at one point one got changed to have a capital U versus lowercase u possibly.

00:17:11 - Anthony Campolo

So make sure that— yeah, that's what it looks like.

00:17:13 - Niles Salter

Yeah, so this has to be capital. And I could change it over here too, I guess.

00:17:29 - Niles Salter

So yeah, that's an inconsistency. That's weird. Wait, hold on. So it's fine in here, but inside of here it was wrong.

00:17:41 - Anthony Campolo

I don't think that's what's happening in the actual— I'm looking at my blog post and they're all the same. So at one point I think you just typed one yourself.

00:17:55 - Niles Salter

I don't think I typed this. It's from the package. Where did I get the package.json from?

00:18:03 - Anthony Campolo

From the tutorial also. Yeah, I'm not sure, but there's been two other people who've gone through this who were also using the copy buttons and this didn't happen. So at some point I think you just wrote it out.

00:18:14 - Anthony Campolo

But it's fine. We know what the issue is now.

00:18:20 - Niles Salter

What in the world? Wait, how did that happen?

00:18:26 - Anthony Campolo

That's a good question. I don't know.

00:18:29 - Niles Salter

Look at that. Yeah, how did that happen? I don't understand. That's crazy.

00:18:36 - Anthony Campolo

Actually, no, I think I know why. Because you went over this so long ago, this was before— you were using an older version.

00:18:45 - Anthony Campolo

So someone pointed this out to me in walkthrough either 8 or 9, and then it was actually— might have been you who pointed it out.

00:18:57 - Anthony Campolo

So someone pointed out that there is an inconsistency there, that we should be using capital U instead of underscore u because it's a different word.

00:19:07 - Anthony Campolo

So I then went back and changed it. So it's been consistent in the blog post, but your two walkthroughs were not consistent across the same blog post.

00:19:18 - Niles Salter

Gotcha.

00:19:19 - Anthony Campolo

Yes.

00:19:20 - Niles Salter

So it was your fault is what I'm hearing.

00:19:23 - Anthony Campolo

Sounds like a you issue.

00:19:26 - Niles Salter

Oh, really? Okay.

00:19:29 - Niles Salter

Okay, I got the results for that. Top-up identities.

00:19:45 - Anthony Campolo

Yep. So we just need to run the top-up identity command correctly, right? Or did we do that already?

00:19:52 - Niles Salter

Which I did.

00:19:53 - Anthony Campolo

Okay.

00:19:57 - Niles Salter

Great. This is my output.

00:19:58 - Anthony Campolo

Yeah, when it went super fast— and so like I'm saying, it's essentially doing the exact same thing the retrieve command did, but with a couple extra things. So it doesn't make any sense why one would crap out with the other one. But anyway, let's keep going.

00:20:14 - Niles Salter

Okay. So we got a register name. And it says we want to put this inside of our environment.

00:20:37 - Anthony Campolo

It can't be a space. It has to be a dash.

00:20:39 - Niles Salter

It has to be a dash. It has to be a dash on dash.

00:20:44 - Anthony Campolo

Yeah, there's a link to the naming constraints also, which explains stuff like that. But it's a little too much to put in the blog post itself. Zoom way up.

00:21:08 - Niles Salter

Anyways, let's go back. Let's make a register name, and then we run it.

00:21:43 - Rion Gull

You can go ahead and hide that little bar at the bottom. There's a hide button there.

00:21:50 - Niles Salter

Sorry if that was bothering you.

00:21:51 - Rion Gull

That's okay.

00:21:54 - Rion Gull

So this is, again, one of those things where, you know, if we get to a point where we can circle back a little bit, I'd like to look into this and have you look into this, Niles. Have you done much JavaScript debugging?

00:22:15 - Niles Salter

Yeah, I mean, I usually don't have bugs in JavaScript. No, I'm just kidding.

00:22:21 - Rion Gull

I mean, I meant other people's codebase, of course.

00:22:24 - Niles Salter

Yeah, yeah. Yeah, a little bit.

00:22:33 - Rion Gull

Because I'm frankly not sure what the holdup here is, what's taking so long, if it's on the network side.

00:22:41 - Rion Gull

I heard somebody say something about it's resyncing the chain every time you're doing a command, and that if you have a storage adapter so that you can have local cache, then that would help.

00:22:54 - Anthony Campolo

But what is the point of the set synchronization thing in the client? That's what that's supposed to do. If that's not actually doing that, then that's a huge issue.

00:23:04 - Rion Gull

Yeah, that's why I don't understand it either. That's one of those things I want to look into. I haven't done it.

00:23:15 - Anthony Campolo

Who did you hear that from?

00:23:18 - Rion Gull

xkcd was saying something about that. Yeah. So let's move to the next step and let that run.

00:23:40 - Rion Gull

This seems to be taking even longer than it usually does on that one. Yeah.

00:23:43 - Anthony Campolo

It shouldn't take that long. Yeah, that link probably doesn't work. Whatever I created back when I wrote this may not still be there.

00:24:13 - Niles Salter

What is this data in here?

00:24:16 - Anthony Campolo

So that's what you're going to get once you create your name. So the label is what you gave your label.

00:24:24 - Anthony Campolo

And then— so what was it? Miles or Niles something. Just your name, yeah. So that's the label.

00:24:34 - Anthony Campolo

So in my blog post, it's ajcwebdev-test-2004-08, which is why I did this first— so I was back in April, that's what that date is. That's why the links probably don't work anymore.

00:24:49 - Rion Gull

Yeah, testnet's been wiped clean and restarted since then. And I have it on good information that we'll have some documentation on setting up a local network so that we can test that as well shortly.

00:25:10 - Rion Gull

But right now, we're still with the testnet, which is a little finicky.

00:25:15 - Anthony Campolo

Yeah, I mean, it depends whether he has Docker set up or not. But do you have Docker set up, Niles?

00:25:24 - Niles Salter

I don't remember if I have wiped my own computer clean since setting up Docker, honestly. I wouldn't be confident enough to just open it on this stream.

00:25:33 - Anthony Campolo

Yeah, yeah. That's the only hard requirement for getting a local network— you got to have Docker set up already.

00:25:43 - Anthony Campolo

So we'll just keep going on here, I guess. But if we can't get the name to register, I mean, I think we still create documents and all that stuff.

00:25:58 - Anthony Campolo

But the fact that it just hangs, it doesn't eventually throw an error— that makes you think it's something on Niles's computer, not the testnet.

00:26:08 - Anthony Campolo

Because this is something that's never happened before. It's never just hung forever and never returned anything. It always eventually gives an error or it works. This is totally, totally new to me.

00:26:18 - Rion Gull

Anthony, are you equipped to try to run some of this stuff in parallel?

00:26:23 - Anthony Campolo

Well, I mean, we know the network itself works. He created the identity, so it's not an issue of like, is just the network down or not. So I could just try it out.

00:26:36 - Niles Salter

Could it be a version issue? I have 22.4.

00:26:40 - Anthony Campolo

I don't think so.

00:26:41 - Rion Gull

No, that's good.

00:26:45 - Niles Salter

Well, this is still doing nothing.

00:26:53 - Rion Gull

What makes you suspect that it might be Niles's computer, Anthony?

00:26:58 - Anthony Campolo

Because this is the first time this has ever happened before. And just because he's running Linux, so that means absolutely anything could happen. I have no idea what would be a computer issue versus not a computer issue, because I don't think anyone else has run this on Linux before.

00:27:12 - Rion Gull

Yeah, that is a variable that we haven't seen before yet.

00:27:16 - Niles Salter

Really, most of your developers don't use Linux?

00:27:20 - Anthony Campolo

I don't know anyone who uses Linux, dude.

00:27:23 - Rion Gull

A lot of developers will use Linux on their VPS, but when they're developing, they're usually using Macs.

00:27:31 - Niles Salter

Oh, gotcha.

00:27:35 - Rion Gull

For better or for worse. But let's see, what can we do to kind of investigate this?

00:27:45 - Anthony Campolo

Well, so I'm trying right now just to create my own label, so I'm going to spin up a wallet and do that whole rigmarole, but that's going to take like five minutes.

00:27:54 - Anthony Campolo

So I think we should just try and create documents or try and create a data contract and see if that's going to work.

00:27:59 - Rion Gull

Yeah, let's move on to the next step, Niles, and then Anthony can do that in the background. We'll see if we can do some other commands.

00:28:09 - Niles Salter

Should I run these two commands in parallel or should I kill this one?

00:28:12 - Rion Gull

I'd go ahead and kill that one. I don't think there's— yeah, you should kill the other one.

00:28:17 - Niles Salter

Yeah, I lose my paste when I do that.

00:28:23 - Rion Gull

What shell are you using?

00:28:27 - Niles Salter

This one is Bash right here.

00:28:32 - Anthony Campolo

You should try Zsh instead.

00:28:35 - Rion Gull

Well, I don't know. I don't know if that's—

00:28:40 - Anthony Campolo

All the others you've done have been doing Zsh because Zsh is the default for Mac. But that should definitely not affect anything. But if we want full consistency, Zsh would be more consistent.

00:28:54 - Niles Salter

Yeah, I mean, it's just running this, right? Or it's just running one of these. Shouldn't make a difference.

00:29:02 - Anthony Campolo

Definitely not. The things that shouldn't make a difference frequently do.

00:29:09 - Niles Salter

Fair.

00:29:13 - Niles Salter

Cannot read properties of null. This is null right here. Or no, this is null.

00:29:21 - Rion Gull

Let's see. So sorry, what command did you run to get this?

00:29:28 - Niles Salter

The retrieve name command?

00:29:30 - Rion Gull

Yeah, it's not going to have the name yet because we had trouble.

00:29:34 - Niles Salter

Oh, yeah.

00:29:35 - Anthony Campolo

Oh, yeah. No, sorry— yes, I wasn't saying do that one next. I was saying go on to the next one after that.

00:29:40 - Niles Salter

Oh, okay. Gotcha.

00:29:45 - Niles Salter

Okay, we got a blueprint for the structure of data that an application tends to store.

00:30:11 - Rion Gull

Yeah, we won't do this either because we've seen that one— there was an update that made that not work too well.

00:30:19 - Niles Salter

Okay, but I can register a contract right now?

00:30:22 - Rion Gull

Yeah. So you can open up the register— yeah, the register contracts code and see what it's doing.

00:30:35 - Niles Salter

Okay, so we're pulling identity ID out. It's this. And then get information about our identity here.

00:30:54 - Rion Gull

Yeah, so we've seen that we've already been able to do that. It's the name we weren't able to get.

00:31:05 - Niles Salter

Okay. Do you want me to try to run this right now?

00:31:07 - Rion Gull

Yep.

00:31:24 - Niles Salter

That was quick.

00:31:25 - Rion Gull

Yeah, it'll get the contract ID quickly because that's client-side work, but it will take a little bit to finish. Are those— let's see, what are those?

00:31:41 - Anthony Campolo

That's just a—

00:31:45 - Rion Gull

Have you seen those before, Anthony?

00:31:48 - Anthony Campolo

No, never seen it before.

00:31:50 - Rion Gull

Interesting. But it does say that the contract registered and it finished the script. So that all worked.

00:31:59 - Rion Gull

Just out of curiosity, what version of the SDK are we using? If you go to your package.json file.

00:32:09 - Niles Salter

15. We've never used 15 before. How did it do 15? That must have been the latest version at the time of our last stream.

00:32:19 - Niles Salter

That may be why we're having some issues.

00:32:24 - Anthony Campolo

Possibly.

00:32:26 - Rion Gull

Because we've never used 15 before. Let's change that to either 12 or 16. Do you remember which one we've had best luck with, Anthony, 12 or 16?

00:32:40 - Anthony Campolo

12 is in here. I haven't noticed any real difference between the two yet. That has been consistent. I can say for sure worked on 12 and not on 16. But we just kind of went with 12.

00:32:53 - Rion Gull

The network is mostly running 12, and 16 is the latest release.

00:32:58 - Anthony Campolo

But the network is not— but this is like, we were talking about this Dashmate, because Dashmate, we could be on 12 or 16, and that's what the network is. That's closer to what the network is running, because the network isn't running the JavaScript SDK.

00:33:14 - Rion Gull

No, I know, I know, but in theory.

00:33:17 - Anthony Campolo

So I just don't think that makes any sense when you say that the network is running 12. So you're saying it's running a completely different piece of software that also happens to be version 12. That's not the same thing.

00:33:27 - Rion Gull

If it were semantic versioning, it would matter. Let me put it that way.

00:33:32 - Anthony Campolo

No, it wouldn't. It only matters within its own— semantic versioning only applies to itself. It doesn't mean other things in an ecosystem at the same number need to be compatible. That's not what semantic versioning means. I know, I worked with the dude who invented it.

00:33:46 - Rion Gull

I know DCG much, much better than you do. So just calm down here.

00:33:53 - Anthony Campolo

I know what they do.

00:33:55 - Rion Gull

All right.

00:33:58 - Niles Salter

Okay, so yeah, do you want me to change this dependency here?

00:34:04 - Rion Gull

Yes.

00:34:22 - Anthony Campolo

He's defying you.

00:34:45 - Niles Salter

So do you want to retry the step that we missed?

00:34:50 - Rion Gull

Yeah, I think we probably should.

00:34:55 - Rion Gull

Did you— and do we have to— sometimes seems like you do and sometimes you don't— but the package lock, do we have to blow that away before we do the install?

00:35:09 - Anthony Campolo

Yeah, I always do that. I also usually delete node_modules too. Yeah, that'll take longer to reinstall them, so you can probably just blow away the package lock.

00:35:23 - Niles Salter

Before what? I'm sorry.

00:35:26 - Rion Gull

So delete node_modules and the package-lock.json and then do the install. Because if it's been too long since I've done this myself— I've just noticed when I was developing that if you don't change your package lock, even if you change your package.json, if your package lock is still there, then it will just install the old one in the package lock.

00:35:51 - Niles Salter

Gotcha. Yeah. So yeah, do you want the 12 or the 16 version?

00:35:58 - Rion Gull

I think let's go with 16.

00:36:03 - Niles Salter

Let's do it.

00:36:06 - Rion Gull

In theory, 16 should be all the good things from 12 minus the bad things from 12.

00:36:20 - Anthony Campolo

Yeah, because I think the times that we were messing around with different versions and stuff, the issues were really more so just because there's something cracked in a couple of the commands that make them inconsistent.

00:36:34 - Anthony Campolo

And I don't think being on 12 versus 16 is going to specifically affect those. And I still have yet to actually see a point where I feel like I was confident that there was an issue that always happened on 16 that was not happening on 12.

00:36:47 - Anthony Campolo

So I think at this point it would make more sense to just go with the most recent version and see what happens.

00:36:58 - Niles Salter

Is there like a verbose mode I could turn on?

00:37:01 - Rion Gull

And you're running retrieve name, but I don't think that we ever actually did the register name. That never successfully finished.

00:37:09 - Anthony Campolo

No, we didn't.

00:37:11 - Rion Gull

So that's the one we should do next.

00:37:18 - Anthony Campolo

Too far. You went way too far. There you go. Nope. Go slower. There you go. You just went past it again.

00:37:34 - Niles Salter

You're talking about the register contract one?

00:37:36 - Anthony Campolo

There you go. Register— no, not contract. It should be register name. It's register name. Yeah. Yeah.

00:37:48 - Niles Salter

All right. Hopefully it works this time. I do think we should get a verbose mode, maybe.

00:37:58 - Rion Gull

Yeah, there may be one. I don't know.

00:38:34 - Rion Gull

Yeah, it's supposed to be— the TypeScript never got all the way through. Let's put it that way.

00:38:48 - Anthony Campolo

Rarely does, let me tell you.

00:38:51 - Rion Gull

You know, any type is just the cop-out. Like, I don't have time to do this. Let's just make it any. This is what happened.

00:38:59 - Anthony Campolo

Any type is the admission that you should have been using JavaScript in the first place. You have time to write the types, don't use TypeScript. It's totally absurd.

00:39:15 - Niles Salter

Yeah, we are still not finishing on register name.

00:39:20 - Anthony Campolo

Okay, you should go forward with the rest of the contract stuff. I'm about to try and do it.

00:39:25 - Niles Salter

Should I register contract?

00:39:30 - Anthony Campolo

I think you already did register a contract, didn't you? Did you ever save that contract ID in your .env?

00:39:43 - Rion Gull

No. We did get it, though. We just didn't copy it and paste it in there.

00:39:52 - Rion Gull

Yeah, it's in your history. Yeah. Scroll down a little bit.

00:39:57 - Niles Salter

This one?

00:39:59 - Rion Gull

Yeah.

00:40:01 - Niles Salter

And then this.

00:40:08 - Niles Salter

I hate it when it does that.

00:40:17 - Niles Salter

Okay, so we got a contract ID and then I have this information here. Should I put this somewhere, or is that just for my viewing pleasure?

00:40:27 - Rion Gull

No, that's just for your viewing pleasure.

00:40:35 - Niles Salter

All right.

00:40:37 - Rion Gull

Okay, so we registered a contract. Now let's go back to the tutorial and see what step we're on, which is going to be submitting the document. It'll probably have you get the contract as well, but we can skip that part for now.

00:40:59 - Niles Salter

Oh yeah, do we want to do this retrieve contract?

00:41:04 - Rion Gull

I mean, we can try.

00:41:05 - Anthony Campolo

Sure, that one usually works.

00:41:36 - Rion Gull

We can also try to find it on the Platform Explorer, the web app.

00:41:47 - Niles Salter

Should I change this link to this? Hey, there's me. And I have a transaction.

00:42:17 - Niles Salter

Still going in here for some reason.

00:42:27 - Rion Gull

Well, let's skip that one again. We'll move on to— we'll just do all the ones that seem to be working relatively quickly.

00:42:37 - Niles Salter

Okay.

00:43:08 - Niles Salter

So this one gets an existing contract, gets a document schema.

00:43:36 - Niles Salter

Okay, so we're updating note.

00:43:52 - Niles Salter

And then associating it with our identity inside of the existing contract. At least in theory.

00:44:22 - Anthony Campolo

Okay, so mine crapped out on creating the identity, funny enough. We were able to get through. So I switched the DAPI addresses and I'm running it again right now. Stuff is comical, I swear to God.

00:44:38 - Rion Gull

Let's go to your web browser real quick. And go to the Platform Explorer. And go to validators. Let's see if this is up yet.

00:45:01 - Rion Gull

Okay, so we have active and inactive. I was hoping for a list of IP addresses that are known to be running, but I guess that hasn't been updated yet. I think they're working on that page.

00:45:29 - Rion Gull

Can you click on those validators? If you click on that.

00:45:36 - Rion Gull

Proposed blocks, active— doesn't give an IP address. So Anthony, are you just using the IP address that we've used before?

00:45:51 - Anthony Campolo

Yeah, I just literally pulled up Travis's video, scrolled to the point in the video where we put in an IP and typed that exact one out. It's running right now. I'll know if it's going to work very, very soon.

00:46:03 - Rion Gull

Amazing.

00:46:08 - Rion Gull

Yeah, the API might be a little further ahead.

00:46:15 - Niles Salter

So yeah, you want to keep going through this?

00:46:17 - Rion Gull

Sure, yeah.

00:46:19 - Niles Salter

All right. Add an apps object to the client options. What are my client options?

00:46:28 - Anthony Campolo

All right. Okay. So here's an IP address that I got to work with a command that we already got to work on his. So we'll see if this actually helps or not. You're going to put in the StreamYard. Copy, paste. Yeah, so you're going to want to put this in your client.

00:46:52 - Niles Salter

Inside of my— I'm sorry, let me see what it is.

00:46:55 - Anthony Campolo

Yeah, so not your .env.

00:46:57 - Niles Salter

Yeah. It's going to go in my—

00:47:00 - Anthony Campolo

client.js. Client.js, very top. Yeah, and just put it right under network.

00:47:15 - Niles Salter

Okay. So this helps with what?

00:47:22 - Anthony Campolo

This lets you pick the specific network node that you're going to connect to with a specific IP address instead of just looking for one and then crapping out because it hits a bad one.

00:47:33 - Niles Salter

Okay. So which part of the tutorial should I go to now? Do you want to go back and try to keep going?

00:47:49 - Rion Gull

Let's keep going to the end.

00:47:50 - Anthony Campolo

Yeah, let's keep going for now. We'll go back.

00:47:52 - Rion Gull

Let me try and register a name while you're doing this.

00:48:13 - Niles Salter

So put that in and then network. And then put the apps in there. Okay.

00:48:34 - Niles Salter

And this contract ID, I have it. Okay, good. Okay, so we can submit note document.js. Just gonna kill it. And we run it.

00:49:08 - Niles Salter

Have you tried connecting to this IP today and it worked for you?

00:49:13 - Anthony Campolo

Yes.

00:49:16 - Anthony Campolo

Yeah, this is what I was doing in the background. I'm right at the point now where I'm trying to register a name with this IP. I was able to create the identity. I wasn't able to create the identity without it.

00:49:31 - Anthony Campolo

Oh, there we go. We got a name.

00:49:36 - Niles Salter

So you were able to.

00:49:37 - Anthony Campolo

Damn it, 2024-07-09.

00:49:42 - Niles Salter

Okay, so I did this.

00:49:49 - Rion Gull

Okay, that's great. That worked.

00:49:56 - Niles Salter

And yeah, did I want to save that output somewhere?

00:50:01 - Anthony Campolo

Just the document ID.

00:50:03 - Rion Gull

Yeah, just that.

00:50:05 - Niles Salter

In my .env?

00:50:07 - Anthony Campolo

Yep. And then you're gonna— the next step, you're gonna update. Oh, you already got that in there. Never mind.

00:50:21 - Anthony Campolo

Yeah, so let's continue on this line. Once we get to the end of these commands, we'll circle back and do the register name.

00:50:28 - Niles Salter

Okay.

00:50:32 - Niles Salter

And I'm assuming we run it.

00:50:37 - Niles Salter

Hello from Niles Salter.

00:50:41 - Anthony Campolo

There you go. You wrote to the chain. Wait, hold on.

00:50:45 - Niles Salter

Oh, yeah.

00:50:46 - Anthony Campolo

Oh, the label is coming from your .env, not from the chain. That's why that works. I was like, how did it know your name? We didn't register it.

00:50:59 - Rion Gull

Okay. I didn't know.

00:51:02 - Niles Salter

Okay. Update note document.

00:51:11 - Anthony Campolo

Yeah, the one thing that's been nice about going through this, having it break in so many interesting and unique ways, is I've become very confident about what my code is actually doing here.

00:51:46 - Anthony Campolo

What's your experience with front-end frameworks, Niles? Like React and stuff like that?

00:51:53 - Niles Salter

I haven't touched those in a long time. On my website, I actually just use vanilla JavaScript stuff, vanilla HTML and CSS.

00:52:01 - Anthony Campolo

What's a long time mean? We talking a year, three years, five years?

00:52:06 - Niles Salter

Probably five.

00:52:09 - Anthony Campolo

Wow. So were you writing class components?

00:52:16 - Niles Salter

For React, I don't think I even did that in the browser. I just did like React-flavored stuff, not React specifically.

00:52:33 - Anthony Campolo

What's React-flavored?

00:52:36 - Niles Salter

So I actually— yeah, I mean, I actually, the TypeScript that I was using, it was for a different ecosystem. And so there were libraries based on React.

00:52:49 - Anthony Campolo

Do you remember what they were called or what they were?

00:52:52 - Niles Salter

Yeah, it was Roact because it was a Roblox-specific incarnation of it. And yeah, so it wasn't for— the React flavor thing that I used, it wasn't specifically for the browser.

00:53:14 - Anthony Campolo

Oh, the Lua UI library similar to Facebook's React. Okay, so you haven't actually used React is what I'm getting at.

00:53:21 - Niles Salter

Not React, no.

00:53:23 - Anthony Campolo

Okay, that makes sense.

00:53:27 - Rion Gull

So in other words, he dodged that whole dumpster fire.

00:53:33 - Anthony Campolo

Well, he didn't, because it's right in front of him right now burning away. He's gonna have to take a big old whiff.

00:53:44 - Anthony Campolo

So yeah, this tutorial ends with you building a React frontend. So it should be as painless as possible for you, though.

00:53:52 - Niles Salter

Actually, I did Vue relatively recently, though. Because I had it for like— I did like a code test that was using Vue. I made like a little Pokémon viewer for that.

00:54:06 - Anthony Campolo

Okay, so that's more similar than probably to whatever that React-Roblox thing five years ago was. Because Vue and React, they're very similar now, especially if you write them with the most modern syntax.

00:54:20 - Anthony Campolo

So that means you do have some experience with a modern frontend. Basically, it's either React, Vue, Svelte, or Solid. If you've used any of those and you kind of got a handle on it in any respect whatsoever, the rest are— you're gonna be able to figure them out.

00:54:34 - Rion Gull

Okay. All right.

00:54:36 - Anthony Campolo

So where are we at then? Components and props and state and all that stuff.

00:54:39 - Niles Salter

Yeah, so I just did the update note document. And so now I can do the delete document.

00:54:50 - Anthony Campolo

So this is your basic CRUD commands. This is kind of like the actual hello world part of the tutorial. Once you have your identity, once you've created your contract, you can actually put storage in there, you can edit that storage, pull it back out. This is like your global database.

00:55:09 - Niles Salter

Awesome.

00:55:16 - Niles Salter

And then set up a backend server.

00:55:32 - Rion Gull

The delete document doesn't seem to be very snappy either.

00:55:39 - Rion Gull

You know what? I'm striking out. Go ahead.

00:55:44 - Niles Salter

I was going to say, I'm using a pretty good computer right now. I have like an AMD Ryzen 9 5950X inside of this desktop, which is not the latest generation, but it's Zen 3. The one that's coming out this month is Zen 5.

00:56:04 - Anthony Campolo

Well, it actually is not an actual computer processing thing. It's more so just however it's connecting to the network. And also because we're using StreamYard as well, that may be just taking up more network bandwidth on your computer.

00:56:20 - Anthony Campolo

I would say it's more likely. It affects things like installing node modules and other things.

00:56:33 - Niles Salter

Okay, so we ran all the individual scripts. And we can extend this functionality with a backend and frontend. Let's create an Express server that will return information on a given identity name.

00:56:55 - Niles Salter

So we got a server. And we create a name endpoint here.

00:57:10 - Niles Salter

And then we just start it. Okay, now it's open on localhost 3001.

00:57:28 - Anthony Campolo

Oh, this is funny. I'm just looking at the Roact documentation real quick, and it basically has you do— it doesn't have you do class components. It has you do, if you were to write React from scratch, like how to create an element, which is more like using web components, actually.

00:57:49 - Niles Salter

Yeah, I guess the Vue thing that I did more recently is probably a little more relevant then.

00:57:56 - Anthony Campolo

Exactly. I mean, this is actually good, though, because this gives you more of an understanding about what those libraries are actually doing if you go through this exercise in the first place. It's not really the way you want to actually write this kind of stuff.

00:58:13 - Anthony Campolo

Malformed JSON string. Try it without the JSON PPP part. Without the -s flag also.

00:58:28 - Anthony Campolo

Oh, so we need to actually register the name to do this part. This is trying to get your name. So we could do it with the one I just created. Let me just give you something real quick. So instead of your name, grab this from the private chat and just replace it with that.

00:58:56 - Niles Salter

Amazing name.

00:58:58 - Anthony Campolo

Yeah, I know, right?

00:59:06 - Niles Salter

So I'm just going to kill this here.

00:59:07 - Anthony Campolo

Just do your last curl command. And get rid of the quotes.

00:59:18 - Niles Salter

Whoa, we got some data. Beautiful. Okay. And they wanted us to put it into json-pp.

00:59:34 - Anthony Campolo

That's just to format the output. It's not really that important.

00:59:38 - Niles Salter

Right. Now, let's add a frontend. Could that be let's? Oh yeah. Let's add a frontend. Good catch.

00:59:51 - Anthony Campolo

Still a couple bugs in here to find.

00:59:55 - Niles Salter

Okay. Do Next.js. Would I like to use TypeScript? Yes. Do I want an src directory?

01:00:22 - Anthony Campolo

Yes. And you want basically all these. That one doesn't matter, you can say no on that one. Basically just choose the default for each.

01:00:36 - Anthony Campolo

Yeah, so Next.js is a React meta framework. It's by far the most popular, although a lot of people kind of complain about it all the time and hate it like most things in JavaScript.

01:00:50 - Anthony Campolo

We're not even really using it to any sort of extent in this. It's just to get you a frontend set up really quickly.

01:01:19 - Niles Salter

So do I delete what I had before?

01:01:23 - Anthony Campolo

Yeah, so you just delete everything and just— yeah, exactly.

01:01:33 - Anthony Campolo

Yeah, and this will just show you how to get the Next.js app itself set up. That'll run it.

01:01:48 - Anthony Campolo

And then you can pop open that if you have a localhost to open it on. Great, that's good. So this is just your shell, and then we're going to add in the logic to actually fetch the identity.

01:02:30 - Niles Salter

And then if I go back to update.

01:02:37 - Anthony Campolo

Make sure you change the name. It will have AJC Web Dev hard-coded in the code. This is like the one last thing I still need to change.

01:02:44 - Niles Salter

Okay. Yeah. So should I change that to the name that you sent me before?

01:02:50 - Anthony Campolo

Sure, yep.

01:03:10 - Niles Salter

Okay.

01:03:11 - Anthony Campolo

There it is. It's a beautiful app.

01:03:15 - Niles Salter

Beautiful. Even gets lighter as you go down. Look at that. So fancy. I bet you had like a UX master work on this.

01:03:32 - Anthony Campolo

I mean, whoever created the Next.js template— I think that's just all I did, I just kept the same CSS.

01:03:42 - Rion Gull

Okay, well, you just created—

01:03:46 - Anthony Campolo

There's one more part, technically. Make sure you have to fix the endpoint again.

01:03:58 - Anthony Campolo

Yeah, what this does is it just puts a button so that you can click that, and then you also have a little loading thing while it's actually fetching. So you got to click fetch data underneath the— yeah, there is a button in there. The CSS right now doesn't make it very clear.

01:04:20 - Anthony Campolo

So you gotta click where it says fetch data. And it pretty much— it went so fast you couldn't see the loader.

01:04:29 - Niles Salter

It's just so optimized. It's amazing.

01:04:33 - Niles Salter

All right.

01:04:34 - Rion Gull

All right, Niles, made it all the way to the end.

01:04:36 - Anthony Campolo

Nice and snappy.

01:04:38 - Rion Gull

So we're about— we're an hour and five minutes in.

01:04:41 - Niles Salter

Yeah.

01:04:42 - Rion Gull

We made it through. We had some snags. I don't think we ever got the name registering on your end, did we?

01:04:51 - Anthony Campolo

We can try. Let's just run the register name command one more time just to see what happens. I don't think we tried it since we changed that. So go— yeah, yeah, that should be fine. Just run that guy. So that'll be the last thing to see whether that works or not.

01:05:11 - Rion Gull

So Niles, while that's doing its thing, how would you debug this if you were just alone figuring out what's going on?

01:05:23 - Niles Salter

Yeah. Well, first I would probably— well, depending on which stage I actually want to debug first, I would make a note of which of the commands run fast and which don't, like we were talking about.

01:05:43 - Niles Salter

And then I would probably put a little bit of instrumentation code in to see the data that's going in and the data that's coming out, and also the time information so I can see what's taking a long time.

01:05:57 - Niles Salter

But since we're thinking it's probably something that's happening not locally that's taking a long time, I would have to dive into what code I'm calling into. And from there I'd probably want to set up like a profiler or something, or I don't know, it depends what I see there.

01:06:29 - Rion Gull

Yeah. Have you ever gone into debug mode, attached a debugger in the IDE?

01:06:40 - Niles Salter

Yeah, with JavaScript, I think typically you can just— on my computer, I can just hit F5 and it'll let me step through it. And yeah, depends how it's set up, though.

01:06:57 - Rion Gull

Now wait a minute. Did it actually run? npm run register-name, and it looks like it finished.

01:07:04 - Niles Salter

Yeah.

01:07:04 - Anthony Campolo

Yeah, that's because we put the DAPI address in there specifically.

01:07:10 - Rion Gull

I thought we tried it after we had a new DAPI address, but maybe not.

01:07:13 - Anthony Campolo

No, no, we did not. We just tried it after we changed the SDK version, but that didn't help anything.

01:07:22 - Rion Gull

Okay. Okay.

01:07:25 - Niles Salter

So what else did you want to do now?

01:07:27 - Rion Gull

I think that's probably pretty good. I think we can call it a day there. I was going to see if we could—

01:07:34 - Anthony Campolo

We've gone another 10 minutes, so specifically just to go over performance things if you want.

01:07:40 - Rion Gull

And we don't even have to do that on stream. We can just set that up as a separate task.

01:07:44 - Rion Gull

But you and I, we had talked about having you look into the JavaScript SDK. So there's two main routes that we can go to.

01:07:51 - Rion Gull

So right now the schedule is July 29th, which is coming up in three weeks. We are scheduled to move from testnet to mainnet. So we'll have binaries to launch this and have the masternode network adopt Dash Platform, meaning the core version 21 and the platform version 1.0. That's going mainnet starting July 29th.

01:08:30 - Rion Gull

Before we get to that point, we want the JavaScript SDK to be better, obviously. The network should be healthier when it's on mainnet, should be, because the nodes are incentivized. But even that, I hesitate to say that.

01:08:50 - Rion Gull

But regardless, we do have— we talked about it a little bit last time— there's a Rust SDK and a JavaScript SDK. And they're both in— if you're looking for the repo, go to platform. Up top, it's a pinned one. Yeah. And there— let's see, packages. It's a monorepo, so it's split out into different packages.

01:09:22 - Niles Salter

Okay, yeah. We have dash-js-sdk, and then we have rs— something SDK.

01:09:34 - Rion Gull

Yes. So the Rust SDK is further along feature-wise and just stability-wise.

01:09:45 - Niles Salter

Is that valid right here?

01:09:49 - Rion Gull

I'm squinting too much.

01:09:52 - Anthony Campolo

No, it's not. The zero needs to be deleted.

01:09:56 - Niles Salter

Gotcha.

01:10:01 - Niles Salter

Anyway, I just noticed the little small thing.

01:10:07 - Rion Gull

Yeah, I would have not known. That was Rust code, wasn't it? Or was it something else?

01:10:11 - Niles Salter

TOML. It's a configuration language.

01:10:15 - Anthony Campolo

This is like your package.json— it's how you get your dependencies in. For the Rust ecosystem.

01:10:22 - Anthony Campolo

I was going through these docs. I was thinking about creating another kind of getting started thing, like the JavaScript one but with the Rust one. It's funny— you've been saying the Rust is way ahead in terms of features, but the JavaScript documentation is actually way ahead of the Rust. There's almost no Rust documentation at all.

01:10:39 - Rion Gull

No, I believe that, because they're working on the code itself. And so the code for the JavaScript got set aside for coding the Rust SDK.

01:10:52 - Rion Gull

But the documentation from the JavaScript, which was the original plan that we would have a robust JavaScript SDK— but now the plan seems to be that a lot of people, some people in the community, want to just take the Rust SDK and put a wrapper on it to use as a JavaScript SDK.

01:11:15 - Rion Gull

So there will be really only one SDK, and then you'd have wrappers for every environment.

01:11:24 - Rion Gull

Yeah, there's an internal discussion about which approach we should do— whether we should fix the JavaScript SDK so that it performs better and more reliably, or whether we should just stick with one SDK, because there are several important features missing in the JavaScript SDK.

01:11:44 - Rion Gull

One of the main features missing is the proofs. So when you're retrieving data from Platform, one of the main ideas of this whole thing is that it gives you provable data that the network is storing, and this is the legitimate data that the network considers valid for certain data schemas and documents, the things that we created today.

01:12:20 - Rion Gull

When you're retrieving them from the SDK, the whole point was that they would be accompanied by proofs. Now, you don't need those proofs if you just trust the validator that you're interacting with, which is— you know, we did that DAPI address, we said this is the DAPI address that we want to connect to. So if you trust that node, then you don't need the proofs.

01:12:36 - Rion Gull

But if you don't trust the node, then you need the proofs. So that's just one example of a feature that is not even in the JavaScript SDK but is in the Rust SDK, or at least it will be soon. They just redid the proof system, so I'm not sure where they're at on that. But high level.

01:12:59 - Rion Gull

Yeah, I'll have a longer conversation with you about this, maybe offline.

01:13:03 - Niles Salter

But we got Bloom filters, too. I love Bloom filters.

01:13:08 - Rion Gull

Oh, good. Yeah, so if you know that stuff, then this is down your alley.

01:13:15 - Rion Gull

So yeah, I guess I'll discuss that with you offline, see if that's something that you're interested in looking into. Either doing the— would you know where to start with that? I guess I'll ask you that right now. Would you know where to start with, say, wrapping this Rust code so that you can put it into— using WasmBindgen, put it into a browser environment?

01:13:42 - Niles Salter

I have not done that type of thing before. But I would start with looking up how to do that, and I can follow the instructions on that. I'm not sure how many roadblocks I would encounter doing it for the first time. I really have no idea.

01:14:00 - Niles Salter

But I mean, I'm a little bit familiar with Wasm in terms of like reading it, but I haven't tried to set it up in the browser before, honestly.

01:14:12 - Rion Gull

I thought you might be. You seem to be at the lower level of all these things.

01:14:18 - Rion Gull

So anyway, we'll stop the stream there. Thanks to everybody who is watching. It shows that there are 38 of you, but I'm guessing a lot of those are Twitter scrollers. But yeah, we'll see you next time.

On this pageJump to section