-
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
Introduce v2 actors #3936
Merged
Merged
Introduce v2 actors #3936
Changes from 70 commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
ebad0de
Introduce v1 actors
arajasek 35562bd
fixup v1 actors for new methods
Stebalien 858f119
compile fix
Stebalien 8806f27
fix runtime reflection for upgrade
Stebalien edb31e6
correctly load new actors
Stebalien 87351fa
move version to actors, from builtin
Stebalien d9656f5
add a generic load method for actor state
Stebalien 8b35f48
initial vm conversion
Stebalien 7d3bd14
rebase fixup
Stebalien b8d9d78
fix vm version
Stebalien 271ceb9
add v1 support to the state tree
Stebalien 5f3160c
continue expanding vm abstraction layer
Stebalien 947d1e2
Merge branch 'master' into asr/spec-v1
Stebalien 2049daa
fix actor imports
Stebalien ca9448b
rename actors v1 -> actors v2
Stebalien 6fcf57e
use actor state abstraction in payment channel test
Stebalien 1a7fb06
improve lotuspond
Stebalien 52e064d
add gas numbers for v2
Stebalien 233d8a9
update even more imports
Stebalien c88d124
use built-in actor ID
Stebalien d1000e3
wire up network upgrade logic for v2 actors upgrade
Stebalien 3e6323a
make setNetworkName work with any actors version
Stebalien c0b316f
finish wiring up actors v2
Stebalien a314cfd
process error when setting network name
Stebalien b95b871
actually upgrade to actors v2
Stebalien 01272f8
fix state test
Stebalien 9344bc4
update api docs for new network version
Stebalien 2315db1
cleanup state-tree loading
Stebalien 1c03862
fix policy for specs-actors update
Stebalien c0e1903
check state invariants after upgrade
Stebalien e658ab3
fix policy test
Stebalien dd65e57
set policy correctly from test vectors
Stebalien be9d23b
Centralize some params in builtin
arajasek 4989b1c
Merge branch 'master' into asr/spec-v1
Stebalien 724306c
update specs-actors
Stebalien 23b729a
remove proof parameter from payment channels
Stebalien 4c60d7b
abstract over paych messages
Stebalien 5253c0d
fix: import the correct v2 methods
Stebalien 2e9915a
move common from message param into message builder constructor
Stebalien b01a1d4
abstract multisig calls
Stebalien 941c194
Merge branch 'master' into asr/spec-v1
Stebalien 99fe637
regen lotuspond info
Stebalien 35e606d
remove direct specs-actors miner access from expiration calculation
Stebalien 8dcbd52
abstract over deal collateral
Stebalien 6825a48
update message extraction tool for specs-actors update
Stebalien 486812e
name test networks
Stebalien 42d5d8d
run upgrade logic on stmgr.Call
Stebalien 9d59635
fix error messages
Stebalien 9705b25
fix testground actor versions
Stebalien 47a83b4
handle state forks in gas estimation
Stebalien 196bf39
use non-faulty sectors, instead of active, in post proof
Stebalien 3d91633
Update to v2/actors master
arajasek 1cc0f74
make the upgrade schedule fully configurable
Stebalien e865ba0
improve upgrade schedule configurable
Stebalien 8ad8a94
make it possible to override options when testing
Stebalien 101d07f
fix version off by one error
Stebalien ed86ac1
use upgrade epochs from upgrade schedule
Stebalien c5de617
decouple network version and upgrades
Stebalien a57288a
run post before, while, and after upgrading
Stebalien f1e5e9f
better upgrade test times
Stebalien 863a6ed
fix lints
Stebalien 6aba3e3
fix deal error message logging
Stebalien f6ccab1
ignore context canceled error in window post test
Stebalien 8292d60
Merge branch 'master' into asr/spec-v1
Stebalien b9f8831
fix specs-actors import in payment channel abstraction
Stebalien b6500be
Merge branch 'master' into asr/spec-v1
Stebalien 420c44e
fix msig start height
Stebalien 8bcc201
fix v2 GetSectorExpiration
Stebalien 5a08b88
Test upgrade before/during/after cc upgrade
Stebalien f8b2022
fix linters
Stebalien 9621dbb
fix tests to use v2 types
Stebalien 17846aa
add some more policy toggles for testground
Stebalien 1e78cd2
fix lotus soup build
Stebalien 6d25f3d
Add some comments
arajasek 89b88c1
fix conformance tests
Stebalien 16243b9
make state diffing work with partial state trees
Stebalien 14ad91c
Add type assertion for v2 runtime
arajasek 4a6e9c9
set genesis name in test
Stebalien 256be28
only enable gas tampering if the breeze upgrade is enabled
Stebalien b1818a1
fix base fee tests for different smoke heights
Stebalien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,12 @@ import ( | |
"os" | ||
|
||
"github.com/filecoin-project/go-address" | ||
"github.com/filecoin-project/lotus/chain/actors/policy" | ||
|
||
"github.com/filecoin-project/go-state-types/network" | ||
|
||
"github.com/filecoin-project/go-state-types/abi" | ||
"github.com/filecoin-project/specs-actors/actors/builtin" | ||
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner" | ||
) | ||
|
||
// ///// | ||
|
@@ -25,7 +25,7 @@ const UnixfsLinksPerLevel = 1024 | |
// Consensus / Network | ||
|
||
const AllowableClockDriftSecs = uint64(1) | ||
const NewestNetworkVersion = network.Version3 | ||
const NewestNetworkVersion = network.Version4 | ||
const ActorUpgradeNetworkVersion = network.Version4 | ||
|
||
// Epochs | ||
|
@@ -35,7 +35,7 @@ const ForkLengthThreshold = Finality | |
var BlocksPerEpoch = uint64(builtin.ExpectedLeadersPerEpoch) | ||
|
||
// Epochs | ||
const Finality = miner0.ChainFinality | ||
const Finality = policy.ChainFinality | ||
const MessageConfidence = uint64(5) | ||
|
||
// constants for Weight calculation | ||
|
@@ -47,13 +47,8 @@ const WRatioDen = uint64(2) | |
// Proofs | ||
|
||
// Epochs | ||
const SealRandomnessLookback = Finality | ||
|
||
// Epochs | ||
const SealRandomnessLookbackLimit = SealRandomnessLookback + 2000 // TODO: Get from spec specs-actors | ||
|
||
// Maximum lookback that randomness can be sourced from for a seal proof submission | ||
const MaxSealLookback = SealRandomnessLookbackLimit + 2000 // TODO: Get from specs-actors | ||
// TODO: unused | ||
const SealRandomnessLookback = policy.SealRandomnessLookback | ||
Comment on lines
+50
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can be removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure, that's the only reason I left it. I figured it might be used by some external test? |
||
|
||
// ///// | ||
// Mining | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do need this to be > 0? (for genesis to work I guess)
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.
Yes. Ideally, we'd either:
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.
Yeah, we should eventually get genesis working with v2 actors, but for now "you must start at v0 and have a positive UpgradeActorsV2Height" is fine
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.
Could we just call handleStateForks just after creating genesis if this is set to 0 / lower?
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.
Probably, we just need to get that working.