Lodestar Update
Authored by Colin Schwarz
Written by Colin Schwarz, Marin Petrunić, Cayman Nava and Gregory Markou
The Lodestar team is excited to provide another update on our recent work. Over the last week, much of our team was in Berlin for blockchain week which has been productive, educational, and a whole lot of fun. ChainSafe members David Ansermino and Elizabeth Binks, along with Ed Mazurek, even pushed the golang eth2 ecosystem forward with an awesome libp2p noise protocol integration.
Funding
ChainSafe is happy to announce that the Lodestar team was recently awarded a grant from the Ethereum Foundation to support light client research and related eth2.0 JavaScript/TypeScript developer tooling. We're deeply appreciative to the EF for their continued support!
Technical Progress
Shortly after our last update was released, we finished updating our various README's and other documentation to make it easier for new developers to contribute to Lodestar. (Check out our Discord Channel if you want to get involved!) Since then, we have been full speed ahead with development. One of our largest accomplishments has been the completion of REST API for the beacon node. Any conforming validator client should now be able to connect to our beacon node.
We also started optimizing our BLS implementation. We were able to add a faster hash function to BLS which has reduced verification time from 2 seconds to 30 milliseconds. We also started aggregating public keys in aggregated signature verification (~14s for 128 signatures down to ~400ms).
We have been making good progress with our Discv5 networking as well. This includes writing a number of tests for encoding and decoding packets and finishing some ENR tests. We expect completion of this part of the project shortly.
Since joining the Lodestar team just a few weeks ago, Eric has finished porting SHA256 into AssemblyScript. His first take was about three times faster than the initial implementation but working directly with the AssemblyScript team, he has now optimized the library a full 20–30 percent faster than our previous implementation choice, the bcrypto library. Our implementation is now the fastest javascript SHA256 implementation (for 64 byte inputs), even including rust-to-wasm implementations and bindings to openssl!! This progress is extremely important for phase two as this is currently the most optimized wasm implementation of SHA256. We are now getting SHA256 into an NPM package for release. Our next step is to turn our attention towards porting SSZ to AssemblyScript.
Light Client
Greg has been working with the Eth2 research team, helping with some of their PRs, and has been conducting ongoing research into the subject. Others on the Lodestar team have been updating our libp2p integration, which may soon prove useful to light client networking.
Future Direction
In the next few weeks, we're getting lodestar ready for the upcoming Eth2.0 implementers lock-in. We'll be finishing up the libp2p protocol for interop as well as getting the beacon chain to ‘quick start' from known states.