Join our upcoming webinar 'Learn how to Leverage Plugin APIs on Hyperledger Besu' - February 4, 2020 at 2PM ET


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:

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

Key Factors to Consider When Choosing a Blockchain Consensus Protocol

This post was authored by David Hyland-Wood, with input from Roberto Saltini, Franck Cassez, and Joanne Fuller.

A blockchain …

Introducing Plugin APIs in Hyperledger Besu

As part of its 1.4 release (set for February 26), Hyperledger Besu will expose a Plugin API. …

PegaSys in 2020

2019 has come to an end, and we’re already a week into 2020. …