Page MenuHomePhabricator

Add fork block checkpoints and update defaultAssumedValid and min chain work (main and testnet)
ClosedPublic

Authored by freetrader on Aug 23 2017, 16:29.

Details

Summary

Changes to chain params:

  • added fork block checkpoints for mainnet and testnet3
  • update defaultAssumeValid for both chains
  • updated nMinimumChainWork to match the defaultAssumeValid blocks

Having a check point on fork block means nodes cannot be led onto wrong
UAHF-compatible chain.

Knowing that you are on right Bitcoin Cash chain after the fork block
can be used to optimize some code which determines whether we are pre-fork
or post-fork.

Test Plan

make check
Run bitcoind with the changes on mainnet and testnet

Diff Detail

Repository
rABC Bitcoin ABC
Branch
update_checkpoints
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 752
Build 752: arc lint + arc unit

Event Timeline

Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptAug 23 2017, 16:29

wonder if we could just add the 478559 and then rely on assumevalid to lessen the load due to validation during the sync step.

@sickpig : Yes, you are right. I will update the definitions accordingly (also need to update testnet's defaultAssumeValid hash).

I am wondering about chainTxData which is used by GuessVerificationProgress() . That looks like it's fairly outdated as well. But that could be done in a separate diff.

please add a comment for the fork block.

This revision is now accepted and ready to land.Aug 23 2017, 23:46

Add comments from review, update minimum chain work and defaultAssumeValid hashes

freetrader edited edge metadata.

Changes made based on previous review comments, quite a few so I'm returning to review:

  • update defaultAssumeValid for mainnet and testnet3
  • updated nMinimumChainWork to match the defaultAssumeValid blocks
  • added fork block checkpoint for testnet3
  • added comment ahead of fork block checkpoints

I've run this patch on mainnet and testnet3 to test, and also ran extended regtest suite over it.

This revision is now accepted and ready to land.Aug 24 2017, 07:42
freetrader retitled this revision from Add fork block checkpoint and update most recent checkpoint (mainnet) to Add fork block checkpoints and update defaultAssumedValid and min chain work (main and testnet).Aug 24 2017, 09:13
freetrader edited the summary of this revision. (Show Details)
freetrader edited the test plan for this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.