Reader small image

You're reading from  Blockchain with Hyperledger Fabric - Second Edition

Product typeBook
Published inNov 2020
PublisherPackt
ISBN-139781839218750
Edition2nd Edition
Concepts
Right arrow
Authors (6):
Nitin Gaur
Nitin Gaur
author image
Nitin Gaur

Nitin Gaur, is the director of IBM's Blockchain Labs, and an IBM Distinguished Engineer.
Read more about Nitin Gaur

Anthony O'Dowd
Anthony O'Dowd
author image
Anthony O'Dowd

Anthony O'Dowd is a Distinguished Engineer at IBM, focusing on Blockchain. He led IBM's contribution to the design and development of the new smart contract and application SDKs found in Hyperledger Fabric v2. Anthony has also made significant contributions to Hyperledger Fabric documentation and samples.
Read more about Anthony O'Dowd

Petr Novotny
Petr Novotny
author image
Petr Novotny

Petr Novotny is a research scientist at IBM Research, with an MSc from University College London and PhD from Imperial College London, where he was also a post-doctoral research associate.
Read more about Petr Novotny

Luc Desrosiers
Luc Desrosiers
author image
Luc Desrosiers

Luc Desrosiers is an IBM-certified IT architect with 20+ years of experience.
Read more about Luc Desrosiers

Venkatraman Ramakrishna
Venkatraman Ramakrishna
author image
Venkatraman Ramakrishna

Venkatraman Ramakrishna is an IBM researcher, with a BTech from IIT Kharagpur and PhD from UCLA.
Read more about Venkatraman Ramakrishna

Salman A. Baset
Salman A. Baset
author image
Salman A. Baset

Dr. Salman A. Baset is the CTO of security in IBM Blockchain Solutions.
Read more about Salman A. Baset

View More author details
Right arrow

Querying the ledger

The simplest operation an application can perform is to query a ledger. Let's examine how the registration and trading applications query a ledger in different networks:

Figure 7.10: The simplest operation an application can perform is to query a ledger

In Figure 7.10, we can see that peer1 has the registration contract installed, making it available to all applications connected to the vehicle-registration network. Similarly, Peer1 also has car contract installed for participants in the car-trading network. The registration application uses the registration contract to query the registration ledger, and the car contract to query the trading ledger.

But where are the registration and car ledgers in Figure 7.10? Let's take a closer look at the smart contracts to find out.

Smart contract packaging and namespaces

Smart contracts are placed in a package for both logical grouping and distribution. Consider an example:

Figure...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Blockchain with Hyperledger Fabric - Second Edition
Published in: Nov 2020Publisher: PacktISBN-13: 9781839218750

Authors (6)

author image
Nitin Gaur

Nitin Gaur, is the director of IBM's Blockchain Labs, and an IBM Distinguished Engineer.
Read more about Nitin Gaur

author image
Anthony O'Dowd

Anthony O'Dowd is a Distinguished Engineer at IBM, focusing on Blockchain. He led IBM's contribution to the design and development of the new smart contract and application SDKs found in Hyperledger Fabric v2. Anthony has also made significant contributions to Hyperledger Fabric documentation and samples.
Read more about Anthony O'Dowd

author image
Petr Novotny

Petr Novotny is a research scientist at IBM Research, with an MSc from University College London and PhD from Imperial College London, where he was also a post-doctoral research associate.
Read more about Petr Novotny

author image
Luc Desrosiers

Luc Desrosiers is an IBM-certified IT architect with 20+ years of experience.
Read more about Luc Desrosiers

author image
Venkatraman Ramakrishna

Venkatraman Ramakrishna is an IBM researcher, with a BTech from IIT Kharagpur and PhD from UCLA.
Read more about Venkatraman Ramakrishna

author image
Salman A. Baset

Dr. Salman A. Baset is the CTO of security in IBM Blockchain Solutions.
Read more about Salman A. Baset