This code is used to create the pre-mine for the Tari network. The pre-mine is a special transaction that creates the initial supply of Tari.
A Ledger device with the latest MinoTari Wallet
application installed for running steps 1 and 3. See
https://github.com/tari-project/tari/blob/development/applications/minotari_ledger_wallet/wallet/README.md for
instructions on how to install the application.
The code can be built as follows:
cargo build --release
Before running the code, the party members must agree on the network they are using and how many signatories will be
included in the m-of-n
script. The number of party members must at least be equal to the number of m-of-n
script
signatories, whereas the backup signatory can be an additional party member or one of the m-of-n
script signatories.
Party members will run steps 1 and 3. An independent leader must also be present and will be responsible for running
step 2.
The code can be run using the pre-compiled binaries:
tari_pre_mine_generation [OPTIONS] <COMMANDS>
or directly form the source code:
cargo run --release -- [OPTIONS] <COMMANDS>
Help:
Usage: tari_pre_mine_generation [OPTIONS] <COMMAND>
Commands:
step1-script-inputs This step is run by each party member and generates indexed script inputs for the leader for all pre-mine UTXOs
step2-genesis-file This step is run by the leader and generates the pre-mine UTXOs and the kernel for the genesis block
step3-verify This step is run by each party member and verifies the genesis block pre-mine outputs from step 2
help Print this message or the help of the given subcommand(s)
Options:
--network <NETWORK> [default: mainnet]
-h, --help Print help
-V, --version Print version
This step is run by each party member and generates indexed script inputs for the leader for all pre-mine UTXOs
according to the specification in the Tari project source code. Please note that --multi-sig-count
does not include
the fail-safe wallet.
Help:
Usage: tari_pre_mine_generation step1-script-inputs [OPTIONS] --alias <ALIAS> --account <ACCOUNT> --multi-sig-count <MULTI_SIG_COUNT>
Options:
--alias <ALIAS>
--account <ACCOUNT>
--multi-sig-count <MULTI_SIG_COUNT>
--fail-safe-wallet
-h, --help Print help
Example console output:
Running 'step1-script-inputs' of 'Tari Pre-mine Generation' ...
- 1 of 164 created
- 2 of 164 created
- 3 of 164 created
...
- 162 of 164 created
- 163 of 164 created
- 164 of 164 created
Concluded 'step1-script-inputs'
Your session ID is: 'S8yV6QNnNm_alice'
Your session's output directory is: 'C:\Users\<USER>\Documents\tari_pre_mine\create\S8yV6QNnNm_alice'
Session info saved to: 'step_1_for_self.json'
Pre-mine schedule saved to: 'pre_mine_items.csv'
Please send 'step_1_for_leader_from_alice.json' to leader for step 2
This step is run by the leader and generates the pre-mine UTXOs and the kernel that will be included in the genesis block. All party files generated in step 1 must be copied into any folder, as long as they are together.
Help:
Usage: tari_pre_mine_generation step2-genesis-file --party-files-path <PARTY_FILES_PATH>
Options:
--party-files-path <PARTY_FILES_PATH>
-h, --help Print help
Example console output:
Running 'step2-genesis-file' of 'Tari Pre-mine Generation' ...
Concluded 'step2-genesis-file'
Your session ID is: '6NmxwyzuEM_leader'
Your session's output directory is: 'C:\Users\<USER>\Documents\tari_pre_mine\create\6NmxwyzuEM_leader'
Party files moved to : 'C:\Users\<USER>\Documents\tari_pre_mine\create\6NmxwyzuEM_leader'
Outputs written to: 'esmeralda_pre_mine.json'
Please send 'esmeralda_pre_mine.json' to parties for step 3
This step is run by each party member and will verify the pre-mine output file from step 2. Output files for the leader generated by the other party members as well as the leader's pre-mine output file needs to be copied into the session folder generated in step 1.
Help:
Usage: tari_pre_mine_generation step3-verify --session-id <SESSION_ID>
Options:
--session-id <SESSION_ID>
-h, --help Print help
Example console output:
Running 'step3-verify' of 'Tari Pre-mine Generation' ...
- 1 of 164 verified
- 2 of 164 verified
- 3 of 164 verified
...
- 162 of 164 verified
- 163 of 164 verified
- 164 of 164 verified
Concluded 'step3-verify'
Pre-mine file 'esmeralda_pre_mine.json' successfully verified
The pre-mine file must be included in the Tari source code for the specified network. The party-members should download the pre-mine file from the source code and verify that it is correct by repeating step 3. This can be done as part of the review process and again afterward when the code is released.
If the pre-mine file was created for mainnet, the verification process should be repeated by each party member when the source code is frozen for release. This is to ensure that the pre-mine file has not been tampered with.