Running Solana

Well we are off to a good start this weekend. I went to bed at a decent hour, got a great night’s sleep, then woke up and ran three miles, meditated, and am doing my morning pages. There’s a lot to do today, it’s the first weekend of the month, so I need to do the family business: transferring funds from cash to crypto accounts, balancing the house accounts, and making sure I deposit my share of the rent.

Yesterday wasn’t a total disaster, in spite of my efforts from Thursday night. I managed to fix an issue with one of the SAIA token accounts that prevented me from making a transfer. I had a call with our VC team, and I managed to work through the Solana Hello World program on Figment.io.

I figure I’ve spent enough time messing around with Rust tutorials and manually trying to parse transactions via the explorer, and that it’s time to really delve in. I spent the last two days digging into the Solana web3 and Serum DEX libraries, reading Rust code and, trying to figure it out from there. I’ve studied enough, the only way for me to learn more is by doing.

It only took me a few hours to get through it. The Figment system is pretty nice, it’s basically a huge web app that has modules for various chains like Solana, Polkadot, and many others. Strangely enough they haven’t added an Ethereum one, but I suppose those are easy enough to find. I’m not a total noob though, so I had many of the prerequisites in place, and most of the technical details I already knew from high level how things were supposed to work.

Figment takes the Hello World program and removes certain functions or parameter calls, forcing you to figure out which ones to use and how to parse them. I might have been trying to go through them too fast, because I cheated a bit and looked ahead at the solutions to see how things worked. Not like my work with Exercism where I would sometimes take days to figure out a solution, in order to make something that worked before peeking at the community solutions.

So I got through the track last night. Some of the things aren’t quite clear to me. Compiling and deploying a Rust program to the blockchain is straightforward enough, but this is a web3 tutorial after all. The way that program accounts are created is something I’ll need to go back over. The way program instructions are parsed is still a bit incomplete in my head, especially when it comes to figuring out which accounts, pubkeys and secrets need to be passed along where.

But I finally know what borsh is, and a bit more about how Typescript works. I’m definitely not an expert at any rate, so I’ll probably head back to the Solana developer resources later and go back through another starter tutorial later.

I’ve been reading through the spl-token Rust code to get used to the type of operations that are done there. I’ve been using the multisig CLI and I want to see if there are ways we can call functions on chain using web3. Anchor has an multisig implementation also that allows signing ‘arbitrary’ transactions, but up until today I really had no idea how I might create one of those. But after digging into the Serum Rust contracts, as well as the various web3 libraries that I’ve been working with for that, I’m starting to get a bit of an idea as to how that might work. I also took a deep dive into the Solana Explorer code, and learned more how we might retrieve and parse market data events going back in time and form cost basis calculations or fill in the gaps in our indexer history.

It might be slow going, but just like running, all I’ve just got to keep putting one foot in front of the other.