Commit Graph

653 Commits

Author SHA1 Message Date
Aayush
673f558ba5 Rename vm.VMI to vm.Interface 2022-03-15 19:34:39 -04:00
Aayush
05fa9c81de Rename FVM envvar to LOTUS_USE_FVM_EXPERIMENTAL 2022-03-12 11:03:43 -05:00
Aayush
d2054e8653 FVM: support nv15 2022-03-11 17:03:34 -05:00
Aayush
b6682f4bbe feat: use either lotus vm or fvm consistently 2022-02-24 12:04:05 -05:00
Aayush
9bb936b75c chore: refactor: rename NewVM to NewLotusVM 2022-02-24 12:04:05 -05:00
Steven Allen
420c5fb568 fvm: time message execution 2022-02-23 19:23:20 +00:00
Steven Allen
aad376296e fvm: set gas costs to nil for implicit messages
This is what the lotus VM does.
2022-02-23 19:22:47 +00:00
Aayush
5be125ad1a address review feedback 2022-02-18 13:21:17 -05:00
Aayush
393479ea69 Fvm: impl VerifyConsensusFault 2022-02-18 13:21:01 -05:00
Steven Allen
e8d771fcac pass only fil-vested into FVM 2022-02-08 15:26:20 -08:00
Steven Allen
32b3618c74 fvm: feed in correct "base" circulating supply 2022-02-08 13:20:03 -08:00
Steven Allen
279cdd0760 fvm: fix implicit messages and message inclusion gas charging 2022-02-07 10:33:57 -08:00
Steven Allen
fc74a6c8ca update fvm/ffi bindings 2022-02-04 12:46:15 -08:00
Aayush Rajasekaran
2a669b95fb :Hook up the FVM 2022-02-04 12:46:15 -08:00
Aayush
9ec1abf880 :Fix: create a new VM for each epoch 2022-01-17 16:28:22 -05:00
Aayush Rajasekaran
207d33eaba
Merge pull request #7810 from filecoin-project/feat/snap-deals
Snap Deals Lotus Integration: FSM Posting and integration test
2022-01-11 12:46:55 -05:00
zenground0
33f2d24f54 Snap Deals Integration
- FSM handles the actual cc upgrade process including error states
- PoSting (winning and window) works over upgraded and upgrading sectors
- Integration test and changes to itest framework to reduce flakes
- Update CLI to handle new upgrade
- Update dependencies
2022-01-10 15:39:38 +05:30
Jakub Sztandera
736fb5c5b0
Add gas charge for VerifyReplicaUpdate
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2022-01-07 15:18:08 +01:00
Aayush Rajasekaran
5ec5ebac31 Fix circsuypply calc around null blocks 2022-01-05 14:17:40 -05:00
Raúl Kripalani
d4fa5a0f1d tvx runner: adjust gas pricing to cope with synthetic epochs. 2022-01-04 17:32:57 +00:00
Aayush Rajasekaran
670bd993f3 Refactor: VM: Remove the NetworkVersionGetter 2021-12-17 19:14:21 -05:00
Aayush Rajasekaran
6f6f5d79fb Refactor: State: Let Rand get network versions 2021-12-17 18:54:17 -05:00
Aayush Rajasekaran
aa1b770974 Rand: Refactor so that versioning lives in StateRand 2021-12-17 13:58:53 -05:00
Łukasz Magiera
bc384c01e3 Merge remote-tracking branch 'origin/master' into deps/update-ctx-dsbs 2021-12-17 13:01:22 +01:00
Aayush Rajasekaran
1f04cc1f23 VM: Circ supply should be constant per epoch 2021-12-17 00:29:55 -05:00
Aayush Rajasekaran
0e2278cc76 Merge branch 'master' into deps/update-ctx-dsbs 2021-12-14 18:08:29 -05:00
Aayush Rajasekaran
80d5e52923 Merge branch 'master' into next 2021-12-13 13:24:28 -05:00
Aayush Rajasekaran
dfb65ed89f Plumb contexts through 2021-12-11 17:04:00 -05:00
gstuart
9108828aeb Make Lotus vm gas tracing an env var 2021-12-10 17:27:44 -05:00
c r
e16e9ad343
reorder transfer checks so as to ensure sending more money than you have to yourself fails with an error (fixing issue 7596)
PR #7637, also adds tests to make sure behavior is correct across versions.
2021-11-29 17:26:47 -05:00
Aayush Rajasekaran
5f1783c9a5 Address review 2021-11-19 15:11:13 -05:00
Aayush Rajasekaran
1449644c34 Integrate v7 actors 2021-11-17 15:55:14 -05:00
Raúl Kripalani
95d294db63 rename vm#make{=>Account}Actor(). 2021-10-26 19:11:00 +01:00
Łukasz Magiera
19f52b4541 inline-gen: Slightly nicer comment format 2021-10-18 17:21:53 +02:00
Łukasz Magiera
5616dfb1bc Some more inline codegen 2021-10-11 22:57:24 +02:00
Jennifer Wang
38e01cba83 Merge branch 'release/v1.12.0' into jen/12tomaster 2021-10-04 02:38:00 -04:00
Aayush Rajasekaran
c3c46e9097 Fix Drand fetching around null tipsets 2021-09-29 11:57:59 -04:00
Aayush Rajasekaran
7b4c657e90 Add v6 actors 2021-09-21 14:23:14 -04:00
Aayush Rajasekaran
b9bfcc4b69 Randomness: Move getters from ChainAPI to StateAPI 2021-09-21 14:20:15 -04:00
Aayush Rajasekaran
1d6db306ec Randomness: Move getters from ChainAPI to StateAPI 2021-09-15 00:03:13 +02:00
Łukasz Magiera
95b128b7bc chain: Cleanup consensus logic 2021-09-02 18:09:37 +02:00
ZenGround0
b914e95f34 revert pricelist by version to pricelist by epoch 2021-08-11 09:49:23 -04:00
ZenGround0
6da26dcefc Remove network version panic 2021-08-10 13:07:30 -04:00
ZenGround0
e09a25ca68 Remove unnecessary ret log 2021-07-28 18:26:29 -04:00
ZenGround0
a968784908 fix new panics in invoker_test.go 2021-07-28 18:26:29 -04:00
ZenGround0
0202192fc0 Log more call context during errors 2021-07-28 18:26:29 -04:00
Łukasz Magiera
e7d73cbe56 vm: Remove unused ActorBalance 2021-07-27 15:34:39 +02:00
ZenGround0
47b5afa84b Add version six and a half 2021-07-22 09:49:47 -04:00
ZenGround0
f49a8248f0 PriceListByVersion 2021-07-22 09:49:47 -04:00
Steven Allen
d6abcff63c
fix(lotus-sim): apply code review from magik6k
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2021-06-21 09:05:48 -07:00
Steven Allen
eb2b706156 chore: fix lint errors in simulation 2021-06-18 15:44:37 -07:00
Steven Allen
0075abea5e fix(vm): always specify an ActorErr when ApplyMessage fails.
This case shouldn't actually happen, but we might as well be consistent.
2021-06-18 15:44:35 -07:00
Steven Allen
e2f5c494b0 feat: implement lotus-sim 2021-06-18 15:44:34 -07:00
Peter Rabbitson
29d7561dd1 Fix logging of stringified CIDs double-encoded in hex 2021-06-08 00:05:48 +02:00
Aayush Rajasekaran
a41a1cbd93 Gate runtime's GetRandomnessFromBeacon on HyperdriveHeight, not network version 2021-06-03 15:47:49 -04:00
Łukasz Magiera
dc642d0b7b Merge remote-tracking branch 'origin/feat/nv13' into feat/nv13-1.11 2021-06-01 21:06:58 +02:00
Aayush Rajasekaran
39f2246ae6 Use build.UpgradeHyperDriveHeight directly when sourcing randomness in VM 2021-06-01 14:43:46 -04:00
Łukasz Magiera
66c1554670 vm syscalls: fix typo 2021-06-01 19:23:12 +02:00
Łukasz Magiera
ffa47659a1 Merge remote-tracking branch 'origin/feat/nv13' into feat/nv13-1.11 2021-05-31 21:38:34 +02:00
Łukasz Magiera
2a1b35e694
Merge pull request #6361 from filecoin-project/asr/fip-0015
Implement FIP-0015
2021-05-31 20:58:21 +02:00
Aayush Rajasekaran
61554cf3e0 Update to latest actors 2021-05-31 14:47:41 -04:00
Aayush Rajasekaran
7fca1c1ee7 Implement FIP-0015 2021-05-31 14:40:54 -04:00
Łukasz Magiera
dd79c2c41a
Merge pull request #6347 from filecoin-project/feat/agg-gas-price
Introduce gas prices for aggregate verifications
2021-05-28 12:40:16 +02:00
Jakub Sztandera
cb59daf3c1
Introduce gas prices for aggregate verifications
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-05-27 17:51:01 +02:00
Łukasz Magiera
1e4456138e Merge master into feat/nv13 2021-05-27 12:28:20 +02:00
Aayush Rajasekaran
21b4741e30 Fix randomness fetching around null blocks 2021-05-26 21:06:06 -04:00
Aayush Rajasekaran
7714537239 Allow starting networks from arbitrary actor versions 2021-05-26 12:48:14 -04:00
Łukasz Magiera
43c62f4406
Revert "Allow starting networks from arbitrary actor versions" 2021-05-26 12:33:08 +02:00
Aayush Rajasekaran
cf574ca9a1 Allow starting networks from arbitrary actor versions 2021-05-25 19:30:20 -04:00
Łukasz Magiera
f5409845b5 Some review addressing 2021-05-25 16:07:45 +02:00
Łukasz Magiera
c7ba083fa4 Import precommit batcher 2021-05-18 16:51:06 +02:00
Łukasz Magiera
506f39b294 WIP: Integrate FIP0013 2021-05-11 22:10:29 -04:00
Aayush Rajasekaran
b5da2655dc Introduce v5 actors 2021-05-10 19:44:28 -04:00
Aayush Rajasekaran
f1ded63d60 v4 specs-actors integration, nv12 migration 2021-04-27 02:02:44 -04:00
Raúl Kripalani
7f0f7d0b36 Merge branch 'master' into refactor/lib/blockstore 2021-02-28 19:55:23 +00:00
Aayush Rajasekaran
2ca70e600d Move the zero bls actor creation check into the VM 2021-02-18 19:01:11 -05:00
Raúl Kripalani
b0cbc932bd consolidate all blockstores in blockstore package. 2021-01-29 20:01:00 +00:00
Steven Allen
c5d3b979cb fix constructing new actors 2021-01-21 15:21:20 -08:00
Aayush Rajasekaran
95f68d0161 Register the v3 actor CIDs in the actor registry 2021-01-21 15:21:19 -08:00
Ian Davis
7d2adc383f
chore: export vm.ShouldBurn 2021-01-14 11:29:57 +00:00
Jakub Sztandera
c7e3e9fa7f
Add IsNearUpgrade
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-12-19 21:51:07 +01:00
Jakub Sztandera
a3b325db5d
Disable consensus faults during upgrade orange
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-12-19 21:00:12 +01:00
Steven Allen
1f754bdb78 disable gas burning for window post messages
While over-estimation fees and miner tips are still paid, gas is no longer burnt
for direct, successful window PoSt messages.

Usually, gas is burnt to prevent an attacker from spamming the network and to
allow clients to "price" messages (using the base fee cap) based on how urgently
they need them to be processed. However:

1. Window PoSt is already a "proof of work".
2. Miners need to submit WindowedPoSts on-time so all window post messages are urgent.
3. Work is already under way to move window post verification off-chain (making
it effectively free). This change simply introduces the "free" part a bit earlier.
2020-12-16 00:10:25 -05:00
Jakub Sztandera
f1291f137c
Enable Callers tracing when GasTracing is enabled
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-12-01 13:53:30 +01:00
zgfzgf
1f9c0f8040 update index to sectorNumber 2020-11-24 20:27:35 +08:00
Aayush Rajasekaran
b1afa2022b Improve error for ActorsVersionPredicate 2020-11-19 02:27:35 -05:00
Aayush Rajasekaran
322f34c6c6 Tweak handling of bad beneficaries in DeleteActor 2020-11-18 01:52:46 -05:00
Łukasz Magiera
c5470ee17e
Merge pull request #4830 from filecoin-project/time/vm-flush
Gas Balancing
2020-11-18 01:34:08 +01:00
Łukasz Magiera
c8d985b5c7
Merge pull request #4885 from filecoin-project/asr/worker-key
Speed up worker key retrieval
2020-11-17 20:57:35 +01:00
Jakub Sztandera
f580892e9e
Disable gas tracing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:34 +01:00
Aayush Rajasekaran
080a1165ee
create vm-flush key
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:34 +01:00
Jakub Sztandera
1413d6d4b7
Adjust gas values
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:34 +01:00
Jakub Sztandera
9b64dba4a1
Add background flushing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:34 +01:00
Jakub Sztandera
f9771c67fb
Fix gas multi error in virtual gas
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:34 +01:00
Jakub Sztandera
238174cfca
Adapt virtual gas
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:33 +01:00
Jakub Sztandera
f130cd6fca
Adjust virtual gas
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:33 +01:00
Jakub Sztandera
336aa95ab5
Add metrics for VM flush duration and obj count
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-17 20:41:33 +01:00
Aayush Rajasekaran
596b31fb9e Speed up worker key retrieval 2020-11-17 00:53:26 -05:00
Aayush Rajasekaran
5c791cd93b Check parent runtime allowInternal when making a new Runtime 2020-11-17 00:22:50 -05:00
Aayush Rajasekaran
ce9146916a fix: actor method params deserialization error exit code 2020-11-17 00:22:50 -05:00
Aayush Rajasekaran
dff88b63b2 fix: guard against self beneficiary when deleting actor 2020-11-17 00:22:50 -05:00
Raúl Kripalani
8f5847b8e3 fix condition. 2020-11-10 22:34:13 +00:00
Raúl Kripalani
38c404e04e vm: construct CBOR store properly. 2020-11-10 15:49:33 +00:00
Raúl Kripalani
54bf7c99d7 add the viewable trait to our gazillion blockstores. 2020-11-10 12:40:32 +00:00
Jakub Sztandera
fe95d19e29
Move gas multiplier as property of pricelist
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-04 20:13:17 +01:00
zgfzgf
4d9c90ed4a modify runtime gasUsed printf 2020-11-03 15:46:35 +08:00
Jakub Sztandera
d8d9291402
Prep for gas balancing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-29 20:34:48 +01:00
Steven Allen
f23034305f Handle worker key changes correctly in runtime 2020-10-24 02:57:17 -07:00
Steven Allen
bcabe7b3b5 migrate methods to abstracted methods
Method numbers never change anyways. At worst, we'll deprecate old methods and
have to explicitly import them from the correct actors version to use them.
2020-10-21 12:18:37 -07:00
Steven Allen
4e730b5ec8 port to v2 imports 2020-10-21 12:16:23 -07:00
Aayush Rajasekaran
7f46ad19ac VM: Enforce a call depth limit 2020-10-20 18:19:50 -04:00
Aayush Rajasekaran
89f46cb5cc Make ApplyRet's GasOutputs a pointer, return nil when unused 2020-10-15 21:20:53 -04:00
Steven Allen
b0bea5f145 return an illegal actor error when we see an unsupported actor version
As far as the chain is concerned, this actor does not exist.
2020-10-07 15:46:56 -07:00
Steven Allen
df4b068d0e Merge branch 'master' into next 2020-10-07 11:55:00 -07:00
Raúl Kripalani
7cd1330acd make vm.EnableGasTracing public. 2020-10-07 15:52:03 +01:00
Aayush Rajasekaran
dfaabb4596
Merge pull request #3697 from filecoin-project/fix/actor-panic-fatal
fix: error when actor panics directly
2020-10-06 17:41:31 -04:00
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
Aayush Rajasekaran
7b556252db Use SysErrReserved1 in the event of an actors panic 2020-10-06 05:34:53 -04:00
Aayush Rajasekaran
14ad91c53f Add type assertion for v2 runtime 2020-10-06 01:27:45 -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
Jakub Sztandera
b7f18b4601
Disable callers
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-29 14:49:18 +02:00
Aayush Rajasekaran
be9d23b329 Centralize some params in builtin 2020-09-29 02:25:43 -04:00
Steven Allen
ca9448bc11 rename actors v1 -> actors v2
The actual actors version is v2, not v1. Using Version1 internally was really confusing.
2020-09-28 13:13:18 -07:00
Steven Allen
5f3160cf5b continue expanding vm abstraction layer 2020-09-28 12:48:08 -07:00
Steven Allen
b8d9d7894f fix vm version 2020-09-25 12:52:16 -07: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
Steven Allen
8806f27220 fix runtime reflection for upgrade 2020-09-25 12:49:39 -07:00
Aayush Rajasekaran
ebad0ded3d Introduce v1 actors 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
1bf3b4989d rename imports to match actors code
`sed -i 's/\bv0\(\w\)\(\w*\)/\L\1\E\20/g' **/*.go`
2020-09-18 14:59:27 -07:00
Steven Allen
4a7055c328 fix state loading in vm 2020-09-18 14:46:55 -07:00
Steven Allen
24df873498 rename imports 2020-09-18 14:21:05 -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
Aayush Rajasekaran
053cfc1cc7 Migrate verifreg actor 2020-09-17 03:55:23 -04:00
Aayush Rajasekaran
e2295c372a Migrate multisig actor 2020-09-17 02:57:45 -04:00
Aayush Rajasekaran
b60614982e Migrate reward actor 2020-09-17 02:42:39 -04:00
Aayush Rajasekaran
b5ba7a0fad Miner migration 2020-09-17 02:21:16 -04:00
Raúl Kripalani
362fc180ec fix a regression caused by #3800. 2020-09-16 10:54:26 +01:00
Aayush Rajasekaran
b4ee519282 Partial progress towards switching to miner and power interfaces 2020-09-16 01:37:49 -04: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