-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: implement lotus-sim #6406
Conversation
2c17b83
to
520cfa8
Compare
And make it run forever by default.
Hopefully, this'll make this code a bit easier to approach.
Add a helper function so we don't need to constantly repeat ourselves.
It doesn't really matter, and it ensures they all get executed in-order.
Instead of packing till we see "full". Prove-commits are large, we may have room for some more pre-commits.
This way, we can easily walk the chain and: 1. Inspect messages and their results. 2. Inspect tipset state.
Useful to backup old simulations before creating a new one.
Previously, we assumed the network was "optimal". Now, we're using real numbers.
Resolves #6513 Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
f6bdea0
to
69a8a6b
Compare
To the reviewer: Most of the changes here are just a part of the simulation, but not all:
Please pay careful attention to 4. It shouldn't cause any problems (mostly used in genesis and some specific upgrades), and brings the function in-line with expectations. But it's still something that's good to look at carefully. |
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.
Mostly cosmetic nits.
It would also be really great to have at least a basic integration test, so that we know when it would get completely broken by some change.
Should also have a make target, and be added to BINS
so it's built in make buildall
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
This is primarily for testing, so we can just pass an in-memory repo.
I wanted to expose the node's _fields_, but this also exposed the methods. That got rather confusing. (probably could have used a new type, but eh) foo
4dbdd1e
to
a89ba2e
Compare
I'd _really_ like to use lookback, but don't have that when starting from a snapshot.
a89ba2e
to
63e2caa
Compare
Implements #6156.
Usage
Limitations: to run this, you need 2 weeks worth of state-trees to get power lookback (used to determine per-miner onboarding rates). Ideally, we'd do something else (maybe just look at the number of sectors and make assumptions?
Goals
Non Goals
This simulation does not:
Design
This simulation:
./lotus-sim create --help
).When necessary, the "funding" account will send funds to actors.