-
Notifications
You must be signed in to change notification settings - Fork 2
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
Stake Relativization Specification + Fixes #86
Conversation
…otal-stake-inference
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.
Good work!
self.local_chain = new_chain | ||
if new_chain != self.local_chain: | ||
self.forks.remove(new_chain) | ||
self.forks.append(self.local_chain) |
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.
oops
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.
c'est la vie
The main thrust of this PR is implementing Stake Relativization, but in doing so, a few issues with the orphan handling and fork management code came up and so this PR has gotten a bit more complex with the various fixes.
Unfortunately the bugs were revealed after I had done the majority of the stake relativization implementation otherwise I would have split them out into smaller PR's.
notable bugs:
I've updated the specification in Notion from learnings having gone through the implementation process, namely the inference period is no longer the entire epoch, we need a stable value for total stake for when we enter the next epoch:
https://www.notion.so/Stake-Relativization-65f5ed5522b64c36b625652023318d88?pvs=4#6e3c4d567eda49079822662075b847ed