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

[Consensus] Remove IsSuperMajority #1418

Merged
merged 3 commits into from
Mar 18, 2020

Conversation

random-zebra
Copy link

IsSuperMajority checks are slow, and not needed after enforcement.
Also ISM is not a good mechanism for deployment, so will not likely be used again after BIP65.
(based on bitcoin#8391)

We should implement better fork signal/activation solutions such as BIP 9 in the future.

Note: testnet resync completed. currently checking resync on mainnet.

@random-zebra random-zebra added this to the 4.1.0 milestone Mar 16, 2020
@random-zebra random-zebra self-assigned this Mar 16, 2020
@random-zebra
Copy link
Author

Resync completed on mainnet as well. Times seem considerably reduced.

Testnet (< 2hrs)

2020-03-16 15:05:00 ProcessNewBlock : ACCEPTED Block 1 in 1 milliseconds with size=180
2020-03-16 16:53:19 ProcessNewBlock : ACCEPTED Block 1497081 in 2 milliseconds with size=431

Mainnet (~4.5 hours)

2020-03-16 16:55:45 ProcessNewBlock : ACCEPTED Block 1 in 1 milliseconds with size=180
2020-03-16 21:38:03 ProcessNewBlock : ACCEPTED Block 2251768 in 1 milliseconds with size=430

@furszy
Copy link

furszy commented Mar 16, 2020

Code ACK 🚀 , sync time :) .

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

looks good, doing a sync on both networks. just some non-blocking readability suggestions really

consensus.height_start_ZC = 863787;
consensus.height_start_StakeModifierV2 = 1967000; // Block v6: 0ef2556e40f3b9f6e02ce611b832e0bbfe7734a8ea751c7b555310ee49b61456
consensus.height_start_TimeProtoV2 = 2153200; // Block v7: 14e477e597d24549cac5e59d97d32155e6ec2861c1003b42d0566f9bf39b65d5
consensus.height_start_ZC = 863787; // Block v4: 5b2482eca24caf2a46bb22e0545db7b7037282733faa3a42ec20542509999a64
Copy link
Collaborator

Choose a reason for hiding this comment

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

since we're here, could we re-order the lines so that the block versions are grouped and in order (improve readability)?

also, so we need to keep height_start_MessSignaturesV2 since it has the same value as height_start_TimeProtoV2?

Copy link
Author

Choose a reason for hiding this comment

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

Alphabetical order is used here.
Not sure that ordering by block version would make it more readable (not all height-based activations are about new block versions).

Copy link
Author

Choose a reason for hiding this comment

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

also, so we need to keep height_start_MessSignaturesV2 since it has the same value as height_start_TimeProtoV2

If we want to unify them into a single parameter we should find a meaningful name (maybe height_start_BlocksV7 ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

will defer and ponder this for a future PR

src/consensus/params.h Show resolved Hide resolved
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Tested ACK 8375bd8

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 8375bd8

@random-zebra random-zebra merged commit 87e3dcd into PIVX-Project:master Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants