Channel configuration updates

As mentioned earlier in this chapter, there are many reasons why a channel configuration may have to be changed. As channel behavior is completely dictated by its configuration, and any update is recorded on the blockchain, hence overriding the earlier configuration, this is a very sensitive operation that must be restricted to privileged users, just like the initial portions of our application creation steps such as channel creation and joining (see Chapter 5Exposing Network Assets and Transactions) were. An exhaustive discussion and demonstration of channel configuration changes is beyond the scope of this book, but we will show the mechanism of updates and a way to wrap those mechanisms in our application; this mechanism and process can be applied to any configuration change.

For demonstration, we will use the common situation where a new organization and peers must be added to the application. Consider our trade scenario where thus far, an exporter and its bank have shared an organization whose MSP and peer is maintained by the latter. The importer and its bank belong to a single organization as well, the logic being that banks have more incentive as well as resources to maintain peers and MSPs. But this logic may not hold forever. Let's say our exporter, who started out as a small-scale operator, gains higher profit and a higher reputation for honesty as well as quality over time. Now a large-scale exporter of raw material with huge cash reserves and clout in the market, it has an incentive to join a trade network on blockchain as a peer rather than a dependent of a bank. It also maintains bank accounts with different banks and therefore has the need and potential to participate in multiple blockchains (channels) simultaneously. It would like to continue to participate in the trade channel and wrapping application, but in its own organization, running its own MSP and its own network peer, independent of the bank.

The resulting network that we must create is illustrated in Figure 9.3: The augmented trade network with an organization, MSP, and peer for an exporter (or exporting entity):

Figure 9.3: The augmented trade network with an organization, MSP, and peer for an exporter (or exporting entity)

We'll call the new organization ExportingEntityOrg, its MSP ExportingEntityOrgMSP, and the peer exporting entity. This is because the names exporter, ExporterOrg, and ExporterOrgMSP have already been taken in our network to represent the exporter's bank; new organizations and peers must have unique names.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset