Hyperledger Indy: Create genesis transaction file

1.2k Views Asked by At

I have 4 nodes set up on 4 vagrant ubuntu-based machines. I have generated the keys required for these nodes using the command: init_indy_node VAL1 0.0.0.0 9701 0.0.0.0 9702 111111111111111111111111111N1. According to the documentation, there is a script named generate_indy_pool_transactions which generates the keys with predefined node names i.e Node1, Node2 and generates the keys that are always the same.

I want to create my custom network with my generated keys. I could not find any document to generate the genesis transaction file.

Is there any way to generate this file so that I can bootstrap my network?

Any suggestions/comments are welcome.

2

There are 2 best solutions below

2
On

Thewre is genesis_from_files.py script that you are welcome to try: https://github.com/sovrin-foundation/steward-tools/tree/master/create_genesis

As described start-nodes.md, in order to setup a pool the following actions are needed:

  • set Network name in config file
  • generate keys (init_indy_node script can be used for this)
  • provide genesis transactions files which will be a basis of initial Pool

Indy doesn't have any genesis files going with it since this is up to Indy-based Networks (such as Sovrin genesis).

What Indy has is a generate_indy_pool_transactions script which should be used for test purposes only. It generates keys based on the Nodes names (so if the same Node names are passed there, then the keys will be the same every time).

So, there are the following options on how to create genesis files in Indy:

  • Create them manually.
  • Contribute to Indy creating a script for generation (I think the logic from generate_indy_pool_transactions can be used for this).
  • Run generate_indy_pool_transactions (which will generate keys and genesis files), then re-init keys correctly and modify the genesis files from generate_indy_pool_transactions to point to correct keys.
  • Use other helper scripts such as Sovrin Foundation's one: https://github.com/sovrin-foundation/steward-tools/tree/master/create_genesis (Sovrin is the main Indy deployment now).
0
On

To create custom network with actors generated keys and to generate pool_transactions_genesis and domain_transactions_genesis file, you have to use indy-plenum.

You can find details on the following tutorial:

https://taseen-junaid.medium.com/hyperledger-indy-custom-network-with-indy-node-plenum-protocol-ledger-85fd10eb5bf5

You can find the code base of that tutorial into following link:

https://github.com/Ta-SeenJunaid/Hyperledger-Indy-Tutorial