-
Notifications
You must be signed in to change notification settings - Fork 159
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
Adding CircSupply Calculations #710
Conversation
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.
This logic should be replacing that in total_fil_circ_supply
, this isn't connected in any way.
Also there is a lot of duplicate logic, try to create abstractions to reduce this, somewhat like how it is done in total_fil_circ_supply
currently
Building on what Austin said, I dont see why you need the ChainStore in the first place? I dont see any indications that the ChainStore is needed. Every time |
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.
I don't think incomplete network upgrade logic is worth bringing in, especially since untested. Can you please just remove it and just have the calculation based on the original and add TODOs where necessary? It's unclear we will even support this upgrade
Co-authored-by: Austin Abell <austinabell8@gmail.com>
Co-authored-by: Austin Abell <austinabell8@gmail.com>
Most of this stuff should probably live in the state manager. This is because there will API endpoint implemented for most/all of these functions. |
vm/interpreter/src/vm.rs
Outdated
let default_preignition = | ||
setup_preignition_genesis_actors_testnet(self.store).unwrap_or_default(); | ||
let default_postignition = | ||
setup_postignition_genesis_actors_testnet(self.store).unwrap_or_default(); |
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.
This logic should not be inside of the VM. Also, this is being called every time there is a send in the VM, terribly inefficient
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.
I think this should be passed into the VM::new() as a function pointer right? I believe that was the whole point of that change.
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.
Well, acutally I dont meant that directly. It should be called every time you do a get_vm_circulating_supply. and that is what should be passed as the funciton pointer
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.
The circ supply calculation should yes, this is not really related to that, and this function should not be called every time that is called, only when it's not initialized
pre_ignition: GenesisInfo, | ||
post_ignition: GenesisInfo, |
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.
This should not be attached to the runtime, this does not allow for swapable circ supply calculations
…zed genesis for state manager
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.
did some cleanup after your review @ec2 if you want to double check
looked at the changes, lgtm |
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes #677
Other information and links