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

Low min difficulty, and smoother adjustment #25

Merged
merged 1 commit into from
Jul 23, 2014

Conversation

dooglus
Copy link
Collaborator

@dooglus dooglus commented Jul 22, 2014

This is a hard-fork change.

It will allow us to have 1-minute blocks, rather than the 3 minute blocks we're currently seeing.

It lowers the minimum staking difficulty to 16 times lower, and uses the average time per block of the last 16 blocks rather than just the last 2, so difficulty won't jump around as much.

This will need editing (in main.cpp):

const int LOWER_DIFFICULTY_START = 42000;

based on when we want the hard fork to happen.

I've not been able to get a testnet instance running, because I'm stuck on the PoW stage and so this code isn't very well tested yet.

Are you able to test this change?

@l0rdicon
Copy link
Collaborator

Yes I can. I'll also document the testnet setup for us and get a base chain we can use in the future with with the pow and reasonable send list completed.

I'l a little under the weather but this is high on my to do list, will have this ready tonight or tomorrow for sure.

This can be merged into develope any time, when I get to testing I'll merge it in if it hasn't already.

I'm also going to create the staging branch I referred to. The idea would be develope->staging->master and small fixes updates can go directly into staging before being merged into master.

I believe thats a reasonable way to organize things but suggestions are also welcome

@dooglus
Copy link
Collaborator Author

dooglus commented Jul 23, 2014

I read http://nvie.com/posts/a-successful-git-branching-model/ and agree that it's a great way to use git.

It's pretty much exactly the same model I've used in the past (except we never deleted branches when we were done with them, so things got incredibly messy).

I'll merge this right now.

dooglus added a commit that referenced this pull request Jul 23, 2014
Low min difficulty, and smoother adjustment
@dooglus dooglus merged commit 06bc20d into nochowderforyou:develope Jul 23, 2014
@dooglus
Copy link
Collaborator Author

dooglus commented Jul 23, 2014

I figured I can test this as follows:

  1. back up ~/.clam
  2. add "connect=127.0.0.1" to clam.conf
  3. change the LOWER_DIFFICULTY_START value to the current block
  4. run clam-qt as usual
  5. watch what happens
  6. stop and revert to backup

That way I can use mainnet as if it was testnet without affecting anything.

I'll post my findings.

@dooglus
Copy link
Collaborator Author

dooglus commented Jul 23, 2014

http://pastie.org/pastes/9414363/text is a log of how the new difficulty adjustment testing went

I had a few interruptions, causing it to look like some blocks were very slow.

The difficulty was adjusted to get the average speed back on track, as expected, but using a moving average maybe causes 'overshoots'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants