filecoin-project / specs-actors

DEPRECATED Specification of builtin actors, in the form of executable code.
Other
86 stars 102 forks source link

Reward: Check miner code CID #1090

Open wadealexc opened 4 years ago

wadealexc commented 4 years ago

The reward actor blindly accepts that params.Miner belongs to a Miner:

https://github.com/filecoin-project/specs-actors/blob/3cb38de84c893c2ad20efdb71612e0f7c25d0f32/actors/builtin/reward/reward_actor.go#L76-L79

Before invoking Miner.ApplyRewards, this method should check that the address belongs to a Miner via rt.GetActorCodeCID

ZenGround0 commented 3 years ago

We should fix this by solving the general case described in #510