ChainSafe Releases Go-Schnorrkel

Colin Schwarz
ChainSafe
Published in
2 min readJan 23, 2020

ChainSafe is excited to announce that we have recently released Go-Schnorrkel, a pure Go implementation of the sr25519 signature algorithm (schnorr over ristretto25519). sr25519 is the default signing algorithm for substrate so the first implementation is in rust. Go-Schnorrkel was written by ChainSafe engineer Elizabeth and is the second implementation of this algorithm.

Go-Schnorrkel represents an important step in ChainSafe’s development of Gossamer, the second implementation of the Polkadot Runtime Environment. It will be used by validators in order to carry out their signing duties and in general, to sign transactions within the Gossamer ecosystem. Go-Schnorrkel includes hierarchical key derivation which allows a user to create multiple key pairs from a seed key pair. It also includes substrate-bip39 (thanks to Sunny from Cosmos) for creating key pairs from mnemonics. Recently, Go-Schnorrkel was upgraded to include a verifiable random function (VRF) implementation which is used by block authoring nodes to prove that they can author a block for a specific slot. Go-Schnorrkel will function the same as the original Schnorrkel implementation written in Rust but it will make it much easier for software written in Go to interact with substrate, since using Rust libraries is a big hassle in Go.

Go-Schnorrkel will be used in ChainSafe’s BABE implementation by block authoring (authority) nodes that each have an sr25519 key. These nodes run the VRF for each slot to check if they can author a block. The algorithm will also be used in Gossamer’s keystore, which uses sr25519 keys. Although Go-Schnorrkel was written for Gossamer, any software that wants to interact with Substrate or Polkadot can use this library.

Interested in Gossamer and looking to get involved? Check out our Github Repo and take a look at our “good first issues” if you want to start contributing!

--

--

Colin Schwarz
ChainSafe

Helping to build Web3 for a better world. Passionate about product and usability.