Skip to content
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

storageminer: Setup actor on init #81

Merged
merged 3 commits into from
Jul 26, 2019
Merged

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Jul 25, 2019

Not sure how correct this is, but it's an attempt to move something on this front

Also, miming now fails with:

adding 1 messages to block...2019-07-25T14:51:20.040+0200	ERROR	miner	miner/miner.go:68	mining block failed: failed to create block: apply message failure: no such actor
github.com/filecoin-project/go-lotus/miner.(*Miner).Mine
	/home/magik6k/github.com/filecoin-project/go-lotus/miner/miner.go:68
2019-07-25T14:51:20.040+0200	INFO	miner	miner/miner.go:107	attempting to mine a block on:[baep2bzacecfbcxh623n7ixbwhaoctueqvi4pffqqt7lca4ly6ks4q5f4cclt4]

@whyrusleeping
Copy link
Member

The no such actor is probably because youre trying to send the createMiner message from an actor that has no funds (aka, doesnt exist yet).

We probably need part of the flow to wait for the account it created to receive money. So we can create the new key, then say "send at least X FIL to this address". then once we see the account has funds, move on.

I'm all ears if you have better ideas about making that nicer

@magik6k
Copy link
Contributor Author

magik6k commented Jul 26, 2019

Did some more digging, it looks like the StorageMarket actor isn't, and then makeActor doesn't initialize built-in actors

The error comes from https://github.com/filecoin-project/go-lotus/blob/master/chain/vm/mkactor.go#L37

2019-07-26T15:40:45.647+0200	ERROR	vm	vm/mkactor.go:41	no such actor
github.com/filecoin-project/go-lotus/chain/vm.makeActor
	/home/magik6k/github.com/filecoin-project/go-lotus/chain/vm/mkactor.go:41
github.com/filecoin-project/go-lotus/chain/vm.TryCreateAccountActor
	/home/magik6k/github.com/filecoin-project/go-lotus/chain/vm/mkactor.go:19
github.com/filecoin-project/go-lotus/chain/vm.(*VM).ApplyMessage
	/home/magik6k/github.com/filecoin-project/go-lotus/chain/vm/vm.go:212
github.com/filecoin-project/go-lotus/chain.MinerCreateBlock
	/home/magik6k/github.com/filecoin-project/go-lotus/chain/mining.go:70
github.com/filecoin-project/go-lotus/node/impl.(*FullNodeAPI).MinerCreateBlock
	/home/magik6k/github.com/filecoin-project/go-lotus/node/impl/full.go:103
github.com/filecoin-project/go-lotus/miner.(*Miner).createBlock
	/home/magik6k/github.com/filecoin-project/go-lotus/miner/miner.go:169
github.com/filecoin-project/go-lotus/miner.(*Miner).mineOne
	/home/magik6k/github.com/filecoin-project/go-lotus/miner/miner.go:124
github.com/filecoin-project/go-lotus/miner.(*Miner).Mine
	/home/magik6k/github.com/filecoin-project/go-lotus/miner/miner.go:67
2019-07-26T15:40:45.647+0200	ERROR	miner	miner/miner.go:69	mining block failed: failed to create block: apply message failure: no such actor
github.com/filecoin-project/go-lotus/miner.(*Miner).Mine
	/home/magik6k/github.com/filecoin-project/go-lotus/miner/miner.go:69

I guess we should probably be setting the state up in genesis block?

return err
}

k, err := wallet.GenerateKey(types.KTSecp256k1) // TODO: review: is this right?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this works, though we will want to use BLS keys everywhere we can

@whyrusleeping whyrusleeping merged commit c92e910 into master Jul 26, 2019
@whyrusleeping whyrusleeping deleted the feat/storminer-init branch July 26, 2019 18:24
magik6k added a commit that referenced this pull request Aug 10, 2020
nonsense added a commit that referenced this pull request Nov 6, 2020
dumikau pushed a commit to protofire/lotus that referenced this pull request Jun 8, 2023
* fix actor state inspection and serialization

* checkpoint acessors and new ipc bundle

* address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants