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
Aayush Rajasekaran
df13cfa52b
Only resolve origin to pubkey address when creating a new account actor
2020-03-24 04:43:09 -04:00
Aayush Rajasekaran
9ccc02d664
Load actor states afresh before making state changes
...
- Not doing this is causing bugs when reverting, since the actor cache gets reset
2020-03-24 03:33:22 -04:00
Jeromy
2228f13f99
a couple vm fixes
2020-03-23 18:50:58 -07:00
Jeromy
6fe245a278
use proper exitcodes for caller validation
2020-03-23 18:50:28 -07:00
Aayush Rajasekaran
05d43af3fc
Only try to resolve origin address during top-level invocation
2020-03-23 18:50:28 -07:00
Jeromy
8bc4195b7a
WIP: updating and getting chainval tests passing
2020-03-23 18:50:18 -07:00
Łukasz Magiera
eeec5a1bba
Merge pull request #1274 from filecoin-project/feat/doc/actors
...
doc: add comments related to actor code review
2020-03-23 12:49:41 +01:00
Whyrusleeping
a3fd1d4b51
Merge pull request #1401 from filecoin-project/fix/nonce-miss-no-gas
...
Missmatching nonce does not charge gas
2020-03-20 14:56:33 -07:00
whyrusleeping
84fd969710
take snapshot after gas transfer so its not reverted on method failure
2020-03-20 13:50:46 -07:00
Jakub Sztandera
4ba4de3379
Missmatching nonce does not charge gas
...
It should charge miner but we don't have that mechanism yet.
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-03-20 20:44:45 +01:00
Aayush Rajasekaran
ef288b8a6c
Calculate new actor addresses as per updated spec
2020-03-20 15:43:08 -04:00
Jakub Sztandera
ae40654907
Rework gas charging
2020-03-20 03:26:40 -04:00
Lucas Molas
d21cb96ddb
doc: add comments related to actor code review
2020-03-18 16:43:58 -07:00
whyrusleeping
ddf1beac6c
change gas limit to be a normal int64
2020-03-18 13:45:37 -07:00
Aayush Rajasekaran
51cf5d5f1b
New Actor Addresses should be generated as per spec
...
- The pubkey address address of the sender should be used, not the ID address
- We should use the internal callSeqNum as input (was hard-coded to zero)
- The external message nonce should be used, not the actor's nonce in the post-increment state
2020-03-18 02:57:11 -04:00
Jakub Sztandera
f3c4288311
Check for correct nonce before taking gas
...
Otherwise as a miner you are able to include an invalid message forever
and get whole GasLimit of gas from it every time.
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-03-10 21:14:50 +01:00
whyrusleeping
85e17fa5b0
fix state cid accounting after 'Transaction' calls
2020-03-09 22:20:46 -07:00
whyrusleeping
114cb2d2aa
squash the spec shim and the vmcontext into the new runtime type
2020-03-09 21:44:29 -07:00
whyrusleeping
24bf720a9a
Merge branch 'master' into testnet/3
2020-03-07 16:46:12 -08:00
whyrusleeping
34ad13fc22
fix initial reward actor balance
2020-03-06 17:33:24 -08:00
Aayush Rajasekaran
340afc3503
Add information about internal message executions to SimulationResult
...
- The VM now tracks a list of ExecutionResults to keep track of internal messages
2020-03-06 11:11:06 -08:00
whyrusleeping
16096e2c71
some go vet fixes
2020-03-05 22:46:07 -08:00
frrist
a34a6c65e7
fix gas limit check in apply message
2020-03-05 13:41:35 -08:00
whyrusleeping
4e9e3f3dc3
make state tree snapshots properly stack based
2020-03-04 17:19:15 -08:00
whyrusleeping
5076b2b950
fix reward actor and block reward application
2020-03-04 13:21:24 -08:00
whyrusleeping
0da2f81252
get most of the chain validation tests passing
2020-03-03 16:06:41 -08:00
whyrusleeping
0945d8725e
fixing miner logic to make more tests pass
2020-02-28 11:31:28 -08:00
Łukasz Magiera
ae634ef7df
actors: Remove addrass aliases
2020-02-25 21:54:58 +01:00
Łukasz Magiera
917df9a5b8
More unified randomness handling
2020-02-23 21:00:47 +01:00
Łukasz Magiera
a82d156ccb
Deal flow fixes
2020-02-23 16:50:36 +01:00
Łukasz Magiera
b8428423a1
get chain to runnable state
2020-02-22 14:10:46 +01:00
Łukasz Magiera
57c43183e6
update specs-actors
2020-02-21 17:57:40 +01:00
Łukasz Magiera
835e3d803f
vm: don't follow replica CIDs in copy
2020-02-19 20:39:00 +01:00
Łukasz Magiera
e9019c8bcc
Working Genesis Generator
2020-02-18 22:38:08 +01:00
whyrusleeping
6d0eec6395
working towards a working genesis generator
2020-02-17 23:15:30 -08:00
Łukasz Magiera
038582ba44
vm: Fix getActorCode
2020-02-17 22:11:03 +01:00
Łukasz Magiera
0d6cfc879d
Use specs-actors ignatures
2020-02-13 00:52:36 +01:00
Łukasz Magiera
0aaf7b25a9
Propagate spec actor types more
2020-02-12 08:44:20 +01:00
Łukasz Magiera
91ca4a841a
specs-actors: Import miner/power/cron/paych code
2020-02-11 02:43:26 +01:00
Łukasz Magiera
13435aebdc
Spec Actors integration
2020-02-08 03:18:32 +01:00
Łukasz Magiera
cbf63aab1e
Merge branch 'master' into testnet/3
2020-02-05 21:27:04 +01:00
whyrusleeping
028a113737
Make it all build
2020-02-04 14:19:05 -08:00
Jakub Sztandera
5e6ab42cb8
Don't depend on ffi
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-02-04 15:12:04 +01:00
whyrusleeping
dfe87c9f6f
update to latest hamt changes
2020-02-03 18:52:18 -08:00
whyrusleeping
01b6ddbbd3
add a test to ensure there are no off-by-one errors in fork activation logic
2020-01-31 15:52:39 -08:00
whyrusleeping
dcd01df2d3
wire up tracing into state tree flush, add pprof flag
2020-01-22 11:53:06 -08:00
Travis Person
68f8d60323
Adding fields to warning in vm ApplyMessage ( #1090 )
...
* Adding fields to warning in vm ApplyMessage
2020-01-16 01:36:16 +01:00
Łukasz Magiera
a2bcc1fec2
Mostly functional mock sectorbuilder
2020-01-14 03:05:35 +01:00
Jakub Sztandera
1ed62628a7
Update go-log to v2
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-01-08 20:22:31 +01:00
whyrusleeping
e41dbdad90
reduce most vm errors to non-fatal, explicitly mark disk issues as fatal
2020-01-07 19:46:55 -08:00
hannahhoward
8418464d91
refactor(address): use extracted address library
...
Switch to using extracted address library
2020-01-07 14:53:27 +01:00
Łukasz Magiera
f7604b84f7
Merge pull request #965 from filecoin-project/feat/no-fatal-serialization
...
make serialization error non-fatal
2019-12-19 22:04:27 +01:00
Łukasz Magiera
81233b894d
Implement 'chain get' for easier ipld digging
2019-12-19 17:58:02 +01:00
whyrusleeping
897d4c7d24
make serialization error non-fatal
2019-12-17 19:41:58 -08:00
whyrusleeping
d2448912a6
Implement basic fault handling
...
WIP: miner actor tests
working miner actor test
rebase and fix tests
2019-12-09 20:53:43 +01:00
whyrusleeping
613a0a05a0
more of that sweet staticcheck goodness
2019-12-04 18:04:09 -08:00
whyrusleeping
cac44367aa
add batching to vm Copy call
2019-11-17 11:50:04 -06:00
whyrusleeping
ab2e722811
use fast cbor-gen method for extracting links from objects
2019-11-16 11:24:11 -08:00
whyrusleeping
9e464a4b90
more tracing spans
2019-11-12 12:42:22 -08:00
whyrusleeping
68de42df8c
increase actor error log verbosity
2019-11-01 23:30:06 -07:00
Łukasz Magiera
72af55d067
deals: Price per epoch
2019-10-29 11:01:18 +01:00
Łukasz Magiera
6d766ab241
Set e=3
2019-10-28 19:22:40 +01:00
Łukasz Magiera
eeca3d86df
Merge pull request #415 from filecoin-project/feat/deals-on-chain
...
On-Chain deals
2019-10-25 17:03:25 +02:00
whyrusleeping
fc7c7ddd97
Initial pass at a peer manager
2019-10-23 12:47:22 +02:00
Łukasz Magiera
46a0333c9c
on chain deals: Wip porting deal systems to storagemarket
2019-10-23 12:44:00 +02:00
waynewyang
fab4777b8f
Delete TransferFunds Method
2019-10-23 13:22:03 +08:00
waynewyang
f99c11e048
fix method: VM.send
2019-10-22 20:37:04 +08:00
waynewyang
2d4c5daa93
fix annotation for vm
2019-10-22 16:14:10 +08:00
whyrusleeping
63b81af23e
handle changing default address
2019-10-18 20:42:00 +09:00
Jakub Sztandera
1bf713cb0a
Cleanup imports after rename
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2019-10-18 13:47:41 +09:00
whyrusleeping
ab6ef85b6d
More tracing!
2019-10-16 19:24:33 +09:00
Łukasz Magiera
fb80d75b07
Almost building weight function
2019-10-15 14:31:34 +02:00
whyrusleeping
45737f8a51
add more tracing spans
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2019-10-13 03:07:55 +02:00
whyrusleeping
80d306de14
check transfer amounts are positive values
2019-10-12 15:57:49 +09:00
whyrusleeping
a56e786e36
some cleanup of vm transfer logic to make juan happier
2019-10-11 18:13:04 +09:00
whyrusleeping
3f342d7ae2
add some more tracing to chain sync
2019-10-10 20:13:26 +09:00
Jakub Sztandera
991ab167fe
Fix vm log
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2019-10-04 22:57:59 +02:00
whyrusleeping
f9ac86ab00
the doneset is for dropping sectors
2019-10-04 12:30:30 -06:00
Jakub Sztandera
76ab2e8a7b
De-javify
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-09-28 00:02:02 +02:00
Jakub Sztandera
b90f45fa60
Change build params
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-09-27 23:42:12 +02:00