Coming out of the woodwork post-Nakamoto upgrade? Come learn what's new with our devtools to prep you in your next build on Stacks. And if you're new to this ecosystem, get the lowdown on the tools you'll need to start building on Bitcoin.
Transcript
Now with the major upgrade of Nakamoto Live and active on Stacks Epoch 3.0, Fast Blocks is here. And with that brings new changes to our dev tools. So in this video, I'll have each respective engineer go through some of our changes and new features, starting with the Explorer, our APIs, the Hero Platform, Clarinet, and Sax JS. Some of these new features and changes we've communicated in the past, but if you haven't been on top of that yet, well, without further ado, I'll let our engineers take it away. The Stacks Explorer is a blockchain explorer. It's designed for the Stacks blockchain, which extends the functionality of Bitcoin. It provides users with the ability to view real time and historical data on transactions, blocks, small contracts and addresses that interact with the Stacks network. We will have a plethora of new features coming to the explorer after Nakamoto. The primary one, which you'll see on the home page, will be a new block list view that will be showcasing in a visual manner the. Changes that are coming with the Nakamoto upgrade, which will be fast blocks, multiple stacks, blocks being mined per Bitcoin block. So we built a series of newer endpoints which we are grouping inside the extended V2 routes. And another reason why we did that is that we wanted to take this opportunity to optimize how those endpoints worked as far as database performance and overall the quality of the response that you get. So that's why if you visit the API docs right now, there's a. Page that gives you the updates for the SAX API for the Nakamoto release and there's a section inside that says the new endpoints, which are the extended V2 endpoints that I just mentioned and we have quite a few actually. So now you can get more details about burn blocks, which is the technical term we use for Bitcoin blocks on the burn chain. That's why what we call Bitcoin. And then you also get newer endpoints for blocks, which are. Obviously stacks blocks and then you can filter based on the blocks that you find. You can get all of its transactions. You can also get more information about pox cycles, which pox means proof of transfer cycles, which obviously now includes signer data because as you know, on the Nakamoto release, a new network participant that was introduced was the signer. So now you can have information about the signers that participate in the current. PDX cycle as well as the stackers that are grouped inside any of these signers, because as you know, you can pull your STBX when you stack and if you're part of a pool, then that pool signs on your behalf, right? So that's also something that you get. And with this, we also deprecated a few endpoints that were are no longer relevant for the newer Nakamoto version. And you can also see a list of those. In the docks, when we deprecate endpoints, we it doesn't mean that we stop responding to those endpoints, it just means that the responses that you get. Will not necessarily be correct or accurate, right? Because now the rules, the rules of this of the chain have changed, right? So developers can still use the V1 endpoints that were deprecated. However, we strongly recommend for them to switch to the V2 endpoints because first of all, it's very, it's a very quick change. The response JSON objects are pretty much the same with a few exceptions and also because in the future we will turn them off. Right. We don't have like a set timeline for that, but we usually like to wait a few months before we do that. But we definitely will turn them off at some point. So yeah, if if any developer is waiting to migrate, I would suggest to migrate now, because obviously these V2 endpoints are going to be the ones that we will be actively maintaining from now on. I think another important aspect to mention is that now you will get information about the new transaction. Type which is called tenure change transaction. And this 10 year change means that it is a transaction that happens whenever a new STX minor gets the tenure for the next few blocks, right? So. Just to give you some quick context, STX mining means that whenever a new Bitcoin block comes, a new stacks block is generated for that Bitcoin block, but also a new minor takes charge so to speak, and then starts producing the newer faster blogs in the Nakamoto consensus, right? So whenever there's a change in SDX minor, you get a tenure change transaction generated in in this block, right so. You'll get information about that as well. And yeah, and we also made some other performance optimizations. We did quite a lot of work on that. So obviously to accommodate the faster blocks, because obviously now blocks are not going to be 10 minutes between one another. Now it's going to be in the order of seconds. So we obviously needed to make the API be as performant as possible so that we don't. Get any delays between when a block happens on the exchange and when we actually show it on the API? Right? So this is just a quick summary if everything we did to the API. So the Hero Platform is a cloud development environment to help you create and deploy smart contracts on the Stacks blockchain. You can get up and running super quick with a smart contract template. You can run deployment plans for your contracts to deploy to testnet and mainnet. And you can run a hosted dev net, which is a private blockchain network for testing your contracts, fully hosted on the platform. And then you're available to take that URL and use it however you want. And then on the platform, you can also set up custom event streams via chain hooks, again fully hosted by the platform. And you can also create API keys for stocks and. Ordinals for Nakamoto, we're adding a new D5 contract template that was written specifically to help you explore new features that are part of the upcoming Nakamoto upgrade. So if you're interested in learning more, definitely go check out the new Stacks Defy template when you create a new project in the platform. And if you're already a platform user, no action is needed from you with this fork. All of your existing projects, chain hooks, and API keys are all good. Again, check out the new Stack DRY template and take advantage of those fast block times. Alright, yeah, clarinet is a tool for developing and interacting locally. If the Stacks blockchain, the whole ecosystem kind of bundled together, you can there. There's a lot of like editing features and ways for in the future formatting, clarity, code, some VS Code extensions and whatnot. So post Nakamoto clarinet will. Largely look the same to people running the devnet. There are some changes in the console in the repel, so when you open up a clarinet console you'll see if you are familiar with the advanced chain tip. Now it is split out into stacks and burn chain tip advancing. So there will be different chain tips for both of those and you can manipulate them as you see fit. The only thing to note is that the Stacks chain tip advances on its own and the burn chain tip will advance both of them. Today we will be looking at Stacks Tray as a collection of libraries allowing you to build anything you want on these Stacks blockchain. This is your one stop solution for working with. Zacks enabled types on JavaScript and TypeScript. We will briefly look at the latest release of Stacks. This focuses on making life a lot easier and allowing us to debug and inspect our code, making it more intuitive to use This switch and tailed a change in how we represent objects like clarity values which are used for smart contracts or post conditions which make your transactions safer. These were really not inspectable before, but we noticed developers like 2 console log their objects and thus we're switching to a system where everything if possible is represented as strings, making it a lot easier to debug your code stacks. JS also now makes it a lot easier to find the functions you are looking for. We notice developers often trying to figure out what a function is called when they for example. Have one thing like a public key, but they're trying to transform it into something else like an address. This now should be very consistent and follow the convention of A to B, where in this case we would have the function public key to address. This makes it really easy to find and autocomplete the functions you're looking for in your code editor, your IDE, typing in what you have and allowing the auto complete. To help you with discovery, similarly, we also renamed the networking the fetching functions. They now all start with the word fetch, so you can easily start typing fetch and let your IDE suggest which of the available networking functions you want to use. We have a lot of new features and notable breaking changes in the latest version of Stacks. Developers should be aware of these and refer to the migration docs. And if you need any other help, please feel free to reach out to us in the Stack Stress channel on the Stacks Discord and happy developing.To view or add a comment, sign in