@@ -54,6 +54,14 @@ const (
5454 // https://github.com/filecoin-project/lotus/releases/tag/v1.28.1
5555 // https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0085.md
5656 keylessAccountActor = "f090"
57+ // ZeroAddressAccountActorRobust f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a is a zero address actor that existed until V10.
58+ // Created: https://github.com/filecoin-project/lotus/blob/5750f49834deee9dfce752ff840630ae402a8b51/build/buildconstants/params_shared_vals.go#L56
59+ // Terminated: https://github.com/filecoin-project/lotus/blob/5750f49834deee9dfce752ff840630ae402a8b51/chain/consensus/filcns/upgrades.go#L1054
60+ ZeroAddressAccountActorRobust = "f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a"
61+ // ZeroAddressAccountActorShort f067253 is a zero address actor that existed until V10.
62+ // Created: https://github.com/filecoin-project/lotus/blob/5750f49834deee9dfce752ff840630ae402a8b51/build/buildconstants/params_shared_vals.go#L56
63+ // Terminated: https://github.com/filecoin-project/lotus/blob/5750f49834deee9dfce752ff840630ae402a8b51/chain/consensus/filcns/upgrades.go#L1054
64+ ZeroAddressAccountActorShort = "f067253"
5765 // multisig actorcode for nv22
5866 msigCidStr = "bafk2bzacedef4sqdsfebspu7dqnk7naj27ac4lyho4zmvjrei5qnf2wn6v64u"
5967 // account actorcode for nv23
@@ -182,11 +190,17 @@ func (h *Helper) GetActorAddressInfo(add address.Address, key filTypes.TipSetKey
182190
183191 addInfo .Short , err = h .actorCache .GetShortAddress (add )
184192 if err != nil {
193+ if ok , _ , _ := h .isZeroAddressAccountActor (add ); ok {
194+ addInfo .Short = ZeroAddressAccountActorShort
195+ }
185196 h .logger .Errorf ("could not get short address for %s. Err: %v" , add .String (), err )
186197 }
187198
188199 addInfo .Robust , err = h .actorCache .GetRobustAddress (add )
189200 if err != nil {
201+ if ok , _ , _ := h .isZeroAddressAccountActor (add ); ok {
202+ addInfo .Robust = ZeroAddressAccountActorRobust
203+ }
190204 h .logger .Errorf ("could not get robust address for %s. Err: %v" , add .String (), err )
191205 }
192206
@@ -199,10 +213,8 @@ func (h *Helper) GetActorNameFromAddress(add address.Address, height int64, key
199213 if add == address .Undef {
200214 return cid .Undef , "" , errors .New ("address is undefined" )
201215 }
202- // The f090 address was a multisig actor until V23 where it was converted to an account actor
203- // https://github.com/filecoin-project/lotus/releases/tag/v1.28.1
204- // https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0085.md
205- if ok , cid , actorName := h .isKeylessAccountActor (add , height ); ok {
216+
217+ if ok , cid , actorName := h .isSpecialAccountActor (add , height ); ok {
206218 return cid , actorName , nil
207219 }
208220
@@ -233,6 +245,28 @@ func (h *Helper) GetActorNameFromAddress(add address.Address, height int64, key
233245 }
234246}
235247
248+ // isSpecialAccountActor handles actor addresses that will fail to resolve from the node for reasons documented in each case.
249+ func (h * Helper ) isSpecialAccountActor (add address.Address , height int64 ) (bool , cid.Cid , string ) {
250+ if ok , cid , actorName := h .isZeroAddressAccountActor (add ); ok {
251+ return true , cid , actorName
252+ }
253+ if ok , cid , actorName := h .isKeylessAccountActor (add , height ); ok {
254+ return true , cid , actorName
255+ }
256+ return false , cid .Undef , ""
257+ }
258+
259+ // The f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a(f067253) is a zero address actor that existed until V10.
260+ // Created: https://github.com/filecoin-project/lotus/blob/5750f49834deee9dfce752ff840630ae402a8b51/build/buildconstants/params_shared_vals.go#L56
261+ // Terminated: https://github.com/filecoin-project/lotus/blob/5750f49834deee9dfce752ff840630ae402a8b51/chain/consensus/filcns/upgrades.go#L1054
262+ func (h * Helper ) isZeroAddressAccountActor (add address.Address ) (bool , cid.Cid , string ) {
263+ if h .network != tools .MainnetNetwork || (add .String () != ZeroAddressAccountActorRobust && add .String () != ZeroAddressAccountActorShort ) {
264+ return false , cid .Undef , ""
265+ }
266+
267+ return true , accountCid , manifest .AccountKey
268+ }
269+
236270// The f090 address was a multisig actor until V23 where it was converted to an account actor
237271// https://github.com/filecoin-project/lotus/releases/tag/v1.28.1
238272// https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0085.md
0 commit comments