May 16, 2019

Bringing GraphQL to Pantheon: Ethereal Hackathon Recap

by, Gina Rubino
GraphQL to Pantheon

DISCLAIMER: As of September 2019, Pantheon has been renamed to Hyperledger Besu. In posts prior to September 2019, we refer to the Ethereum client as Pantheon.

Last month, PegaSys sponsored the Ethereal Virtual Hackathon. As a part of this, we put up a Gitcoin Bounty prize of 5,000DAI for a GraphQL interface implementation in Pantheon.

This was quite the challenge! To implement the interface according to its EIP specification, the teams had to implement GraphQL bindings within Pantheon from scratch and then provide a well-tested implementation for each of the 24 API calls listed in the specification.



Two teams took on the challenge and both provided functioning implementations. Their combined submissions totaled more than 15,000 lines of code! While both attempts were laudable, the simpler architecture and conciseness of the implementation led by @zyfrank made it the best fit for Pantheon and hence the winning implementation. His accomplishment was acknowledged onstage at this year’s Ethereal Summit.

PegaSys Product Manager, Kaia Myers-Stewart, announces the winner of PegaSys' bounty in the Ethereal Virtual Hackathon onstage at Ethereal NY.
PegaSys Product Manager, Kaia Myers-Stewart, announces the winner of PegaSys’ bounty in the Ethereal Virtual Hackathon onstage at Ethereal NY.

But, why does Pantheon need a GraphQL interface in the first place? In short, to make a whole set of common queries run against Pantheon easier to execute. For example, GraphQL can reduce the overhead of querying for all the receipts in a block from one query per receipt to a single query for the entire block, or from O(n2) to O(n) in computer science terms.


Also, GraphQL offers a rich ecosystem of tools that developers can use to visualize and adjust their queries. One such tool is GraphiQL, as demonstrated in this video:

GraphQL
A GraphQL query on a specific block which is then modified to fetch more information about the transactions in that block.

Thank you to all who participated in the Ethereal Virtual Hackathon bounty. If you are interested in future PegaSys bounties, please keep an eye on our Bountied Work repository and Jira dashboard.

This post was authored by Tim Beiko, Product Manager at PegaSys.

To keep up to date on PegaSys’ progress, check out our GitHub, follow us on Twitter and sign up for our mailing list.

PegaSys is a thought leader in the Enterprise Ethereum space. Want to join the team? Check out our list of open roles. 



Recent Posts

Waterloo Weekend: PegaSys Looks Back at ETHWaterloo 2019

Welcome to ETHWaterloo!

Last weekend, the PegaSys team attended ETHWaterloo, a 3-day hackathon located where the very first Ethereum …

Subscribing to Events at Scale With PegaSys Plus

PegaSys Plus, launched October 22, is our commercially-licensed Ethereum platform designed for enterprises that want to accelerate their blockchain …

PegaSys October Update

We’re headed into the last couple of months of 2019 at full force! …