MiniFabric Peer Hierarchy Questions


Brett Tiller
 

I’m attempting to use minifab to support a hierarchical car communication network I’ve created via the spec.yaml file.  At the top of the network are managers followed by fleets (a fleet of cars) followed by individual cars.  Essentially managers contain fleets and fleets contain cars. A car may drop off the fleet and join another fleet or rejoin the same.  And a fleet could drop off from a manager and join another manager or rejoin the same.   When a car or fleet rejoins they should be able to catch up on messages that were missed when they were offline.   I’m a newbie to the blockchain technology, but I’ve reviewed the six minifabric training videos as well as the console app, and the sample networks.  My environment is wsl using Ubuntu 20.0.4.  I have questions below.

 

  1. In my network each manager, fleet and car is its own organization so that each could be dynamically removed/joined.  However, when I tried to make each unique I found the following issues below.  How do I fix these?
    1. All peers were joined to each channel so I no longer had unique channels for communication between a fleet and the cars in them and a manager and a fleet.
    2. The console app would not import the assets.zip as it complained that there was an invalid filename, but no specifics were provided.

 

  1. Using the minifab command line and/or console app I don’t see how I can remove a car from a fleet or remove a fleet from a manager.  It appears that I would need to run a script in the background to dynamically edit a channel file?  If that is the case how would I get the system to recognize the file change?

 

  1. It appears that to rejon/join another fleet/manager perhaps I could try using argument orgjoin?  I did try using the join command but I see that it joined all peers to a channel regardless of arguments that I provided.

 

  1. I’ve been trying to debug running the application chain code that is built in with minifab.   The code written using go runs with no errors ( I use command ./minifab apprun -l go) .  However, when I run the node code (command ./minifab apprun -l node), I see the error that python is not installed though I do have it installed and it is accessible via the command line (i.e when I type python -v I get the version 2.7.18 returned).  The error produced by the chaincode is: gyp ERR! stack Error: Could not find any Python installation to use.  What’s the workaround for this issue?

 

  1. When I modify the chaincode provided file app/go/main.go I do not see this code change propagated to file vars/app/go/main.go .  I’ve tried running command ‘minifab cleanup’, and removing the vars/app directory.  I’m confused re what is the source of the vars/app directory?  I had expected that changes made in the app directory would be propagated to vars/app?

 

Thanks,

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 


email4tong@gmail.com
 

Brett,
    Thanks for using Minifabric, as you have noticed, the channel join command puts all the peers in the org into the channel, it was done on purpose, like many aspect of Minifabric, it is to make things very easy for users. That of course comes with limitations. However, you can use channel update to do nearly every fabric operation, as it is the ultimate way of dealing with Fabric, all changes regardless channel join, channel creation, updates etc all results in channel configuration changes.

In terms of the node chain code, if I remember right, Minifabric already include mounting a directory to Minifabric container, it could be just missing dependencies. I also think that Minifabric allows you to install chain code with the package, if your chain code is packaged correctly, it should not produce the errors.

In terms of changing app, I think you need to change the mounting target directory, because, when you do app run command, it only copies at the first time, it would not copy every time for obvious reasons (cost). So if you make changes to your app, then you will need just to make changes to the app/go/main.go file I think.

Also if you found some other issues and like to fix them, you are more than welcome to submit a PR, I will be happy to review and get it merged if it improves Minifabric.

Best wishes.

Tong.

On Jun 20, 2022, at 5:59 PM, Brett Tiller <btiller@...> wrote:

I’m attempting to use minifab to support a hierarchical car communication network I’ve created via the spec.yaml file.  At the top of the network are managers followed by fleets (a fleet of cars) followed by individual cars.  Essentially managers contain fleets and fleets contain cars. A car may drop off the fleet and join another fleet or rejoin the same.  And a fleet could drop off from a manager and join another manager or rejoin the same.   When a car or fleet rejoins they should be able to catch up on messages that were missed when they were offline.   I’m a newbie to the blockchain technology, but I’ve reviewed the six minifabric training videos as well as the console app, and the sample networks.  My environment is wsl using Ubuntu 20.0.4.  I have questions below.
 
  1. In my network each manager, fleet and car is its own organization so that each could be dynamically removed/joined.  However, when I tried to make each unique I found the following issues below.  How do I fix these?
    1. All peers were joined to each channel so I no longer had unique channels for communication between a fleet and the cars in them and a manager and a fleet.
    2. The console app would not import the assets.zip as it complained that there was an invalid filename, but no specifics were provided.
 
  1. Using the minifab command line and/or console app I don’t see how I can remove a car from a fleet or remove a fleet from a manager.  It appears that I would need to run a script in the background to dynamically edit a channel file?  If that is the case how would I get the system to recognize the file change?
 
  1. It appears that to rejon/join another fleet/manager perhaps I could try using argument orgjoin?  I did try using the join command but I see that it joined all peers to a channel regardless of arguments that I provided.
 
  1. I’ve been trying to debug running the application chain code that is built in with minifab.   The code written using go runs with no errors ( I use command ./minifab apprun -l go) .  However, when I run the node code (command ./minifab apprun -l node), I see the error that python is not installed though I do have it installed and it is accessible via the command line (i.e when I type python -v I get the version 2.7.18 returned).  The error produced by the chaincode is: gyp ERR! stack Error: Could not find any Python installation to use.  What’s the workaround for this issue?
 
  1. When I modify the chaincode provided file app/go/main.go I do not see this code change propagated to file vars/app/go/main.go .  I’ve tried running command ‘minifab cleanup’, and removing the vars/app directory.  I’m confused re what is the source of the vars/app directory?  I had expected that changes made in the app directory would be propagated to vars/app?
 
Thanks,
 
Brett Tiller
Sr. Software Engineer
984-349-4239 (mobile)
 
<image001.png>