-
Notifications
You must be signed in to change notification settings - Fork 37
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
Migrate types from specs-actors #1
Conversation
type Multiaddrs = []byte | ||
|
||
// PeerID is a byte array representing a Libp2p PeerID | ||
type PeerID = []byte |
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'm not so sure of these last two. I'd slightly prefer we dropped them and used []byte
directly. They both appear in miner info state, and hence in constructor params (which are also accessed by power actor).
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'm planning to merge as is but we can reevaluate later today.
// This is currently -1 for "disabled". | ||
// | ||
// This is exposed for testing. Do not modify unless you know what you're doing. | ||
CIDInlineLimit = -1 |
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.
@Stebalien I think we should push this down to a member of the cidBuilder, like the codec. I refrained from doing that here.
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 is here to make it easy to play with. I'd just leave it. The builder is effectively just a singleton.
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's singleton until we want to change this, and then it's not.
func main() { | ||
// Common types | ||
if err := gen.WriteTupleEncodersToFile("./abi/cbor_gen.go", "abi", | ||
abi.PieceInfo{}, |
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.
Comparing with specs actors this is missing SectorID, adding before merge
type Multiaddrs = []byte | ||
|
||
// PeerID is a byte array representing a Libp2p PeerID | ||
type PeerID = []byte |
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'm planning to merge as is but we can reevaluate later today.
abi/sector.go
Outdated
|
||
// The maximum assignable sector number. | ||
// Raising this would require modifying our AMT implementation. | ||
//goland:noinspection GoUnusedConst |
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.
Are these here on purpose? I'd rather keep editor specific directives out of the source. Planning to remove but we can revert later today.
) | ||
|
||
// Metadata about a seal proof type. | ||
type SealProofInfo struct { |
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.
Got confused about this at first but as I understand it this is part of not bringing registered proof policy in here. To integrate into specs actors we will have to wrap this inside specs_actors.SealProofInfo along with SectorMaxLifetime and WindowPoStPartitionSectors.
This is a copy of most of the specs-actors
abi
package, in preparation for re-use across release branches.No semantic change intended. Other notes:
big
package out from underabi
primitives.go
intochain.go
andactor.go