Skip to content

Conversation

@castarco
Copy link

This PR enables again the auto-finalization / insta-justify feature, and mitigates a newly introduced stalling problem by using all the proposer keys in a single node during the initialization phase (although is does not work as smooth as it should, because it gets stuck for a few minutes for each individual sub-experiment before all the nodes can be spawned).

The remaining stalling problems can be mitigated by fine-tuning some parameters (like how many blocks do we wait until the maturity rules are applied, or the initial block difficulty), but I leave this for future PRs.

Signed-off-by: Andres Correa Casablanca andres@thirdhash.com

Signed-off-by: Andres Correa Casablanca <andres@thirdhash.com>
@castarco castarco added bug Something isn't working enhancement New feature or request labels May 28, 2019
@castarco castarco self-assigned this May 28, 2019
@nzmdn
Copy link
Member

nzmdn commented May 28, 2019

mitigates a newly introduced stalling problem

Does it happen because node runs out of mature coins? In that case, you can try to use small -stakesplitthreshold, for example 10 * UNIT.

@castarco
Copy link
Author

castarco commented May 28, 2019

Does it happen because node runs out of mature coins? In that case, you can try to use small -stakesplitthreshold, for example 10 * UNIT.

Indeed, this is already done (so we have at least slightly above 100 coins per proposer), but I don't want to overshoot. I think it's better to know what's the optimal number so we can minimize the effective difficulty change once the maturity rule starts.

Copy link
Member

@nzmdn nzmdn left a comment

Choose a reason for hiding this comment

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

Concept ACK c913e80

self.nodes[validator_id].importmasterkey(
regtest_mnemonics[self.num_proposer_nodes + idx]['mnemonics']
lucky_proposer = self.nodes[lucky_proposer_id]
for proposer_id in self.proposer_node_ids:
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to add a comment telling that the lucky proposer creates wallets for other proposers and temporarily uses them for staking.

Copy link
Author

Choose a reason for hiding this comment

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

As I'm already working on this part of the code for a new PR, I'll apply your suggestion there.

Signed-off-by: Andres Correa Casablanca <andres@thirdhash.com>
@castarco castarco requested a review from a team June 5, 2019 12:37
Copy link
Member

@nzmdn nzmdn left a comment

Choose a reason for hiding this comment

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

utACK 0f1b8fd

@castarco castarco merged commit b0c23ed into dtr-org:master Jun 5, 2019
@castarco castarco deleted the fix-stalled-node-instajustify-workaround branch June 7, 2019 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants