Commit Graph

1004 Commits

Author SHA1 Message Date
Steven Allen
58c029a63b feat: api: sanity check the "to" address of outgoing messages (#12135)
* feat: api: sanity check the "to" address of outgoing messages

If the "to" address of an outgoing message is a _delegated_ address,
verify that it maps to a valid Ethereum address. This isn't a consensus
critical change, but it'll help prevent client-side address conversion
libraries from directing messages into oblivion (e.g., by
mis-translating `0xff0000....` addresses into `f410f...` addresses
instead of `f0...` addresses.

* tests for invalid delegated addresses

* fix lint

---------

Co-authored-by: aarshkshah1992 <aarshkshah1992@gmail.com>
2024-07-03 08:57:59 +04:00
Steven Allen
5ac64aaad8 fix: state: rename Actor.Address and only use it for f4 addresses (#12155)
Per the FIP [1], the top-level actor address field should only be used
for delegated addresses. Unfortunately, the FIP's design was changed [2]
but neither lotus genesis code nor the field name were updated to
reflect this. Fortunately, all the migration code (on mainnet, at
least), has correctly left this field unset/unchanged (except for actors
with f4 addresses).

[1]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0048.md#new-lookup_delegated_address-syscall-and-state-changes
[2]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0048.md#recording-other-addresses-in-the-actorstate-root
2024-06-27 11:05:55 +04:00
Rod Vagg
d9af3696ab fix: niporep: unflake provecommit failure for niporep 2024-06-27 11:05:55 +04:00
ZenGround0
1e8bc10b04
Rough draft (#12139)
* FIP 0085 test

* Review response

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
2024-06-25 16:16:00 +00:00
Rod Vagg
be592d8891 feat: test: add LOTUS_RUN_VERY_EXPENSIVE_TESTS and include niporep real-proofs 2024-06-25 21:25:10 +10:00
Rod Vagg
f4e99f6bd1 test: niporep: initial niporep e2e test 2024-06-25 21:25:10 +10:00
Rod Vagg
a60a8c7f8a
chore: test: refactor, fix and improve unmanaged miner (#12143)
from niporep work, including some necessary bits from there but are useful in
general
2024-06-25 14:47:43 +04:00
Rod Vagg
0da6077f4d feat: niporep: introduce SealProofVariant 2024-06-25 19:13:07 +10:00
Rod Vagg
d9195c464b fix: fevm: update tests for latest actors bundle (#12144)
plus some code improvement refactoring
2024-06-25 12:05:18 +04:00
Rod Vagg
3f1711fbd2 fix: itest: fix wdpost proving epoch calculation
Fixes: https://github.com/filecoin-project/lotus/issues/12091
2024-06-21 14:43:48 +10:00
Mikers
6408709018
feat: eth: support "safe" and "finalized" for eth_getBlockByNumber (#12110)
* add support for eth_getBlockByNumber to accept the term safe which we are using as 30 blocks

* fix lint catch of unnecessary cast

* add finalized to get block by number

* Update chain/types/ethtypes/eth_types.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* add test for eth get block by number to accept latest and safe and finalized as arguments

---------

Co-authored-by: Rod Vagg <rod@vagg.org>
2024-06-21 11:38:21 +10:00
Peter Rabbitson
610c984dc2
chore: types: remove more items forgotten after markets (#12095)
* chore: cleanup: remove more items forgotten after markets

* .gz somehow reappeared after https://github.com/filecoin-project/lotus/pull/11625
2024-06-17 10:01:20 +04:00
Rod Vagg
16efdf62d0 feat: itest: minor UnmanagedMiner refactor for reusability and simplicity
* move some utility methods into UnmanagedMiner so they can be used from other itests
* make UnmanagedMiner aware of mock proofs so we can remove a lot of branching
2024-06-14 22:26:46 +10:00
Mikers
8f94aad42e
feat: Add trace transaction API (#12075)
* changelog for trace_transaction

* adding boilerplate for trace_transaction to /api/

* add eth trace transaction proxy and mock api

* trace tx boilerplate

* trace transaction implementation - under construction

* fix types for eth trace transaction

* trace_transaction implemented

* golint and handle transaction not found

* gofmt

* ran make docsgen

* pointer bugfix  and make docsgen

* tx.BlockNumber is nil when the transaction is still in the mpool/pending and there is no trace for pending transactions

* check eth trace transaction happy case and two error cases - tx not found and tx pending in itests

* simplify error msg check for gh action fail

---------

Co-authored-by: Michael Seiler <michaelseiler@Michaels-Laptop.local>
2024-06-07 14:14:34 -04:00
Aarsh Shah
fb3fc1f342
fix: test: no snap deals in immutable deadlines (#12071) 2024-06-06 21:15:12 +10:00
Rod Vagg
59938414fc
test: actors: manual CC onboarding and proving integration test (#12017)
* remove client CLI

* remove markets CLI from miner

* remove markets from all CLI

* remove client API

* update go mod

* remove EnableMarkets flag

* remove market subsystem

* remove dagstore

* remove index provider

* remove graphsync and data-transfer

* remove markets

* go mod tidy

* fix cbor gen deps

* remove deal making from config

* remove eol alert

* go mod tidy

* changes as per review

* make jen

* changes as per review

* test: actors: manual CC onboarding and proving integration test

* test: actors: manual CC onboarding itest with real proofs

* test: actors: fix lint issue, require proofs in CI

* test: actors: rename real proofs test, fix dispute window wait

* feat: add TestUnmanagedMiner in the itest kit for non-storage managed miners

* feat: test: improve UnmanagedMiner test harness

* feat: test: MineBlocksMustPost can watch for >1 miners (#12063)

* feat: test: MineBlocksMustPost can watch for >1 miners

* feat: test: wait for both sectors at the end of test

* feat: test: minor manual onboarding test fixups and speed up

* feat: test: handle case where miners have close deadline ends

* Implement snap deals test for manual sector onboarding (#12066)

* changes as per review

* thread safety

* test for snap deals

* remove extraneous change

* Apply suggestions from code review

Co-authored-by: Rod Vagg <rod@vagg.org>

* cancel CC Post after snap deals

---------

Co-authored-by: Rod Vagg <rod@vagg.org>

* fix config

---------

Co-authored-by: aarshkshah1992 <aarshkshah1992@gmail.com>
2024-06-06 08:47:25 +04:00
Aarsh Shah
e3deda0b2b
cleanup: miner: remove markets and deal-making from Lotus Miner (#12005)
* remove client CLI

* remove markets CLI from miner

* remove markets from all CLI

* remove client API

* update go mod

* remove EnableMarkets flag

* remove market subsystem

* remove dagstore

* remove index provider

* remove graphsync and data-transfer

* remove markets

* go mod tidy

* fix cbor gen deps

* remove deal making from config

* remove eol alert

* go mod tidy

* changes as per review

* make jen

* changes as per review

* merge master

* remove libp2p from config

* miner does not have libp2p conn in api test
2024-06-05 18:14:50 +04:00
Aarsh Shah
469960ce0e
cleanup: Lotus client: remove markets and deal-making from Lotus Client (#11999)
* remove client CLI

* remove markets CLI from miner

* remove markets from all CLI

* remove client API

* update go mod

* changes as per review
2024-06-05 09:56:25 +04:00
Aarsh Shah
c9c070727a
feat: ETH compatibility in Filecoin : Support Homestead and EIP-155 Ethereum transactions("legacy" transactions) in Filecoin (#11969)
* poc for eth legacy tx

* print statements

* finished

* tests work

* remove print statements

* Remove all print statements

* remove extraneous changes

* cleaned up code and interface

* run make jen

* dont duplicate signature

* go mod tidy and remove prints

* clean up tests

* test for conversion

* changes as per review

* more unit tests for legacy txns

* Apply suggestions from code review

Co-authored-by: Rod Vagg <rod@vagg.org>

* address review comments from Rodd

* changes as per zen's 2nd review

* go mod tidy

* feat: ETH compatibility in Filecoin : Support EIP-155 Ethereum transactions in Filecoin (#11970)

* itests passing for 155 tx

* first working version for EIP-155 transactions

* green itest

* add docs

* tests

* remove print stmt

* remove print stmt

* validate signature

* changes as per zen's review

* correct signature verification

* gate tx by Network Version

* handle arajsek review

* fix imports order

* fix lint

* dont lock in mpool for network gating ETH messages

* sender can be an ID address

---------

Co-authored-by: Rod Vagg <rod@vagg.org>
2024-06-05 09:25:50 +04:00
Rod Vagg
0a51a0a219 feat!: build: separate miner and node version strings
Ref: https://github.com/filecoin-project/lotus/issues/12010
2024-05-30 10:02:43 +10:00
Łukasz Magiera
bcdca4d09f Drop curio-related sources 2024-05-28 13:28:00 +02:00
Łukasz Magiera
2a4b1ad62b make gen 2024-05-28 13:28:00 +02:00
Łukasz Magiera
76459fc226 Remove Ensemble dep on Curio 2024-05-28 13:28:00 +02:00
Łukasz Magiera
f97036c1b0 Move curio packages to curiosrc 2024-05-28 13:28:00 +02:00
tomfees
1879570628
chore: fix function names (#12043)
Co-authored-by: tomfees <170385392+tomfees@users.noreply.github.com>
2024-05-27 03:51:55 +00:00
Łukasz Magiera
759709b768
fix: itests: Fix flaky curio itest (#12037)
* fix: itests: Fix flaky curio itest

* fix curio test with ffiselect

* try bigger instance for curio itest

* curio itest: reduce block time
2024-05-24 16:35:00 +02:00
LexLuthr
7e3846c669
feat: curio: allow multiple pieces per sector (#11935)
* multiple piece per sector, DDO deals

* in memory to DB

* sql parser

* add seal command

* multi piece TreeD

* redo filler pieces

* remove psql exception handling

* fix deal sectors porep

* fix tests

* ddo deals

* lower SDR cpu for test

* devnet cpu 0

* get params for itest

* fix itest sector size

* revert sdr devnet cpu

* improve SectorStatus API

* account for verified constraints
2024-05-22 10:08:32 +02:00
Andrew Jackson (Ajax)
672864ad17
Remove "provider" relics (#11992)
* really get rid of provider this time

* one more
2024-05-14 14:50:31 -05:00
ZenGround0
84b08fc25f
feat:state:Ignore market balance after nv23 (#11976)
* Ignore market balance after nv23

* Review Response and failing test

* Fixes

* Test passing

* Bump up threshold

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
2024-05-13 17:53:20 -04:00
Rod Vagg
1882525578 chore: lint: address feedback from reviews 2024-05-13 14:52:09 +10:00
Rod Vagg
26d3fd2ecc chore: lint: fix lint errors with new linting config
Ref: https://github.com/filecoin-project/lotus/issues/11967
2024-05-13 14:52:09 +10:00
Phi-rjan
2d57bfe273
feat: Skeleton for nv23 (#11964)
* Use local GST

Use local GST

* Import actors and define upgrade heights

Creatin a mock actor-bundle and define upgrade heights

* Generate adapters

Updates gen/inlinegen-data.json, and runs make actors-gen

* Add schedule and migration

Add schedule and migration

* Add upgrade and network version fields/params

Add upgrade and network version fields/params

* Run make gen / make docsgen-cli

Run make gen / make docsgen-cli

* Update filecoin-ffi

Update filecoin-ffi to the v1.28.0-dev tag, which supports the nv23 skeleton.

* Update GST to v0.14.0-dev

Update GST to v0.14.0-dev, which includes the nv23 skeleton

* Add support for actor version 14 in actor registry

Add support for actor version 14 in actor registry
2024-05-07 09:40:49 +02:00
Masih H. Derkani
f907354300 Refactor LookupID* APIs in StateManager and StateTree
The naming of `LookupID` can cause confusion when resolving actor IDs vs
 ID addresses. To avoid this:

* Refactor `StateTree` `LookupID` to `LookupIDAddress`, because it
returns ID address.
* Refactor `StateManager` `LookupID` to
`LookupIDAddress` because it also returns ID address via a chain call to
`StateTree`.
* Introduce a new API `StateManager` dedicated to resolving address to
actor ID, called `LookupID` which returns `abi.ActorID`.

For context, see:
 * https://github.com/filecoin-project/lotus/pull/11723#discussion_r1534728607
2024-04-24 15:25:48 +01:00
forcedebug
772f6a38c5
Fix mismatched method names in comments (#11913)
Signed-off-by: forcedebug <forcedebug@outlook.com>
2024-04-23 02:56:43 +02:00
Andrew Jackson (Ajax)
fd7f1a95e2
feat: curio: web based config edit (#11822)
* cfg edit 1

* jsonschema deps

* feat: lp mig - first few steps

* lp mig: default tasks

* code comments

* docs

* lp-mig-progress

* shared

* comments and todos

* fix: curio: rename lotus-provider to curio (#11645)

* rename provider to curio

* install gotext

* fix lint errors, mod tidy

* fix typo

* fix API_INFO and add gotext to circleCI

* add back gotext

* add gotext after remerge

* lp: channels doc

* finish easy-migration TODOs

* out generate

* merging and more renames

* avoid make-all

* minor doc stuff

* cu: make gen

* make gen fix

* make gen

* tryfix

* go mod tidy

* minor ez migration fixes

* ez setup - ui cleanups

* better error message

* guided setup colors

* better path to saveconfigtolayer

* loadconfigwithupgrades fix

* readMiner oops

* guided - homedir

* err if miner is running

* prompt error should exit

* process already running, miner_id sectors in migration

* dont prompt for language a second time

* check miner stopped

* unlock repo

* render and sql oops

* curio easyMig - some fixes

* easyMigration runs successfully

* lint

* part 2 of last

* message

* merge addtl

* fixing guided setup for myself

* warn-on-no-post

* EditorLoads

* cleanups and styles

* create info

* fix tests

* make gen

* change layout, add help button

* Duration custom json

* mjs naming

---------

Co-authored-by: LexLuthr <88259624+LexLuthr@users.noreply.github.com>
Co-authored-by: LexLuthr <lexluthr@protocol.ai>
Co-authored-by: LexLuthr <lexluthr@curiostorage.org>
2024-04-16 09:30:27 -05:00
Łukasz Magiera
2dd7db20f5 curio: Fix tests 2024-04-16 12:16:33 +02:00
Andrew Jackson (Ajax)
da92001c71 feat/boredom 2024-04-16 12:16:33 +02:00
Aarsh Shah
6443afa2bb
fix: api: fix EthSubscribe tipsets off by one (#11858)
Eth subscribe tipsets API should only return tipsets that have been executed.

We do this by only returning the parent tipset of the latest tipset received by ETH Subscribe from it's TipSetFilter subscription.

Closes #11807
Subsumes #11816
2024-04-09 13:32:02 -07:00
Steven Allen
8206954bb0 Merge branch 'releases' 2024-04-09 15:28:10 -05:00
Steven Allen
23b61c305a
test: eth: wait longer for chain to settle in block hash test (#11863)
I shrunk this down to 10 when I last deflaked this test, but I was too
optimistic. I'm bringing this back up to 50.

See https://gist.github.com/Stebalien/701039637361b3b9cb328d7c2d61beda
2024-04-09 13:20:59 -07:00
Rod Vagg
5d620a72f7 fix(events): harden tests to assert strict event entry order 2024-04-05 16:46:30 +11:00
Steven Allen
1645c32997
test: eth: deflake EthBlockHashesCorrect_MultiBlockTipset (#11808)
Increase the chances of having multiple blocks at the same height by
aligning block times across test miners. Also, make the block hash test
faster.
2024-04-03 19:10:31 -07:00
LexLuthr
9f9dc979fb
feat: curio: add miner init (#11775)
* sptool: Initial structure

* sptool: Port lotus-miner actor withdraw

* sptool: Make cli docsgen happy

* actors are done

* info

* proving

* sptool the rest

* fixed gitignore

* lints

* oops

* 2

* terminate

* fixes

* curio new-miner setup

* reword doc section

* fix curio flags

* fix gen

* change repetitive prompt

* add miner to base

* add config test

* fix config compare, add tests

* go mod tidy

* fix itest in GA

* fix comparer function

* fix compare value match

---------

Co-authored-by: Łukasz Magiera <magik6k@gmail.com>
Co-authored-by: Andrew Jackson (Ajax) <snadrus@gmail.com>
2024-04-03 15:00:14 -05:00
Andrew Jackson (Ajax)
b95e95f4d6
feat: SPTool (#11788)
* sptool: Initial structure

* sptool: Port lotus-miner actor withdraw

* sptool: Make cli docsgen happy

* actors are done

* info

* proving

* sptool the rest

* fixed gitignore

* lints

* oops

* 2

* terminate

* fixes

* sptool: improve sectors list

---------

Co-authored-by: Łukasz Magiera <magik6k@gmail.com>
2024-04-01 10:30:35 -05:00
LexLuthr
8062f200bd
fix: curio: refactor curio graceful shutdown (#11794)
* refactor curio shutdown

* apply suggestions, remove provider cli
2024-03-30 11:40:32 -05:00
LexLuthr
0e4677618f
fix: CLI: adjust TermMax for extend-claim used by a different client (#11764)
* fix Datacap TermMax

* fix itest

* add batching

* make batch size variable

* docsgen-cli

* reduce batch size, fix batch dc

* apply suggestion from review

* put back TODO

---------

Co-authored-by: LexLuthr <lexluthr@protocol.ai>
2024-03-28 15:18:28 +04:00
Steven Allen
78d9d9baa0 Merge branch 'releases' 2024-03-27 08:55:17 -07:00
Łukasz Magiera
021385116a paths: Fix local existing allocate requests in Finalize 2024-03-26 20:32:46 +01:00
Łukasz Magiera
e86d81b26a fix: curio seal: Fix partial Finalize retry 2024-03-22 16:05:48 +01:00
Łukasz Magiera
8ec74fdb05 itests: Try to deflake TestSectorImportAfterPC2 2024-03-22 16:05:48 +01:00