Commit Graph

272 Commits

Author SHA1 Message Date
Aayush Rajasekaran
d9fad5fad0 Move rt.Message fixes behind fork logic 2020-10-06 17:37:50 -04:00
Aayush Rajasekaran
757aa1039f Panic if runtime's Message has non-ID caller or receiver 2020-10-06 17:37:50 -04:00
Aayush Rajasekaran
b71b743420 Bugfix: Runtime's Receiver() should only return ID addresses 2020-10-06 17:37:50 -04:00
Steven Allen
4989b1cc90 Merge branch 'master' into asr/spec-v1 2020-09-30 09:19:12 -07:00
Jakub Sztandera
76db65b1af
Update pebble
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-29 14:49:47 +02:00
Jakub Sztandera
55c6b88537
Add toggle for badger, flag out gas tracing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-29 14:49:46 +02:00
Aayush Rajasekaran
be9d23b329 Centralize some params in builtin 2020-09-29 02:25:43 -04:00
Steven Allen
8b35f480c4 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.
2020-09-25 12:49:39 -07:00
Łukasz Magiera
15eddf0c96 Make sync wait nicer 2020-09-24 13:39:49 +02:00
Łukasz Magiera
ded3a30f55 fix lint 2020-09-24 11:56:54 +02:00
whyrusleeping
38e256cece add some tracing to the vm's blockstore copy 2020-09-23 20:19:20 -07:00
Aayush Rajasekaran
a876a0ba44 Use actor state addresses 2020-09-23 02:32:40 -04:00
Steven Allen
2967c4ec10 use abstract actor type methods 2020-09-22 12:02:29 -07:00
Steven Allen
8747c6083e abstract over account actor 2020-09-18 14:20:53 -07:00
Łukasz Magiera
70faa36b7f Merge remote-tracking branch 'origin/master' into refactor/net-upgrade 2020-09-18 19:29:06 +02:00
Raúl Kripalani
362fc180ec fix a regression caused by #3800. 2020-09-16 10:54:26 +01:00
Łukasz Magiera
d4a7732d0a
Merge pull request #3800 from filecoin-project/asr/gascost
Add an API to get detailed gas costs for a message
2020-09-15 19:13:20 +02:00
Steven Allen
cc4d5306eb Progress 2020-09-14 15:43:12 -07:00
Steven Allen
02dcb5e182 Merge branch 'master' into refactor/net-upgrade 2020-09-14 14:53:57 -07:00
Steven Allen
32eeb96ce7 Update to specs-actors 0.9.9
This patch changes the runtime interfaces, to make it possible to abstract over them.
2020-09-14 12:47:39 -07:00
Aayush Rajasekaran
d1850ea27d Add an API to get detailed gas costs for a message 2020-09-14 14:40:13 -04:00
Łukasz Magiera
683a58195e More terraforming in chain/ 2020-09-14 14:46:38 +02:00
Łukasz Magiera
68097132fe Fix vm build 2020-09-14 13:45:20 +02:00
Aayush Rajasekaran
86ba21029d Update to go state types 001afaca718c 2020-09-10 17:41:55 -04:00
Aayush Rajasekaran
6eea5dd109 Update to specs 0.9.7 and markets 0.6.0 2020-09-07 17:11:32 -04:00
Aayush Rajasekaran
39755a294a Update to specs v0.9.6 2020-09-07 15:48:41 -04:00
anorth
a8dcea1422 Remove use of exitcode.SysErrInvalidParameters 2020-09-07 15:48:41 -04:00
austinabell
39ef3a701b
Remove unsigned message pointer from Runtime 2020-08-27 17:34:45 -04:00
Steven Allen
5733c71c50 Lint everything
We were ignoring quite a few error cases, and had one case where we weren't
actually updating state where we wanted to. Unfortunately, if the linter doesn't
pass, nobody has any reason to actually check lint failures in CI.

There are three remaining XXXs marked in the code for lint.
2020-08-20 20:46:36 -07:00
Aayush Rajasekaran
fe2da35a45 Move GetCircSupply out of the vm, and into stmgr 2020-08-12 15:32:07 -04:00
Aayush Rajasekaran
5933e64de1 Include premined actors in vested funds calculation 2020-08-12 15:19:48 -04:00
Whyrusleeping
ed72aa1307 implement randomness distinction 2020-08-12 10:32:39 -07:00
Steven Allen
9248e5a572 Update specs-actors, cbor-gen, and go-address 2020-08-12 10:32:39 -07:00
Jakub Sztandera
c29dd72174
add check for feecap and premium to vm.checkMessage
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-06 21:45:03 +02:00
Jakub Sztandera
b384ac6943
Compute correct base burns, miner tip and so on
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-06 21:14:38 +02:00
Jakub Sztandera
722d6e8ffb
Introduce base fee
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-06 21:14:38 +02:00
Jakub Sztandera
3058f280d9
Fix bad error message
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-05 02:10:25 +02:00
Jakub Sztandera
5405a5adc3
Sepearate ComputeGasOutputs into sepearate function, add tests
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-05 02:10:25 +02:00
Jakub Sztandera
5ff12a5d2d
Burn remainder of GasLimit over 1.3*gasUsed
GasToBurn = max(0, GasLimit - GasUsed + (3*GasUsed)/10)

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-05 02:10:25 +02:00
Jakub Sztandera
7f722623ca
Allow messages with not enough funds for transfer to apply
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-30 16:23:30 +02:00
Aayush Rajasekaran
b51e2a868b
Merge branch 'next' into feat/cid-builder 2020-07-28 21:02:30 -04:00
Aayush Rajasekaran
de867d7a9a Correct calculation of TotalCircSupply 2020-07-28 17:26:55 -04:00
Steven Allen
bb54dc97b6 Fix incorrect ID CID optimization
Blocks inlined into CIDs can technically contain CIDs themselves. I'm guessing
this check was trying to skip "actor" CIDs (inline cids with raw blocks).
2020-07-23 23:22:44 -07:00
Steven Allen
b7a4dbb07f Support inline CIDs
And use the new CidBuilder from the spec actors.

This patch does not switch over to inline CIDs by default, but paves the way.
2020-07-23 23:12:32 -07:00
Łukasz Magiera
d70edbcb7c Set things on syscallShim 2020-07-22 13:35:10 -04:00
Jakub Sztandera
7d83349507
Format FIL as FIL
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-22 17:50:34 +02:00
Jakub Sztandera
b3bac0c9e8
Add better error messages for message pre-execution errors
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-22 17:50:34 +02:00
Łukasz Magiera
0ded061037 Get math to work 2020-07-18 00:15:21 +02:00
Łukasz Magiera
cb6767a02b Merge remote-tracking branch 'origin/next' into feat/actors-miner-refactor 2020-07-17 15:18:11 +02:00
Peter Rabbitson
e266f3b955 Bump fil-commcid and filecoin-ffi deps
Propagates correct on-chain commX CIDs
2020-07-17 00:38:42 +02:00
Jakub Sztandera
610ed0dc13
Change OnIpldGet
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-15 21:40:49 +02:00
Jakub Sztandera
c0eb4b39ac
Reorg some gas charges
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-15 20:01:56 +02:00
Raúl Kripalani
0484496d92 Merge branch 'next' into mock-clock 2020-07-14 18:08:26 +01:00
Łukasz Magiera
faebc4c948 WIP Integrating specs-actors with refactored miner state 2020-07-14 13:45:45 +02:00
Łukasz Magiera
c1048a0353 vm: Separate logger for actors 2020-07-13 12:29:27 +02:00
Raúl Kripalani
13de81b3b2 introduce the ability to mock time. 2020-07-10 15:51:45 +01:00
Jakub Sztandera
9936439608
Merge remote-tracking branch 'origin/master' into next
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-03 14:56:06 +02:00
Jakub Sztandera
c68a8f802e
Adjust gas
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-02 18:47:33 +02:00
Jakub Sztandera
bc88c632d1
Fix previous commit
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-02 18:47:33 +02:00
Jakub Sztandera
1e17ea3fff
Adjust gas values
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-02 18:47:33 +02:00
Jakub Sztandera
a2fd0aad41
More on OnActorExec
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-02 18:47:31 +02:00
Jakub Sztandera
01ac4e5da3
Gas on actor exec
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-07-02 18:47:30 +02:00
Łukasz Magiera
a6d1323eba Update specs-actors to v0.7.0; More correct genesis sector import 2020-06-26 15:08:12 +02:00
Jakub Sztandera
91ea039077
Change ellipsis, more accurate timing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-06-12 20:46:04 +02:00
Jakub Sztandera
cd69e57a33
Expose more callers, ellipsis unimportant ones
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-06-12 18:49:29 +02:00
Jakub Sztandera
c90d35869b
Add gas tracing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-06-11 21:59:39 +02:00
Jakub Sztandera
6acc9a62f8
Split gas internally into compute gas and storage gas
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-06-11 20:37:14 +02:00
Jakub Sztandera
c3f23ddce8
Refactor ExecutionResult to ExecutionTrace
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-06-11 15:53:47 +02:00
Jakub Sztandera
5605aae269
Fix even more lint warnings
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-06-02 16:29:39 +02:00
Aayush Rajasekaran
7dd25c3ac5 Correctly handle transfers with sender = receiver 2020-05-29 12:15:41 -04:00
Jakub Sztandera
d6615b6286
Cleanup many lint warnings
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-05-27 22:53:20 +02:00
frrist
9165f14693 feedback: fatal errors in vm.transfer 2020-05-18 12:00:52 -07:00
frrist
0c2e4e2d4f return correct exitcodes from vm transfer 2020-05-18 12:00:52 -07:00
Aayush Rajasekaran
6bf2dcd97c Message validation changes 2020-05-11 21:54:44 -04:00
Aayush Rajasekaran
187e386740 Bugfix: Correctly transfer gas when failing to charge for retValue 2020-05-06 16:53:32 -04:00
Jeromy
a553d438c0 dont override exit codes for actor creation failure 2020-05-04 16:31:26 -07:00
frrist
c66415ae4c fix: insufficient gas remaining to cover retval
proceed as in the case of method execution failure.
2020-04-29 16:38:34 -07:00
Aayush Rajasekaran
5900d765fd caller must be validated exactly once 2020-04-28 00:07:47 -04:00
Aayush Rajasekaran
e46c4652a5 Forbid internal message in State Transaction() 2020-04-25 02:01:26 -04:00
Aayush Rajasekaran
832657edfb Eliminate use of SysErrInternal, some interop changes 2020-04-25 01:55:59 -04:00
Jeromy
7ee42e61d5 add command to analyze import bench output 2020-04-23 16:48:54 -07:00
Aayush Rajasekaran
14ad808a00 Remove unused fields from VM 2020-04-16 15:34:01 -04:00
Łukasz Magiera
70d654e4a6 Merge pull request #1527 from filecoin-project/feat/drand
Initial randomness beacon implementation
2020-04-09 19:48:09 +02:00
Aayush Rajasekaran
17e9feb633 Sever the API's dependency on VM 2020-04-08 18:27:31 -04:00
Jeromy
8e0ca306d2 more wiring up of drandomness 2020-04-08 08:11:42 -07:00
Jeromy
4c6fa1b2c0 handle some runtime error edge cases 2020-04-03 14:38:11 -07:00
Jeromy
212c346c21 avoid flushing disk when doing state tree snapshots 2020-04-02 17:18:25 -07:00
Łukasz Magiera
11777c5f24 Merge pull request #1502 from filecoin-project/feat/import-bench
add a command to lotus-bench to benchmark importing and validating
2020-04-03 01:30:12 +02:00
Jeromy
beaa3dffab add a command to lotus-bench to benchmark importing and validating a chain 2020-04-02 16:18:38 -07:00
Jeromy
8a265a0e8d use exitcode type from specs actors instead of byte 2020-04-02 11:24:38 -07:00
Jeromy
97a7b449e6 use charge gas safe in places we return errors 2020-03-27 10:11:21 -07:00
Jeromy
672956af5d addressing review 2020-03-26 20:13:32 -07:00
Travis Person
090261f304 Revert gas exhausted exit code to SysErrOutOfGas 2020-03-27 00:19:34 +00:00
Jakub Sztandera
06cfbf5742 Switch exitcodes
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-03-26 22:11:06 +01:00
Jakub Sztandera
300c89f541 Update to new sepcs actors, more debug
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-03-26 01:02:13 +01:00
Jeromy
088d693eea code review changes 2020-03-25 12:13:09 -07:00
Aayush Rajasekaran
ebcefa80e3 provide msg length to vm::ApplyMessage 2020-03-25 08:25:03 -04:00
Aayush Rajasekaran
490f85e690 Send implicit messages for block rewards, cron ticks, state calls, and genesis setup 2020-03-25 08:25:03 -04:00
Aayush Rajasekaran
ad15750be3 Charge sender no gas, and penalise miner for certain invalid messages 2020-03-25 08:25:03 -04:00
Aayush Rajasekaran
09a46e5d80 fix some gas charge bugs, and make our new account actor creation follow GFC 2020-03-25 08:25:03 -04:00