Join our upcoming webinar 'PegaSys Plus: Ensure Your Blockchain Solution is Production Ready' - November 6, 2019 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

Increasing Security with Blockchain Database Encryption

Worldwide Information security is expected to reach $124 billion in 2019. …

A Gentle Introduction to the PCP Theorem – Part 2

div#post-3806 .signup-form-wrapper {display: none;}

This paper was written by Olivier Bégassat, Applied Researcher at PegaSys Protocol Engineering. …

PegaSys Protocol Engineering – September 2019 Update

A month full of big events, a major milestone accomplished in Eth2, the official Hyperledger Besu migration, plus a …