Skip to content
by Unity Nodes
NEAR Protocol

Dev Platform Sync September 9th 2021

about 16:51 long

Nothing is loaded from YouTube until you press play, and then without tracking cookies.

About this video

Update from: https://github.com/near/community/dis...

Still time to join the Metabuidl Hackathon! metabuidl.splashthat.com

Follow the latest from NEAR Protocol on: Website: near.org Discord: near.chat Blog: near.org/blog Twitter:   / nearprotocol   GitHub: github.com/near github.com/nearprotocol #Blockchain #FutureIsNEAR #NEAR #nearprotocol

Transcript

3,006 words

Captions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.

  1. 0:03

    all right welcome here's the dev platform weekly update we're going to run through some exciting things that have been done and are in progress we are kind of coming up on the end of the quarter and there's some particular things that are we are focusing on um for that so the first let's go over the kind of done column here so near cli and rust uh so currently near cli is a javascript uh

  2. 0:29

    package and we're looking at making this all in rust and we have merged in extension system for the cli to make it kind of as robust as possible and actually sir do you want to maybe describe for a moment what like extension system means in this context oops can't hear you can you hear me now yeah yeah sorry uh so we realized that uh we cannot deliver all the functionality that

  3. 1:04

    people want because it's so like it's so different in each case and per like sometimes even personal so we introduced this extension system and now everybody who wants to like extend the functionality of the new cli they can do it they can write their own extensions and with like their own functionality it's relatively easy any uh any binary that can be executed can become a near extension so yeah if you're interested participate create pull requests or even just your own

  4. 1:42

    projects and yeah and add them to the near cli great thank you beautiful here's repo right here and we'll have links to it um sdk docs so if you haven't seen this is a kind of targeted toward the for now the rust sdk and it lives here and it's flushed out on a lot of concepts that people have been curious about and i think previously we had examples that you could learn from but this is really going to walk you through this so in terms of what's done here we

  5. 2:14

    added a well a link to these sort of all-encompassing docs which is docs.near.org and then here are some new sections we added in terms of reproducible builds uh just regular build instructions because there's there's a few flags that you have to know about um and a section on some post-processing ideas that you may want to do to reduce the size and whatnot and near sdk rs on this front this is a really interesting i'd like to take a moment if we can i i don't think we

  6. 2:45

    covered this yet uh because this was exactly a week ago uh implementation of the callback result annotation so if you have used callbacks in this async blockchain that is near um it wasn't super easy to determine if something had failed and also get the results uh so i will maybe go over to this tab in austin if you just want to say a couple of quick words on this um that could be fun

  7. 3:09

    yeah so essentially the tldr of this is just for uh handling the callbacks this just basically means that you're able to like handle the the error if there is one so that you can like gracefully handle it and do whatever you want with it because i think if you're using the annotation of callback before it would just panic and you'd have to kind of just accept that that was the case or you'd have to do

  8. 3:33

    write a lot of manual code to have to like handle it gracefully but now you can just it'll just receive it as a result and then you can do whatever you want with it um inside the callback function yeah thank you this is good this is going to be great i think this is going to make things way less confusing less code it's going to really um be great so thank you this has been an issue for a while and

  9. 3:54

    it's going to be buttery smooth now and so that is merged into uh sdk rs but that i don't believe that there's been a pre-release for that just wanted to to note that yeah there hasn't no okay great sandbox runner so just for the sake of repetition uh simulation tests are being deprecated in favor of sandbox testing and there's a runner that runs this kind of sandbox node and in the javascript we've got a release

  10. 4:25

    here great and willem i see you got some points added to here too do you want to you want to fly through these yeah sure so just it was a probably the biggest uh release we had so far in terms of uh just the size of it but yeah so before every time that you would run a so you can run tests write one test run it on sandbox local node or run it on testnet um there's some functionality

  11. 4:52

    you can't use on testnet you can do on sandbox like um patching state which we'll go over later um but for the most part most tests will be able to run on both uh but the issue was for testnet that when you that to create a sort of sort of fresh account for each test we're using this uh endpoint that had a rate limit for every 15 minutes you could only make you know 10 to 15 uh accounts

  12. 5:17

    so the result of this is that now these accounts are only created the first time you run the tests and they get cached um and so that helps to not only make it so you're you know speed up the test since you're not needing to go through this creation step but also that we can track the accounts that are created in each test and then delete them at the end refunding back to the test account um and we also added these uh

  13. 5:42

    um chad who's not here uh is made this new library called in your units for parsing and uh printing of uh different uh units in the air so for instance here's an example of parsing tin tear gas um and so then now it just makes it more readable for for typing stuff in and also for you know looking at units that have more than 24 zeros it's hard to hard to see um and yeah and so then the next next part is

  14. 6:13

    that we've improved the actual runner itself before it was uh when you created it it was a promise but now it's an internal promise so that then when you you just get the instance right away and then each time you call run it waits until it's ready um this makes it much easier for setting stuff up you don't need to rely on you know any testing frameworks before all feature um and you can also just use it in your

  15. 6:38

    vanilla you know test files um and uh make makes it so you can write it top level because awaits are not allowed in top level javascript um and yeah and so that you can also use this test.concurrent uh which is a feature of jess um probably maybe some other uh testing libraries uh which then and before you just would run each test and then complete it before starting to run the next one whereas now as soon as it gets some sort of promise or a wait it'll just run the

  16. 7:10

    next test so that sped up our tests a considerable amount and now pretty much the longest running test is the within a file is the thing that's the the length of the test the whole file um and then there's this new transaction result which austin had uh had you know come into uh experience with when he was trying to just to be able to you know interact with the the data he was getting back from running transactions so this will let you like peer into logs into promises that intermediate results all

  17. 7:40

    that fun stuff um and yeah so that's that's a big one it's out there so you know hopefully people will have better experience with testnet awesome and sort of broadly on this note of like sandbox runner um there have been discussions recently that like so javascript first of all there's been like incredibly fast work uh on the sort of runner javascript side of things so that's one aspect that is like kind of putting it ahead and also with there is already a near api js library that

  18. 8:14

    topkis has a lot of helper methods that talks to the rpc um and has been used pretty robustly of course it can be improved but it's it's been in use for a long time we don't have the same thing for rust quite yet um and so while we are like really focusing on having people who write rust smart contracts have a rust only sort of system of tests there there may be a period where it makes sense to

  19. 8:37

    just have the javascript runner sandbox system uh in instead for now um so moving on from that i guess we we do have work some work done on this uh rust implementation and fong do you want to like give a little run down while i open up this this tab sure so so far the rust version um only supports like local nodes so like we can be able to like run some tests like locally with just the sandbox but

  20. 9:09

    not like test net with what runner.js has but uh you can pretty much do some very hacky stuff like deploying a contract creating accounts and like just being one of like call functions and view functions in general so like some very like um some more of them like essential stuff but it's not like ergonomic to use like uh future work with like gnar or near api rs once that's up and running like we'll be able to refine this a lot better then but for now it's

  21. 9:43

    just like very rough edges but it's very usable still so beautiful yeah feel free to hack on it if anyone wants to try for it thanks all right and then we move to the in progress and there's some sandbox runner stuff oh yes so this is exciting spooning test net in progress and so i put a little parenthesis here um people can correct me if they would like to expand on this just like taking the state of a smart contract that's on test net apply it to your local system and be able to kind of iterate and see how it

  22. 10:16

    how it behaves so that is the idea of spooning when we're talking about that here and there is an uh open pull request i think from yesterday uh about this so this will be really big um and there are some limitations uh currently but i won't even go into that because that will be solved uh fairly soon but this is going to be really great and the meta build hackathon is still going on until sunday uh

  23. 10:42

    so it's not too late sign up uh and register there is cash to be had there's awesome stuff to to hack on so this is something that is currently ongoing and folks are leaning into this in terms of like support uh the devrel team at near has done a really great job of doing support i think that um they've done the lion's share of this possibly but this is still happening so this is uh definitely in progress and ongoing

  24. 11:08

    um oh yes i think this is important to mention that there is kind of like a ongoing nft issue so if you're watching this video and you have been implementing nfts maybe for the hackathon maybe just for your own project it's probably a good idea to just make sure that this standard in particular is being followed when it has when it comes to approval ids i think there's a little bit of misunderstanding uh with a couple of implementations and sometimes that affects other people so

  25. 11:39

    if you're watching this video and doing nfts please check nomicon we're all kind of getting on the on the same page about that right now and then lastly ows and dev dashboard and actually josh do you want to say a couple words cooking up something big for developers yes happy to yeah so we'll be revealing more specifically uh what all this is about in the coming weeks um for community feedback much like we did for the cli we you know try to do for every large initiative here

  26. 12:11

    um but i can tease it a little bit uh in the sense that the dev dashboard really is going to help at least initially is really going to help you with the operations uh side of your dap so things like managing your rpc usage um an explorer that's specific for your dap so more easily managing and monitoring your contracts uh things of that nature so be on the lookout for that like i said more specifics will be coming soon but really excited about it

  27. 12:44

    great all right i think it's a pretty great update for their for this past week um as we talked through this did anyone like think of something did anything come to mind that we want to mention before breaking uh the only the other thing is the uh the caching vector and then sdk rs came in too so that i i guess i can cut a release just to have those like two features um in the pre-release uh i guess i can do that either today or sometime soon um but yeah they're all in

  28. 13:14

    in masters so i guess people can start playing around with that if it helps thank you for saying that i actually like i knew that there's one more thing to add and that is a big one and maybe you can give a better like expand on the way i'm going to describe this but basically vector which is a data type that we have in our sdk is kind of like underlies a lot of the other collections and this effort makes that kind of iterable and

  29. 13:40

    so what or like what are the consequences of that the positive consequences of things that people can do now that this has uh gotten improved yeah so i guess the the two main differences is just that the api is gonna be more closely uh matching the like rust standard vector um and then the other part is just that there is this like caching layer so that um if you're ever like accessing certain parts of the vector more than once then you

  30. 14:08

    won't have to pay storage costs you know multiple times for each time that it's read uh it'll keep everything all the changes in memory and it'll just make one change at the end of the method call instead of having to do like many many redundant uh reads which should in some cases or i guess i i can't really say exactly the use case but um it should reduce gas costs but um it won't be the case for for every use case it won't reduce gas costs but yeah there are other those benefits beautiful yeah yeah thank you so much

  31. 14:41

    i'll make sure to add it on to this great uh well thanks folks and um i added one more thing too i got it at the bottom um grain's coming this is a uh i i need to review it uh just came out like five days ago um it's their initial uh example for using near runner club some stuff's not working so you know it's not uh still some work to be done but and what's it called is it grain laying dot

  32. 15:13

    i think it's worth checking out here so yeah grain lang yeah.org this is uh so if you don't know this is like a really really interesting project and i know that this is like seems like it's going to be a really good onboarding from people who like don't want to dive directly into rust yet but want to do kind of type scripty things um do you want to say some more on that while i click through the documentation can i show that

  33. 15:37

    yeah so it's uh um uses uh okaml and reason as the for the compiler um and uh it's uh like assembly script it's a webassembly first language so the the target of webassembly is you know very good some makes smaller binaries um and uh it's uh so it's it's got a good type system that that you know you as you can see here you don't have to you know say what the types are you can infer them and a lot of places um and uh yeah so it's it's

  34. 16:12

    just a more uh i would say robust uh abstraction uh has more robust abstractions and um uh and will be sort of an inner betweenness of simply script and rust in terms of uh being able to have uh you know not have to have the all the you know i would say restrictions but safety measures that russ puts in place this one's a little less demanding on for people that are new to this type of programming it even has match yeah i some of this is i didn't even realize this is so close

  35. 16:51

    to rest this is really cool well that's exciting yeah yeah thanks for thanks for mentioning that that's that's awesome all right well thanks for joining and um we will see everyone here next week