initial vm conversion

We're probably going to want to change some of these design decisions down the
road, but this is a good starting point.

* We may want to use a more general test for "is actor valid at epoch". Maybe
just a function?
* I'd like to push some of the actor metadata down into the actor types
themselves. Ideally, we'd be able to register actors with a simple
`Register(validation, manyActors...)` call.
This commit is contained in:
Steven Allen
2020-09-25 12:49:39 -07:00
parent d9656f5220
commit 8b35f480c4
11 changed files with 121 additions and 97 deletions
+1 -1
View File
@@ -422,7 +422,7 @@ func resolveOnce(bs blockstore.Blockstore) func(ctx context.Context, ds ipld.Nod
return nil, nil, xerrors.Errorf("getting actor head for @state: %w", err)
}
m, err := vm.DumpActorState(act.Code, head.RawData())
m, err := vm.DumpActorState(&act, head.RawData())
if err != nil {
return nil, nil, err
}
+1 -1
View File
@@ -411,7 +411,7 @@ func (a *StateAPI) StateReadState(ctx context.Context, actor address.Address, ts
return nil, xerrors.Errorf("getting actor head: %w", err)
}
oif, err := vm.DumpActorState(act.Code, blk.RawData())
oif, err := vm.DumpActorState(act, blk.RawData())
if err != nil {
return nil, xerrors.Errorf("dumping actor state (a:%s): %w", actor, err)
}