Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Fixed Difficulty calculator #663

Merged
merged 12 commits into from
Jan 29, 2019

Conversation

rojotek
Copy link
Member

@rojotek rojotek commented Jan 25, 2019

Fixed difficulty calculator.
Goal is to have a simple replacement in genesis blocks for devmode options currently floating around.

@rojotek rojotek changed the title Fixed Difficulty calculator Experiments Fixed Difficulty calculator Jan 27, 2019
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

I'd suggest removing the new AT and supporting infrastructure since dev.json will use the fixed difficulty code anyway and all the ethash tests use dev.json. Otherwise LGTM.

import org.junit.Before;
import org.junit.Test;

public class FixedMiningDifficultyAcceptanceTest extends AcceptanceTestBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can just be removed now that dev mode is using the fixed difficulty calculator - pretty much every AT is using it and mining transactions so if it ever breaks they'll all grind to a halt because of the increased difficulty.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@@ -0,0 +1,40 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Can just use dev.json now.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@@ -120,6 +121,24 @@ public PantheonNode createArchiveNodeWithP2pDisabled(final String name) throws I
.build());
}

public Node createFixedDifficultyMinerNode(final String name) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

--network DEV will be enough to get this now.

Copy link
Member Author

Choose a reason for hiding this comment

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

or I could remove the method since fixed difficulty is being used in tests by default and the fixed difficulty AT has been deleted.

@rojotek rojotek merged commit d88e210 into PegaSysEng:master Jan 29, 2019
@rojotek rojotek deleted the fixed-difficulty-calculator branch January 29, 2019 11:35
vinistevam pushed a commit to vinistevam/pantheon that referenced this pull request Jan 29, 2019
* created fixed difficulty calculator.
* Use fixed calculator at the right spot.
* Use fixeddifficulty in the main dev.json file.
* Removed development difficulty calculators.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants