Skip to content

Commit

Permalink
Bump automatic replay protection to Nov 2020 upgrade
Browse files Browse the repository at this point in the history
Summary:
This returns main chain to ForkID of 0 after the May 2020
upgrade, and implements automatic replay protection for
the Nov 2020 upgrade.

The next upgrade time is precisely 184.0 days after the
phonon activation time, and is:
  Sunday, November 15, 2020 12:00:00 PM   UTC

For reference see last HF: D3868

Depends on D5289

Test Plan: `ninja check-all` ; check timestamp carefully

Reviewers: #bitcoin_abc, deadalnix, Mengerian, markblundeberg

Reviewed By: #bitcoin_abc, deadalnix, Mengerian

Subscribers: Mengerian, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5253
  • Loading branch information
markblundeberg authored and jasonbcox committed Feb 16, 2020
1 parent 13b62df commit c4fd037
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/release-notes.md
Expand Up @@ -8,6 +8,7 @@ This release includes the following features and fixes:
it returns the active commands and the corresponding execution time.
- `ischange` field of boolean type that shows if an address was used for change
output was added to `getaddressinfo` method response.
- Bump automatic replay protection to Nov 2020 upgrade.


New RPC methods
Expand Down
9 changes: 9 additions & 0 deletions src/chainparams.cpp
Expand Up @@ -174,6 +174,9 @@ class CMainParams : public CChainParams {
// May 15, 2020 12:00:00 UTC protocol upgrade
consensus.phononActivationTime = 1589544000;

// Nov 15, 2020 12:00:00 UTC protocol upgrade
consensus.axionActivationTime = 1605441600;

/**
* The message start string is designed to be unlikely to occur in
* normal data. The characters are rarely used upper ASCII, not valid as
Expand Down Expand Up @@ -398,6 +401,9 @@ class CTestNetParams : public CChainParams {
// May 15, 2020 12:00:00 UTC protocol upgrade
consensus.phononActivationTime = 1589544000;

// Nov 15, 2020 12:00:00 UTC protocol upgrade
consensus.axionActivationTime = 1605441600;

diskMagic[0] = 0x0b;
diskMagic[1] = 0x11;
diskMagic[2] = 0x09;
Expand Down Expand Up @@ -573,6 +579,9 @@ class CRegTestParams : public CChainParams {
// May 15, 2020 12:00:00 UTC protocol upgrade
consensus.phononActivationTime = 1589544000;

// Nov 15, 2020 12:00:00 UTC protocol upgrade
consensus.axionActivationTime = 1605441600;

diskMagic[0] = 0xfa;
diskMagic[1] = 0xbf;
diskMagic[2] = 0xb5;
Expand Down
2 changes: 2 additions & 0 deletions src/consensus/params.h
Expand Up @@ -84,6 +84,8 @@ struct Params {
int gravitonHeight;
/** Unix time used for MTP activation of 15 May 2020 12:00:00 UTC upgrade */
int phononActivationTime;
/** Unix time used for MTP activation of 15 Nov 2020 12:00:00 UTC upgrade */
int axionActivationTime;

/**
* Don't warn about unknown BIP 9 activations below this height.
Expand Down
2 changes: 1 addition & 1 deletion src/validation.cpp
Expand Up @@ -464,7 +464,7 @@ std::string FormatStateMessage(const CValidationState &state) {
static bool IsReplayProtectionEnabled(const Consensus::Params &params,
int64_t nMedianTimePast) {
return nMedianTimePast >= gArgs.GetArg("-replayprotectionactivationtime",
params.phononActivationTime);
params.axionActivationTime);
}

static bool IsReplayProtectionEnabled(const Consensus::Params &params,
Expand Down

0 comments on commit c4fd037

Please sign in to comment.