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!: add input mr into genesis block #6601

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Oct 3, 2024

Description

  • Added the input merkle root calculation into the genesis block; previously, this was just a default hash, which is incorrect. This will enable adding immediate spending of pre-mine outputs in the genesis block.
  • Added total kernel offset to the pre-mine output immediate spend ceremony.
  • Added total kernel offset to the pre-mine information added to the genesis block.
  • Added chain balance for immediate spend inputs and outputs in xxxx_genesis_sanity_check() unit tests.

Motivation and Context

The genesis block did not cater for any immediate spend inputs.

How Has This Been Tested?

  • Unit tests expanded & pass.
  • System-level tests:
    • Performed a new pre-mine creation ceremony (esmeralda).
    • Performed a pre-mine immediate spend ceremony.
    • Added the pre-mine and pre-mine immediate spend to the esmeralda_pre_mine,json embedded input file.
    • Unit test fn esmeralda_genesis_sanity_check() passes.

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

BREAKING CHANGE: The genesis block changed; this requires a blockchain restart.

@hansieodendaal hansieodendaal requested a review from a team as a code owner October 3, 2024 17:15
Copy link

github-actions bot commented Oct 3, 2024

Test Results (CI)

    3 files    129 suites   37m 19s ⏱️
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 ab179b5.

♻️ This comment has been updated with latest results.

@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 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

Test Results (Integration tests)

36 tests  +36   36 ✅ +36   15m 28s ⏱️ + 15m 28s
11 suites +11    0 💤 ± 0 
 2 files   + 2    0 ❌ ± 0 

Results for commit ab179b5. ± Comparison against base commit ab59801.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, just dont make it a reset now for nextnet

base_layer/core/src/blocks/genesis_block.rs Show resolved Hide resolved
@hansieodendaal hansieodendaal force-pushed the ho_input_mr_into_genesis_block branch 2 times, most recently from 2e09aa6 to 0d779ce Compare October 4, 2024 12:17
Added the input merkle root calculation into the genesis block; previously
this was just a default hash, which is incorrect. This will enable adding
immediate spending of pre-mine outputs in the genesis block.
@hansieodendaal hansieodendaal force-pushed the ho_input_mr_into_genesis_block branch from fb23f24 to ab179b5 Compare October 6, 2024 18:54
@SWvheerden SWvheerden merged commit 27ffefa into tari-project:development Oct 7, 2024
17 of 18 checks passed
@hansieodendaal hansieodendaal deleted the ho_input_mr_into_genesis_block branch October 8, 2024 08:18
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 P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants