Connecting on the local level: Tips for getting the most out of Hyperledger meetups

By | Blog

Hyperledger meetups provide a way for people to learn more about the project, meet other people in the community who live in an area, and share about the work they are doing.

With over 160 meetup groups in more than 60 countries, there is probably a group near you (and if there isn’t, we’re happy to work with you to get one set up). When people go to a meetup we want to make sure it is a positive experience, so this blog offers some important tips for  making those events as valuable and enjoyable as possible.

Make everyone feel welcome

As a global open source community with meetup groups all over the world, it is important to us that everyone everywhere feels welcome.

[Image options to include here:]

All skill levels are welcome at meetups, so don’t feel shy about attending a meetup even if you don’t think you know everything there is to know about Hyperledger. One tip is to look at the agenda and see if it seems interesting to you — some meetups provide an introductory high-level overview, others provide non-technical real world use cases, and some go in depth on technical topics (and some have a combination of these). For organizers, please clearly label the types of content you are providing to help people choose. For instance, the Seattle meetup uses a rating system that goes from 0 for non-technical to 4 for extremely technical.

Also be aware that the Hyperledger community has a Code of Conduct that clearly documents acceptable behaviors and is there to promote high standards of professional practice both online and offline. For attendees, we offer this as a way to let you know you are welcome at our meetups. For organizers, please read through the document and make sure you’re following the guidance provided.

Run an inclusive event

Part of a well run meetup is about including people who are there and even people who couldn’t be there.  

Give people time at your meetup to introduce themselves and share what they do. This can be a great way to learn what sort of content people want in the future and can help you connect with people who can speak at future events. For bigger meetups this may not work, but it is strongly encouraged for new groups. Larger groups can still provide time in the agenda for people to introduce themselves or make announcements if they want.

Many people are interested in your events or the topics you cover but can’t attend. Try recording talks for people who couldn’t make it. If you have video recording equipment that’s great, but you may also be able to use your phone and get a decent recording. If you do record your talks, we’re happy to host those videos on Hyperledger’s YouTube channel.  Several meetup groups, including Los Angeles, Mumbai, Hong Kong, Montreal and Bangalore have recorded talks, so check out their presentations.

And don’t forget to share on social media. Organizers and attendees alike are encouraged to post details of the meetup before, during and after event. Getting everyone to use a hashtag like #HyperledgerMeetup or #HyperledgerMeetup{location} is a great way to build a following.

Use feedback to keep improving

Everyone is encouraged to provide feedback about a meetup. Is there content that attendees are interested in? Is there something that could make the events more welcoming? Feedback can be provided a number of ways.

You can post on the discussion forum of the meetup group’s site or reach out to the organizer directly. And, if you want to contact Hyperledger staff, you can email For organizers, we encourage you to ask for this sort of feedback regularly by sending surveys or questions to your group members. For example, the San Francisco meetup organizer did a nice job of this by sending out an end of the year recap and inviting people to write back with feedback. has also recently introduced a new 5 star rating system for meetups. For attendees, you will have an opportunity to provide feedback after an event. For meetup organizers, learn more about how you can view this feedback from attendees.  After an event, we encourage you to start checking the details of the feedback you’re receiving and be open to addressing comments people make when they suggest ways to improve the experience.

Other thoughts?

There are many other things for people to consider in order to run effective meetups, such as how to find venues, speakers and sponsors. Our Meetup Organizer’s Guide has some more information about that, but it is likely that there are many useful tips and suggestions we haven’t included there.  

To help us improve that guide, we’d welcome your feedback. What other thoughts or suggestions do you have about how to make a meetup a positive experience for attendees?  Please feel free to share your thoughts and ideas with the Hyperledger meetup organizers on our meetup organizer’s mailing list.

Convector: Writing an Open Source Development Framework

By | 网志, Hyperledger Fabric

Convector (a.k.a Convector Smart Contracts) is a JavaScript development framework built for enterprise blockchain frameworks. It enhances the development experience while helping developers create more robust and secure smart contract systems. It spans through the chaincode and backend all the way to the front end, allowing developers to reuse the same code base in the form of libraries. It’s based on a model/controller pattern, supports Hyperledger Fabric and runs natively along Fabric’s well-crafted patterns.

This blog post walks through the history of the project and highlights the challenges and solutions developed along the way.

Everything began when we started to work on Tellus, a code-less transaction designer written to run on a Hyperledger Fabric blockchain. Back then we had a bunch of Golang smart contracts.

Our first impression of the developer experience (DX) was not so good. There are two methods: init and invoke with no other way to add new methods other than by putting an if condition on the invoke method and using one of the parameters to indicate the method invoked. All parameters are positionally passed strings requiring complex parameters to be parsed manually and there was no way to test it locally.

At the beginning of the project, Fabric 1.1 landed adding support for Javascript chaincodes. We decided to try it out hoping for improved developer experience. Unfortunately, it follows the same pattern found in the Golang chaincodes, and you still have to do some dirty work in your everyday logic. We kept looking for a better solution and found a post about a library from TheLedger on making Fabric chaincodes in Typescript that really improves over what you have with raw Javascript.

During the migration of our smart contracts from Golang to Javascript a pattern emerged. Most of the time functions do things in the following order:

  1. Parse the arguments.
  2. Make some assertions.
  3. Perform the changes.
  4. Save the changes.

This led to a fundamental question about theproject plan: should smart contracts get migrated quickly or should more time be spent figuring out a pattern and making them flexible enough for multiple business cases. It all started in the ./src/utils/ of the project.

/** @module @worldsibu/convector-examples-token */

import * as yup from ‘yup’;
import {
} from ‘@worldsibu/convector-core-model’;

export class Token extends ConvectorModel {
 public readonly type = ‘io.worldsibu.examples.token’;

 public balances: { [key: string]: number };

 public totalSupply: number;

 public name: string;

 public symbol: string;

Figure 1 — Convector Model
Fabric does not have a restriction on the data shape stored in the blockchain. You basically have a key-value map where both are strings, which means you can serialize and store any complex object. We took apart the models to reuse them in code. We just passed all of the necessary parameters in.

 public async transfer(
   tokenId: string,
   to: string,
   amount: number
 ) {
   const token = await Token.getOne(tokenId);

   if (token.balances[this.sender] < amount) {
     throw new Error(‘The sender does not have enough funds’);

   token.balances[to] = token.balances[to] || 0;

   token.balances[to] += amount;
   token.balances[this.sender] -= amount;


Figure 2 — Convector Controller

With Fabric, you get a typed list of parameters for functions. We didn’t want to be parsing models all of the time in all of the functions, so we added some decorators to validate if all parameter type invariants were met successfully. Those parameters might be a primitive, complex or even a model.

Functions now started to look more like a controller. They handled the business logic while the model described the data.

Now came the time to integrate all of the chaincodes into our Nodejs REST API. In the process, we realized we were creating a wrapper library on the server to call my chaincodes with the fabric-client lib. This is a very common situation so we looked for a better way to automate this.

I wanted to use the same controller and model files on the server as well as on chaincode. Doing so meant decoupling the relationship between the models and the storage layer (Fabric) as well as the controllers and the execution action.

This is where we realize Hyperledger Fabric was just one of the multiple blockchains Convector can support.

Adapter and Storage come into play.

The adapter is the underlying layer for the controller. Controllers define the methods, params, and business logic while adapters deal with how to route the invocation to the right place. For example, in our API it uses an adapter to invoke the fabric-client library and send a transaction.

The storage provides the functionality to interact with the models. Whether you want to save, delete or query something, you interact with the model itself, and, behind the scenes, it interacts with the specified service. On chaincode this is the Fabric STUB object. In the Nodejs API, it might be sending a query transaction or read from CouchDB.

Pro Tip: Convector can be used with something other than a blockchain. Like, configure an adapter or a model to call an API or another database.

The weekend turned into a month of creating tools and perfecting the pattern. Here are some of the tools created in the journey that you can leverage today:

# Install the CLInpm i -g @worldsibu/convector-cli
# Create a new chaincodes projectconv new mychain -c token
cd mychainnpm i
# Install a dev environmentnpm run env:restart # Install the chaincodenpm run cc:start — token 1

Figure 3 — Convector CLI

Also, Convector already comes with a Fabric adapter, a Fabric storage, a CouchDB storage, and a mock adapter (for unit tests) that you can use to seamlessly create code for your chaincode as well for your NodeJS backend while creating tests that can be included in your CI/CD pipelines. This is critical in any real-life development.

Extra adapter and storage layers can be easily created and we’re excited to see what the community builds around these tools. At the same time we were building this, we continued working on our internal product’s migration, which helped to test the framework in real life scenarios before launching it.

I’m glad we didn’t take the easy path on this migration. We’re pretty happy with the result, and the journey of publishing an open source tool has been amazing. It’s also rewarding to see  hundreds of people using it every day.

Hyperledger Fabric is an excellent blockchain framework. The infrastructure it provides covers most of the use cases in a secure and reliable way. That’s why we think it deserves a robust interface for smart contracts too, and we want to contribute back to the community with the internal tools we created while working with it.

Because we believe the project can be useful for anyone in the blockchain ecosystem, Convector has joined the Hyperledger Labs initiative. We are really committed to building a community around Convector, which has already surpassed the 27,000 downloads mark, and welcome the input of the Hyperledger community. If you are looking to get involved in an open source project, refer to GitHub

The coordinates for the project are:

About the author
Diego Barahona is the CTO and Architect of WorldSibu, a startup dedicated to creating blockchain tools and platforms for non-blockchain experts and make the technology more accessible to solve business challenges.

Hyperledger Sawtooth Goes Mobile

By | 网志, Hyperledger Sawtooth

As interest in Hyperledger Sawtooth grows, robust SDKs continue to be important for helping developers innovate on this blockchain platform. Since mobile is one of the most popular application platforms, it is crucial to extend Sawtooth to support native iOS and Android application development.

Additionally, the introduction of Hyperledger Grid has expanded the possibility of supply chain products for the Sawtooth platform. Many of these uses are well suited to mobile clients, allowing on-site professionals at manufacturing or logistics facilities to interact with a Sawtooth application.

This blog post describes the first native mobile client applications for Hyperledger Sawtooth, which we have developed using the Sawtooth Java SDK as well as a new Sawtooth Swift SDK. These first example applications showcase a client for the XO transaction processor that, although simple, opens up possibilities for Sawtooth mobile applications moving forward.

Sawtooth Java and Swift SDKs

The Sawtooth Java SDK is already familiar to many Hyperledger Sawtooth developers; no changes are needed to make it compatible with an Android project. The SDK works similarly in Java-native projects or in Android projects in Java or Kotlin. The Sawtooth Java SDK documentation describes how to import the SDK into an Android project and includes example code for writing a client application in Kotlin.

The new Sawtooth Swift SDK supports iOS applications on the Hyperledger Sawtooth platform and provides a way for an application to sign transactions before submitting them to the blockchain. This SDK implements the same functionality present in other Sawtooth SDKs. Cocoa/Cocoa Touch projects can import the SawtoothSigning framework via Carthage, an iOS dependency manager. The Sawtooth Swift documentation includes instructions for using the SawtoothSigning framework.

Example XO Mobile Apps

Our example mobile applications use the XO transaction processor, which allows two users to play tic-tac-toe on the blockchain. (For the details of XO, see the XO CLI tutorial and transaction family specification.)

Both applications implement most of the functionality from the XO transaction processor. The applications open to a landing screen with tabs to navigate between games to play, games to watch, and finished games.

The Play tab lists the current games that a user is able to join. In the following figures, the iOS example (using Swift) is on the left, and the Android example (using Kotlin) is on the right.


Figure 1. Play screen

The Create Game screen lets the user enter a unique name for a new game. The new game will appear on the Play screen once this transaction has been successfully submitted.


Figure 2. Create Game screen

The Game Board screen allows the user to submit their moves, with Player 1 as ‘X’ and Player 2 as ‘O’.


Figure 3. New game board (iOS) and finished game board (Android).

Running the Sawtooth Mobile Apps

If you want to try out these apps, you can find them in the Sawtooth Java SDK and Sawtooth Swift SDK repositories.

  1. Check out the repositories and open the project on Android Studio or Xcode to run the apps on a simulator or on your device.
  2. The application needs to communicate with a Sawtooth validator connected to an XO transaction processor. To start a local Docker network with the validator, XO transaction processor, and Sawtooth REST API, run docker-compose up in the examples/xo_ios folder in the Sawtooth Swift SDK project or examples/xo_android_client in the Sawtooth Java SDK. This will allow your application to send transactions to the validator.

Further Development

We have proposed a new Sawtooth Swift SDK, using the Hyperledger Sawtooth Request for Comments (RFC) process. Once that process is completed, a new GitHub Hyperledger repository will host the Sawtooth Swift SDK. We have already implemented part of that SDK and will contribute the code to the Hyperledger repository once the RFC has been approved. At this moment, the only framework available with the SDK is SawtoothSigning, which can be used to sign create private/public key pairs and sign transactions. In the future, we plan to implement a framework help generate Sawtooth protobuf messages.


Native mobile applications are a logical step for Hyperledger Sawtooth development. With projects such as Hyperledger Grid encouraging a larger suite of technologies to be used for supply chain solutions, flexibility in the interactions with the Hyperledger Sawtooth platform is critical. Native mobile applications make interactions with Hyperledger Sawtooth more convenient and comfortable.

The Sawtooth Java and Swift SDKs, along with the example XO client application, provide a solid foundation for getting Sawtooth mobile. Using the Sawtooth Java SDK and a new Sawtooth Swift SDK, native mobile applications allow developers and users to unlock the full potential of Sawtooth applications wherever they go.

Want to Learn More?

To learn more about mobile development in Sawtooth, see the source code and the documentation in the Sawtooth Java SDK and Sawtooth Swift SDK git repositories. These repositories include the source code for the example XO client and documentation with details on how to import the modules and how to use the SDKs to write clients.

You can also join the Sawtooth SDK development community in the #sawtooth-sdk-dev channel on

About the Authors

Darian Plumb (Senior Software Engineer), Eloá Verona (Software Engineer) and Shannyn Telander (Software Engineer) work on Hyperledger Sawtooth projects at Bitwise IO. They recently worked together on the first venture into native mobile applications for Hyperledger Sawtooth.

Reducing Government Red Tape: British Columbia Creates New Business Identity Model with Hyperledger Indy

By | 网志, Hyperledger Indy

In Canada, starting a new business can be like navigating a maze with three levels: local, provincial, and federal. A helpful checklist on starting a business in Canada offers 60+ links to explore. All this red tape frustrates entrepreneurs and governments alike.

To lighten that burden, teams from the governments of British Columbia (BC), Ontario and Canada have started an ambitious project to fight red tape using decentralized identities and trusted credentials. They are jointly building the Verifiable Organizations Network (VON), to provide an open source software stack that helps business people establish trusted and enduring digital identities and speed up applying for permits and licenses from government agencies.

The first project to emerge is OrgBook BC, an online directory that makes finding authentic and authoritative data about companies faster and easier. Launched in January of 2019, it is designed to reduce the time to do due diligence on a new supplier or client from hours down to a few seconds.

Of course the path to this launch included a number of key development challenges, strategic technology choices and partnership across governments and the larger Hyperledger community. For more on all of these steps, check out this detailed case study.

Now that OrgBook BC is live, the VON goals are expanding the applications, growing the footprint and encouraging more jurisdictions to use the software stack until the network effect takes hold. To get the larger developer and business community engaged, the team is hosting BootCampBC as part of #BCTechSummit. The Honourable Jinny Sims, Minister of Citizens’ Services and MLA for Surrey-Panorama, will be opening the event, underscoring the government’s commitment to driving the growth and adoption of VON.

BootcampBC, hosted by technology leaders from Hyperledger Indy, Verifiable Organizations Network (VON) and the Sovrin Foundation, will cover the concepts of self-sovereign identity and guide participants through building their own Hyperledger Indy agent to verify and issue verifiable credentials using VON’s technology.

Meet Robert Palatnick: The New Chair of Hyperledger’s Governing Board

By | 网志

We’re excited to learn more about the new chair of Hyperledger’s Governing Board, Rob Palatnick. We asked him a few questions about his role at DTCC, how he’s been involved in the community so far and what he hopes to achieve while he is Chair. Check out what he had to say below!

Describe your current role, background and why you wanted to be chair of Hyperledger’s Governing Board?

I am a Managing Director and Chief Technology Architect for DTCC, where I am responsible for the global IT strategy, architecture, standards and engineering design of the systems and applications that support the firm’s broad range of products and services. I also sponsor our Office of Fintech Strategy in partnership with DTCC Product Management leadership.

I have been working in Fintech since I started my career in 1980. The first 14 years of my career were spent working for small software companies including those in banking and financial services, and the past 26 years have been spent at DTCC helping drive our technology transformations.

It is an honor to accept the position of chair of Hyperledger’s Governing Board in succession to Blythe Masters. Blythe guided the board during a critical time when Hyperledger began, when enterprise Distributed Ledger technology (DLT) was first being developed, was untested and embryonic. Since that time, with Blythe’s oversight and the contributions of the Governing Board and the community, Hyperledger now counts 12 active projects, over 260 members and a partnership with the Enterprise Ethereum Alliance as achievements. This is wonderful growth and a testament to the board’s leadership and oversight.

We have now moved beyond start-up mode, and our focus has increasingly turned to real-world application and operation. The next chapter will center around thoughtful guidance of the Hyperledger project portfolio and driving increased use of Hyperledger’s software, with adoption by global communities, across many industries. Within my role as chair and working closely with other Governing Board members, I hope to leverage my knowledge and experience building critical industry scale platforms to help guide Hyperledger to focus on the best priorities to support enterprise scale production implementations. We will also seek to strengthen confidence that DLT can improve the safety and soundness of any market or industry.

How is DTCC currently using Hyperledger technologies or how do you plan to?

DTCC has been active in the Hyperledger community since its founding in January 2016, hosting the very first Hyperledger meet-up in our New Jersey office.  We have also hosted other meetups in our Tampa office and our office in Chennai, India. We have been very active in the code community, actively leading and contributing code to various Hyperledger projects and leading the Hyperledger Explorer project.

Today, DTCC is leveraging open source from multiple Hyperledger projects. We are leveraging Hyperledger Explorer code to build out administrative software for node governance for a project which re-platforms our credit derivatives Trade Information Warehouse (TIW) onto DLT. We are also using a Hyperledger DLT stack for an internal pilot and are exploring other opportunities with the Hyperledger Caliper, Quilt and Burrow projects.

What are the benefits of Hyperledger’s open community and governance model?

Hyperledger has established itself as an umbrella organization for the open source community to develop code for real-world business transactions, and is open to all industries and vendors, and welcomes multiple protocols and innovative models. This contrasts with other organizations that primarily support an open source version of a single commercial product. The open door to new projects and new models is truly critical in supporting the dramatic innovation in DLT today and vital to the future growth of DLT across the financial services industry and beyond. Unlike early public blockchain models which are specifically designed to address a ‘3rd party trust’ problem through consensus protocols that require mining and incentive models, Hyperledger has focused on industry strength and non-functional requirements such as performance, scale, finality, testability and operations. The Linux Foundation brought a tremendous model for successfully engaging the community, organizing projects, maturing releases, testing to ensure quality and pushing out code.

What’s the most important milestone for Hyperledger to reach by the end of 2019?

If you asked that question over the last three years, my answer probably would have been “create the community, establish the brand, and push out code”. For 2019, I think it will be important to ensure we continue to deliver value and satisfy our membership.

We know that Hyperledger projects are achieving code delivery goals, and we know that there has been tremendous response, in the form of Hyperledger code downloads, from the global community. We also hear that Hyperledger code is forming the platform foundation for many important initiatives across industries around the globe. For 2019 the target should start shifting to member satisfaction and value. It is important that we ensure we are addressing community priorities, are meeting expectations and requirements such as scale and performance as Hyperledger project adoption becomes more widespread and moves from pilot into wider scale production.

What’s the one thing you hope to accomplish by being a part of Hyperledger’s Governing Board?

My main goal as a governing board member has been to bring the perspective and voice of a critical financial industry utility to the development of open source DLT that has the promise of replacing and improving significant portions of the technology support that industry. Industry infrastructure must be high quality, resilient, secure, performant and properly governed to deal with inevitable processing exceptions and unexpected conditions. If Hyperledger’s products are built to meet those requirements, then I have accomplished my goal.

What’s the biggest struggle or challenge you see Hyperledger having to overcome?

The near-term challenge is navigating through, as Gartner states, “the trough of disillusionment” that DLT did not meet expectations and change the world overnight. The reality is that, in the enterprise world, things are proceeding exactly as you would expect, if this technology is going to become a critical foundation for the future. The enterprise strength code had to be built and implemented in significant real-world deployments and every day we read about new pilot deployments. Over the next few years we will see which of those models really provide value and grow their communities. We will also see an emerging challenge of DLT proliferation, and a need for interoperability.

Finally, and perhaps most critical for Hyperledger, is to ensure we are established as the open source model and umbrella organization for enterprise blockchain projects. We will see the inevitable consolidation of technology models, which has occurred in previous technology innovation cycles. I believe in the model of open source, and that distributed, decentralized, ledger should be available through open source and not solely depend on technology ‘owned’ by any one vendor. But I also believe that at this early stage we must continue be open to innovative ideas and proposals for additional and alternative foundational components for the emerging ecosystem. This is the biggest source of opportunity for Hyperledger: to provide the open source building blocks for enterprise capable DLT built on community standards and architectures.

What are you most excited about regarding blockchain and distributed ledger technology in 2019? What do you feel is next for the industry?

It is exciting to play a part in this new technology wave. In 20 years, I hope we will be able to look back on this period similarly to the start of the Internet or the early days of database models – when foundational concepts incubated, security, privacy and trust models were considered appropriately, standards for protocols and interoperability were developed and the right governance models were put in place, all of which allowed the technology to proceed and reach the inflection point of adoption in the best possible way.

Hyperledger, Linux Foundation Open Source Networking and Telecom Community Launch New Special Interest Group at Mobile World Congress

By | 网志

Hyperledger is launching a new cross-industry Special Interest Group (SIG) to facilitate focused technical and business-level conversations about appropriate use cases for blockchain technology in the telecom industry. This news comes as part of the Linux Foundation’s participation at Mobile World Congress.

The telecom industry has one of the most complex operations framework, involving many partners, vendors, customers, distributors, network providers. There are a lot of trust issues and transparency challenges due to the involvement of multiple entities, and no clear mechanism to track end-to-end activities of every entity and blockchain can solve main issues in telecom. Blockchain is a decentralized and distributed ledger technology with the potential to deliver trustless operability, immutable and auditable to the telecom industry

To widen the discussion, this SIG will collaborate with other Hyperledger groups, Linux Foundation Open Source Networking, the TSC, Linux Foundation staff, and the project maintainers. The Telecom SIG is interested in collaborating with other Hyperledger and non-Hyperledger groups that aim to identify and share blockchain solutions that increase impact in global development.

The Hyperledger Telecom Impact Special Interest Group

The Hyperledger Telecom SIG is primarily focused on serving as a platform for exchanging ideas and exploring ways to use blockchain technology to advance development and adoption of telecom-specific blockchain implementations. The Telecom SIG will work with the other working groups and technical teams, especially in the areas of implementation.

The areas of focus include:

  • Identifying related proofs of concepts, current pilot, use cases and functional architecture;
  • Working towards building telecom blockchain consortium;
  • Sharing stories of successes, failures, opportunities and challenges;
  • Identifying conferences or other opportunities to connect face to face, as well as submit talks or present as a group at an event.

The  initial work products will include a set of documents describing telecom use cases, white papers, technical solutions for blockchain technology. Some of the use cases  include: SLA Management, ONAP, OSM, Multi-Domain Orchestrator, 5G, LF Edge, Network Slicing, IIoT, SDN and NFV.

Join us at Mobile World Congress in Barcelona

If you are in Barcelona for Mobile World Congress from February 25 to 28, join us to talk more about this new Telecom SIG.  The Linux Foundation will have a booth at the event at [BOOTH DETAILS] and will be hosting a meetup on February 25 that will feature Hyperledger Executive DIrector, Brian Behlendorf, and interim Telecom SIG Chair, Vipin Rathi from Jawaharlal Nehru University’s School of Computer and Systems Sciences.

How to get involved in Hyperledger Special Interest Groups

SIGs gather community members from an industry segment to work on domain-specific problems and create an environment for open discussion, document co-creation and solution proposals. SIGs help specific vertical markets in their efforts to address problems specific to that particular community. To date, Hyperledger has five SIGs, including ones focused on healthcare, the public sector and social impact.

Participation in any SIG is open to everyone in the community. Each group has an open e-mail list, a Chat channel, and a wiki page. Live meetings are also held regularly via web teleconference. When needed, a task force can also be created within the SIG and have working sessions to discuss specific work items.

If you’re interested in joining the Telecome SIG, please subscribe to mailing list and join the Chat channel where meeting details will be announced. You also can visit or find a list of other community meetings on the Hyperledger Community calendar. We look forward to your participation and contributions!

Introducing the Hyperledger Smart Contract Working Group

By | 网志

Welcome to the Hyperledger Smart Contract Working Group!

The Smart Contracts WG will define concepts regarding smart contracts and produce materials to describe the various aspects and meanings, trying to come up to standards or best practices. The audience for smart contracts is large and spans from researchers, developers, businessmen, decision makers, policy makers, law makers, software users, citizens to governments, banks, financial institutions, insurance providers, etc.

The Smart Contract WG will have two main areas of focus with underlying topics of interest for each.

Technology-oriented focus:

  • Models of and mechanism for computation
  • Formal guarantees on outputs of smart contracts
  • Smart contract packaging, code reuse, and dependency auditing
  • Generation of smart contracts from existing artifacts (natural language, business process, state machines, non smart-contract code)
  • Data structures and state
  • Privacy
  • Tooling and compilers for existing virtual machines
  • Design Patterns for Smart Contracts
  • Upgradeability of smart contracts

Law-oriented focus:

  • Smart contracts as representatives of obligations and fulfillment
  • Smart contracts law enforcement cascading actions

Participation is open to everyone in the community. The WG has an open email list, a chat  channel, and a wiki page. Meeting details, meeting notes, and documentation are accessible to everyone in the community. The following resources are available:

If you’re interested in joining, please subscribe to the mailing list and join the Chat channel where meeting details will be announced. Hyperledger has several other very active community Working Groups, learn about all of them here. You also can find a list of other community meetings on the Hyperledger Community calendar.

Walmart turns to blockchain (and Hyperledger) to take on food traceability and safety

By | 网志, Hyperledger Fabric

In today’s high tech world, the global food supply chain delivers fresh meat, produce and more to us year round. The good news is that this massive supply chain means a consumers have access to a huge diversity of food that is generally safe to eat. Still, occasionally it can make us sick. In 2018 alone, there were 18 outbreaks of foodborne illnesses in the USA, including the E. coli found in romaine lettuce.

For this reason, Walmart has always been interested in enhancing transparency and traceability in the food system. The company has tested many approaches to tackling this challenge before turning its attention to blockchain. Two successful Proof of Concept (POC) projects, one in the U.S. and one in China, solidified Walmart’s commitment to blockchain and Hyperledger Fabric. The company is now leading industry-wide adoption of the technology with a coalition involving some of the most prominent players in the food industry, like Nestle and Unilever.

Walmart’s success working with Hyperledger Fabric and the Hyperledger community to build this large-scale solution and growing industry coalition shows the power of multi-stakeholder, open source approach to blockchain:

  • Since the food traceability system is meant to be used by many parties, including Walmart’s suppliers and even direct competitors, an open and vendor-neutral technology ecosystem was a core requirement from the start.
  • Interoperability with other blockchain systems is also key for a cross-industry solution, making Hyperledger’s collaboration with Ethereum vital for long-term success.
  • The diverse community working together on the development of Hyperledger Fabric meant that solutions were already in the works for many issues the Walmart team identified as they built and scaled their solution.

For details on how Walmart went from a test case with mangoes to tracking more than 25 products from five different suppliers via Hyperledger Fabric, read our case study. It includes the a step-by-step account of Walmart’s rollout, from embracing the general idea of blockchain to selecting a core technology to planning the POC projects and taking the system global with partners. It also featured tips from Frank Yiannas, former Vice President of Food Safety at Walmart, on rolling out an enterprise blockchain project.

HIMSS 2019 – Myndshft Delivers a Recap

By | 网志, Healthcare

HIMSS19 took place in Orlando, FL the week of February 11 and this was the third year Hyperledger had a presence at the conference. HIMSS is the leading Healthcare Information and Technology Conference attracting over 45,000 people from 45+ countries each year. Member companies of the Hyperledger Foundation are invited to spend time working the booth, and I had the opportunity to represent Myndshft interfacing with attendees and answering questions about how blockchain technologies fit into healthcare.

Thoughts on Hyperledger Booth at HIMSS

Most people inquiring about blockchain at HIMSS this year were looking for ideas, thoughts, and examples of how blockchain could and should be implemented in healthcare. HIMSS attendees have been following blockchain topics for the last three years (since Hyperledger first had a presence at HIMSS) and many are savvy to how blockchain provides data immutability, creates a network of members, and the general concept of a distributed ledger. There were a few recurring questions the visitors to the Hyperledger booth asked on a variety of different topics, but they all circled around the idea of where blockchain makes the most sense to be implemented.

*NOTE*: There were quite a few questions about how Hyperledger fit into the world of Bitcoin, Ethereum, and cryptocurrency in general, but most of these discussions ended up at one of the following places below after a basic explanation that Hyperledger focuses on blockchains for business and operates differently than completely public blockchains that utilize cryptocurrency.

The three big questions I heard repeatedly at the booth were:

‘Should I use blockchain to enhance my security?’

‘How am I supposed to integrate my existing technology into a blockchain?’

‘Where is blockchain being used today in healthcare?’

Let’s break them down into each of their parts:

Is blockchain for security?

People still aren’t sure how blockchain security works. Many visitors were conflating the cryptographic properties of blockchain with the idea that they need less security infrastructure to run a blockchain. The question asked at the booth a few times was “Explain to me how a blockchain isn’t hackable?” The discussion that followed typically included an explanation that all existing security measures need to be in place for a blockchain network to be secure, but when you use blockchain, the historical data on the chain isn’t able to be changed.Thus individual records aren’t able to be manipulated without notice, providing organizations with minimal trust to work from a common record of truth.

How can I integrate with my current systems or other blockchains?

Many people wanted to know how data got into and out of a blockchain network and how they were able to continue using their existing systems. The majority of participants had concerns that adopting blockchain would require a rip-and-replace of the IT systems their organization has already spent millions of dollars on. The reality is that Hyperledger blockchains like Fabric and Sawtooth are able to coexist with existing IT systems and provide functionality that their existing systems don’t have and never will have without a network. Listening to the conversations around data integration and interoperability was a good reminder that the SDKs provided for the different blockchain projects within Hyperledger need to be a top priority for development. Without good SDKs and the ability for non-blockchain engineers to use them effectively, it is unlikely that blockchain will gain much adoption beyond some niche use cases.

Where is it being used today?

The last question people had was around how blockchain is being used today in healthcare. There are few companies that already have blockchains up and running for different parts of the healthcare ecosystem today.

Myndshft is a company building a network of payers and providers to bring transparency, speed, and auditability to the prior authorization process. The network  integrates with existing systems of record and use events in those systems to drive execution of “smart contracts” (the rules that govern how a blockchain operates), which automate the prior authorization before writing the results back to the providers system.

Change Healthcare is also running a blockchain for claims processing and monitoring. In conjunction with its clearinghouse, Change is using blockchain to ensure all claims that are processed are auditable and traceable.

Synaptic Health Alliance and the DokChain Alliance are also groups looking into blockchain and how it fits to drive efficiencies and collaboration in healthcare.

Overall, the interest and education around blockchain in the healthcare community is growing rapidly, and nobody is wanting to be left behind or appear as a laggard in their implementation and adoption of blockchain technologies. For more information about what Hyperledger is doing in healthcare or how Myndshft is solving complex administrative problems, please reach out to me via email ( or join us in the Hyperledger Healthcare-SIG Rocket.Chat. 

Hyperledger Sawtooth events in Go

By | 网志, Hyperledger Sawtooth

This blog post shows how to use the Sawtooth Go SDK for event handling. We can create events in a transaction processor and write a client to subscribe to events via ZMQ. There’s also a web socket based event subscription feature not in scope of the topic discussed here. The article has information useful for developers, technical readers, architects, Sawtooth enthusiasts and anybody interested in blockchain.

Please refer to Sawtooth Go SDK reference for setting up the development environment. It includes information on how to write a client in Go.

Events and Event Subscription In Sawtooth

Thanks to the many open source contributors. The Hyperledger Sawtooth documentation describes in detail about event and event subscription. This article supplements the document. Sawtooth has SDK support in many languages, giving flexibility to the application developer. We will discuss the Go SDK usage in detail.

Sawtooth defines two core events sawtooth/block-commit and sawtooth/state-delta. Both occur when a block is committed. The former carries information about the block. The latter carries information about all state changes at the given address. In addition to the predefined events, Sawtooth allows application developers to define new events. A combination of sophisticated SDK and protobuf definitions abstract the complex network communications. The SDK exposes APIs to add new application-specific events. It also provides the mechanism for clients to subscribe to available events.

Figure 1: Representation of the Validator connection with Transaction Processor and Client via ZMQ.

Event: A savior for real world use cases

  1. Notification events such as state change and block commit help the design of interactive clients. It saves clients from having to poll the validator for the status of submitted batches.
  2. Events can be used  as a debugger for transaction processors. Transaction processors can register application-specific events allowing clients to debug the flow remotely..
  3. In addition to debugging, the asynchronous behavior allows for stateless application designs.
  4. Deferring the processing of events at a later point in time. Sawtooth Supply Chain is one such well known example, which makes use of this feature.
Caution beginners! Do not get carried away with overwhelming application specific use cases. Events are also being used for internal operation of Sawtooth. The horizon is open and our imagination is the only limit.

Adding Application-Specific Event In Go

Creating a custom event involves defining three parts, namely

  1. Define attributes: A list of key-value pairs, which later is used to filter during event subscriptions. There can be many values per attribute key.


// Create a key-value map to define attribute

attributes := []events_pb2.Event_Attribute{

Key: "MyOwnKey", Value:"ValueIWantToPass",


2. Define data payload: Byte information for a specific event type.

payload := []byte{'f', 'u', 'n', '-', 'l', 'e', 'a', 'r', 'n', 'i', 'n', 'g'}

3. Define event type: Used as an identifier when subscribing for the events.

After defining these parameters, we can use the available API in the SDK to create an event and add to the context. Listing 1 shows and example of adding an event. Please note that any change to the context’s events will affect the way subscribed clients work.


func (self *OneOfMyTPHandler) Apply(

request *processor_pb2.TpProcessRequest,

context *processor.Context)

error {    // -- snip --





// -- snip --

Listing 1: Adding an event to the context.

Event-Subscription In Go

Subscribing to an event involves establishing a ZMQ connection with the validator. The event types specify which events are subscribed to. An optional filter attribute can be passed for each event when establishing the subscription. The Sawtooth Go SDK uses protobuf definitions for serializing messages exchanged between the client and the validator. The following four steps show the sample code snippets.

  1. Establish a ZMQ connection: To establish a ZMQ connection from a client as a DEALER. Detailed description can be found in ROUTER-DEALER mechanism in ZMQ. The Sawtooth SDK provides an API for establishing client connection with validator.
import (
zmq_context, err := zmq4.NewContext()
// Error creating a ZMQ context
if err != nil {
   return err

// Remember to replace <VALIDATOR-IP> with hostname
// or the IP where validator is listening on port 4004
zmq_connection, err := messaging.NewConnection(
   //This specifies a server connection which needs
   //binding or client connection that needs to
   // establish a request to server
// ZMQ connection couldn't be established
if err != nil {
   return err
// Remember to close the connection when either done
// processing events processing or an error occursdefer zmq_connection.Close()
// -- snip ––

2. Construct EventFilter, EventSubscription and ClientEventsSubscribeRequest: The Event is said to be subscribed when both event_type and all the EventFilters in EventSubscription field match. EventFilters can be applied on attributes defined earlier. FilterType determines rules for  comparing the match string.


// Define filters over attributes to be triggered when
// a string matches a particular filter type
filters := []*events_pb2.EventFilter{&events_pb2.EventFilter{   
   Key: "MyOwnKey", 
   MatchString: "MyUniqueString", 
   FilterType:  events_pb2.EventFilter_REGEX_ANY,
my_identifier_subscription := events_pb2.EventSubscription{   
   EventType: "MyEventIdentifier", 
   Filters: filters,
// -- snip --
// Construct subscription request for the validator
request := client_event_pb2.ClientEventsSubscribeRequest{
   Subscriptions: []*events_pb2.EventSubscription{
// -- snip ––

3. Send request over ZMQ connection: The client’s event subscription request can be sent through an established ZMQ connection. Note that a correlation id returned by SendMsg() can be used to know if the validator as a ROUTER has response messages. Many events can be subscribed to at once.

import (
// Get serialized request using protobuf libraries
serialized_subscribe_request, err :=
if err != nil {
  return err
 // Send the subscription request, get a correlation id
// from the SDK
corrId, err := zmq_connection.SendNewMsg(
// Error requesting validator, optionally based on
// error type may apply retry mechanism here
if err != nil {   return err} // Wait for subscription status, wait for response of
// message with specific correlation id_, response, err :=zmq_connection.RecvMsgWithId(corrId)
if err != nil {
  return err
 // Deserialize received protobuf message as response
// for subscription requestevents_subscribe_response :=

err = proto.Unmarshal(
if err != nil {
  return err
 // Client subscription is not successful, optional
// retries can be done later for subscription based on
// response cause
if events_subscribe_response.Status !=
  client_event_pb2.ClientEventsSubscribeResponse_OK {
  return errors.New("Client subscription failed")
 // Client event subscription is successful, remember to
// unsubscribe when either not required anymore or
// error occurs. Similar approach as followed for
// subscribing events can be used here.
defer func(){
    // Unsubscribe from events
    events_unsubscribe_request :=
    serialized_unsubscribe_request, err =
    if err != nil {
      return err
    corrId, err = zmq_connection.SendNewMsg(

    if err != nil {
      return err
    // Wait for status
    _, unsubscribe_response, err :=
    // Optional retries can be done depending on error
    // status
    if err != nil {
      return err
    events_unsubscribe_response :=
    err =
    if err != nil {
      return err
    // Optional retries can be done depending on error
    // status
    if events_unsubscribe_response.Status !=
      client_event_pb2.ClientEventsUnsubscribeResponse_OK {
        return errors.New("Client couldn't unsubscribe successfully")
// -- snip ––

4. Event handling: The established ZMQ connection will send protobuf messages corresponding to the subscribed events.

import (
// Listen for events in an infinite loop
fmt.Println("Listening to events.")
for {
  // Wait for a message on connection 
  _, message, err := zmq_connection.RecvMsg()
  if err != nil {
    return err
  // Check if received is a client event message
  if message.MessageType !=
    validator_pb2.Message_CLIENT_EVENTS {
   return errors.New("Received a message not 
requested for")
  event_list := events_pb2.EventList{}
  err = proto.Unmarshal(message.Content, &event_list)
  if err != nil {
    return err
  // Received following events from validator   
  for _, event := range event_list.Events {
    // handle event here
    fmt.Printf("Event received: %v\n", *event)
// -- snip ––

Try it out!


  1. Subscribing to Events, Using the Go SDK, from the Hyperledger Sawtooth website.
  2. Commits by arsulegai in sawtooth-cookiejar example.
  3. The Sawtooth Go SDK.

Chapter on Router-Dealer, ZMQ protocol.