-
Notifications
You must be signed in to change notification settings - Fork 1
Apply new workaround for InstaJustify issue #46
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
Apply new workaround for InstaJustify issue #46
Conversation
Signed-off-by: Andres Correa Casablanca <andres@thirdhash.com>
Does it happen because node runs out of mature coins? In that case, you can try to use small |
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. |
nzmdn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK c913e80
experiments/forking_simulation.py
Outdated
| 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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
nzmdn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 0f1b8fd
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