Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: exit logic for pre-mine spend #6615

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Oct 8, 2024

Description

Add exit logic for immediate pre-mine spend. In other cases, the wallet should be started so that the transaction(s) can be broadcast.

Motivation and Context

With immediate pre-mne spend, the blockchain does not exist yet and the transaction will be rejected if the wallet is started.

How Has This Been Tested?

System-level testing completed with base nodes and network available. The wallet did not connect to the network and could not broadcast partially completed transaction to a base node.

Step 3

PS H:\node_01> .\minotari_console_wallet.exe --base-path . --network esmeralda --config $pwd"\config\config.toml" --log-config $pwd"\config\log4rs_console_wallet.yml" pre-mine-spend-encumber-aggregate-utxo --session-id 8rJDGzkJv598xVJ3 --input-file-names=step_2_for_leader_from_bob.json --pre-mine-file-path "C:\Users\<user>\Documents\tari_pre_mine\create"
Initializing logging according to "H:\\node_01\\config\\log4rs_console_wallet.yml"
Minotari Console Wallet running... (Command mode started)
==============
Command Runner
==============

1. PreMineSpendEncumberAggregateUtxo(PreMineSpendEncumberAggregateUtxoArgs { session_id: "8rJDGzkJv598xVJ3", input_file_names: ["step_2_for_leader_from_bob.json"], pre_mine_file_path: Some("C:\\Users\\<user>\\Documents\\tari_pre_mine\\create") })


  Processed 1 of 6 transactions
  Processed 2 of 6 transactions
  Processed 3 of 6 transactions
  Processed 4 of 6 transactions
  Processed 5 of 6 transactions
  Processed 6 of 6 transactions

Concluded step 3 'pre-mine-spend-encumber-aggregate-utxo'
Send 'step_3_for_parties.json' to parties for step 4

Minotari Console Wallet running... (Command mode completed)

Shutting down wallet... Done.

Step 5

PS H:\node_01> .\minotari_console_wallet.exe --base-path . --network esmeralda --config $pwd"\config\config.toml" --log-config $pwd"\config\log4rs_console_wallet.yml" pre-mine-spend-aggregate-transaction --session-id 8rJDGzkJv598xVJ3 --input-file-names=step_4_for_leader_from_bob.json
Initializing logging according to "H:\\node_01\\config\\log4rs_console_wallet.yml"
Minotari Console Wallet running... (Command mode started)
==============
Command Runner
==============

1. PreMineSpendAggregateTransaction(PreMineSpendAggregateTransactionArgs { session_id: "8rJDGzkJv598xVJ3", input_file_names: ["step_4_for_leader_from_bob.json"] })


  Processed 1 of 6

  Processed 2 of 6

  Processed 3 of 6

  Processed 4 of 6

  Processed 5 of 6

  Processed 6 of 6

Genesis block immediate pre-mine spend information: 'esmeralda_pre_mine_addition.json' in 'C:\Users\<user>\Documents\tari_pre_mine\spend\8rJDGzkJv598xVJ3'
Concluded step 5 'pre-mine-spend-aggregate-transaction'

Minotari Console Wallet running... (Command mode completed)

Shutting down wallet... Done.

What process can a PR reviewer use to test or verify this change?

Code review.

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@hansieodendaal hansieodendaal changed the title feat: exit logic feat: exit logic for pre-mine spend Oct 8, 2024
@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

Test Results (CI)

    3 files    129 suites   38m 56s ⏱️
1 326 tests 1 325 ✅ 0 💤 1 ❌
3 976 runs  3 975 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit efe2ba2.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 8, 2024

Test Results (Integration tests)

 2 files  11 suites   23m 51s ⏱️
36 tests 35 ✅ 0 💤 1 ❌
37 runs  36 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit efe2ba2.

♻️ This comment has been updated with latest results.

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Oct 8, 2024
@SWvheerden SWvheerden merged commit b3ea19a into tari-project:development Oct 8, 2024
16 of 18 checks passed
@hansieodendaal hansieodendaal deleted the ho_exit_log branch October 9, 2024 05:32
sdbondi added a commit to sdbondi/tari that referenced this pull request Oct 10, 2024
* development:
  chore(ci): remove ledger nanos and update ledger key gif resources (tari-project#6617)
  feat: improve mempool error msg when mempool out of sync (tari-project#6618)
  feat: exit logic for pre-mine spend (tari-project#6615)
  chore: new release esme v1.6.0-pre.0 (tari-project#6614)
  feat: enable identity grpc method by default (tari-project#6613)
  feat: pre-mine introduce temp ban and add counters (tari-project#6612)
  chore: changes mainnet default network (tari-project#6610)
  chore(ci): add riscv64 builds and misc script fixes (tari-project#6611)
  feat!: esme test pre-mine with immediate spend (tari-project#6609)
  feat!: add context to ffi callbacks (tari-project#6608)
  feat: add default exclude dial (tari-project#6607)
  feat!: add input mr into genesis block (tari-project#6601)
  feat: update pre_mine specification (tari-project#6606)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants