Ackee Blockchain
Published in

Ackee Blockchain

Announcing Trdelnik — Rust testing client for Anchor

We, Solana smart contract auditors from Ackee Blockchain have decided to create a Rust testing client for the popular Solana framework Anchor. I hope it’s exciting news for all Anchor developers who prefer Rust to Javascript. Let’s talk about the motivation for writing such client and then about the details.

Solana is an awesome Rust blockchain. The top Solana priority is performance. However the tradeoff for speed and universality of the Solana API is pretty low-level smart contract (aka Solana ) API. Fortunately there is the Anchor framework. It’s an opinionated framework designed to mitigate many issues caused by error-prone Solana API and to reduce the developer cognitive load and the number of needed non-business decisions (e.g. choosing the most suitable data encoding).

As a result a number of Solana projects based on Anchor is growing and we — auditors — have to adapt to this trend. And we want to be as efficient as possible to find all security issues and save our clients time and money. It means we need the best tooling for the job but the Solana eco-system and especially the Anchor’s one is super new so the required tools haven’t been developed yet. We decided to change that and the first step is writing the Rust testing client.

Anchor is able to generate Javascript/Typescript client program code. But I hope nobody wants to use Javascript where security, performance and reliability are priorities. Also the generated code doesn’t help you to start testing the Solana deploy the and run your scripts. The Rust testing client for Anchor will do all those things automatically for you. You can think of it as Brownie for Solana (for those who are familiar with Ethereum tooling). It’ll consist of a CLI tool and a library with test helpers and APIs for connecting various plugins. A fuzzer would be one of the plugins.

But the CLI tool and the library with helpers is only the beginning. I can imagine we can generate test scenarios and schemas from the Anchor and program code. Or we can write a Rust/Wasm GUI layer for the client — basically for Anchor/Solana on steroids. The project could also help us to remove the unnecessary Javascript layer and let us write Rust-only apps with Anchor. Let’s develop better decentralized apps together!

The Trdelnik client repository will be publicly accessible on GitHub when we think it’s ready for contribution or first users. Please join our Discord, follow us on Twitter or subscribe to blog posts to know when it’s published and to read other news from the blockchain world.

PS: You might ask — why Trdelnik? Well as we plan to write Brownie for Solana we looked for a similar name. Ackee Blockchain comes from Prague where the typical sweet everyone sells to tourists on the street is called Trdelnik. So we decided to accept it.

Originally published at https://ackeeblockchain.com on November 5, 2021.

--

--

--

Ackee Blockchain is a team of auditors and white hat hackers who perform security audits and assessments. Our mission is to contribute to a stronger blockchain ecosystem by sharing our knowledge. We audit Ethereum and Solana.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Martin Kavík

Martin Kavík

MoonZoon.rs creator, OpenHope.net founder and Seed-rs.org maintainer

More from Medium

The Wormhole Hack: How Soteria detects the vulnerability automatically

Solana India Fellowship — Week 2

Cryptographic algorithms as interactive and non-interactive proofs

Understanding Solidity Assembly: Using `shr` and `shl` for Byte Manipulation