Page MenuHomePhabricator

chainparams: add allowed assumeutxo values
ClosedPublic

Authored by PiRK on Mar 22 2022, 15:02.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa5dc7a8acfa5: chainparams: add allowed assumeutxo values
Summary

Values for mainnet and testnet will be specified in a follow-up PR that can be
scrutinized accordingly. This structure is required for use in snapshot activation
logic.

This is a backport of core#19806 [4/8] and core#21584 [2 & 3/5]
https://github.com/bitcoin/bitcoin/pull/19806/commits/7a6c46b37edb8bfa0085d202aa7e9427d5e4fceb
https://github.com/bitcoin/bitcoin/pull/21584/commits/00000077098a23e0ac9781f5f799c90fd2fd97de
https://github.com/bitcoin/bitcoin/pull/21584/commits/fa5668bfb34e2778936af30e9fb6bd3c6bcf41fd (partial)

Notes:

  • The new circular dependency was added by core in a later commit. We already need it here.
  • We also check the allowed hashes in a functional test reproducing the deterministic regtest chain and allowed hashes.

Depends on D11328

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Mar 22 2022, 15:02

Tail of the build log:

/work /work/abc-ci-builds/lint-circular-dependencies
A new circular dependency in the form of "node/coinstats -> validation -> node/coinstats" appears to have been introduced.

/work/abc-ci-builds/lint-circular-dependencies
Build lint-circular-dependencies failed with exit code 1
PiRK edited the summary of this revision. (Show Details)

add needed expected circular dependency (was previously added in D11239 by mistake)

Fabien requested changes to this revision.Mar 24 2022, 20:44
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/chainparams.cpp
495 ↗(On Diff #32887)

How can I reproduce these hashes ?

This revision now requires changes to proceed.Mar 24 2022, 20:44
PiRK planned changes to this revision.Mar 31 2022, 15:20
PiRK edited the summary of this revision. (Show Details)

add a functional test to reproduce the hashes on REGTEST, fix the hash for height 210 which I got wrong previously (it seems like this hash is not actually tested in D11240, as the call to CreateAndActivateUTXOSnapshot for height 210 is expected to fail because a snapshot is already loaded).

PiRK planned changes to this revision.Apr 11 2022, 12:49

I need to remove some unused code (PR21584)

PiRK edited the summary of this revision. (Show Details)

squash with changes from core#21584 (remove unused code and use a more specific hash type than uint256)

This revision is now accepted and ready to land.Apr 11 2022, 19:10